I have a table (tableX, say)with the following columns:


Day sales
0 60
1 61
2 65
. .
.
.
50 70

I wanted to get the max value of sales and the corresponding day and wrote "select max(sales), day from tableX" but i get an error message.

What could be the reason?