I’m trying to build a query that will order results by date and time, but the date and time upon which I want to base the ordering is contained in two tables. Additionally, I’d like to group the data by loc_id for rows having the same date.
For example, if I had this data:

Notes:
– parent_id links to the id in TABLE A.
– there are two other tables USER and LOC which are used to get the user name and location name.
– comments are optional in TABLE A, but will always exist in TABLE B.
I’ve found a lot of info on this site that’s close to what I need, but nothing that’s quite helped me solve this issue.
Thanks.
1 Answer