Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select name, (select SUM(useful_field) as t from table1 where table1.name = table2.name) as 'total', food, drink
- from table2
- select `useful_column` from table3 where reference_column = 'reference_field'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement