-
Order By complex SQL
I have two tables, route and route_point
route: userid,number,routeid
route_point: route,date,time,ctiy,state,etc.
route_point.route has ForeignKey to route,routeid
I need a query where I can get the route info sorted by combinations of the following sorts:
route.number(easy)
route.enddate/time of route_points
route.startdate/time from route_points
route.endCity
route.startCity
For Example I would like to sort Routes by their StartDate, then Start City, then End Date.
Is this possible? I am using a MySQL dataabse.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|