How do you return 1 value per row of the max of several columns:
TableName
[Number, Date1, Date2, Date3, Cost]
I n
If you're using MySQL, you can use
SELECT GREATEST(col1, col2 ...) FROM table