I have table, which looks like this
id | item | price1 | price2
I want do get the list of items and for every item I want also to select max price among price1 and price2. Is it possible to do that in one query? Something like
SELECT item, max(price1,price2) FROM table;
UPDATE
Example:
table contains
item1 | 4 | 8
item2 | 5 | 1
item3 | 7 | 7
I want result to be
item1 | 8
item2 | 5
item3 | 7