I'm trying to select rows with a certain column name and order them by another column name.
Here's my problem, into N simplified tables:
table 1: id, username, datetime, comment
table 2: id, username, datetime, vote
.
.
.
table N: id, username, datetime, bought
I want to be able to select all rows where username='Some Name'
, ordered by datetime -- across all N tables.
--
Incidentally, does anyone know of a good book or resource on learning and practicing advanced SQL? (Tried SQLZoo, but they don't have enough advance examples.. and then there are the too-advanced ones that I'm still stumped on)