Original Post
Hi, im using IBM DB2 and i am trying to get the max of this sub query :
The sql
quote:the results
SELECT SUM(ticket_total_amount)as sales FROM ticket,route WHERE ticket.route_id=route.route_id and date(ticket_timestamp) between ''2004-04-29'' and ''2004-05-30'' GROUP BY day(ticket_timestamp) , route_origin , route_destination
quote:Except I don''t know how to find the max of that, i tried doing: select max(thequery) but that doesn''t work thanks,
SALES --------------------------------- 63.23 80.46 74.50 26.25 63.00 10.50 30.00 26.40 85.00 193.00 18.00 5.00 5.00 12.75 14 record(s) selected.