Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. select name, (select SUM(useful_field) as t from table1 where table1.name = table2.name) as 'total', food, drink
  2. from table2
  3.  
  4. select `useful_column` from table3 where reference_column = 'reference_field'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement