Advertisement
Ivelin_1936

07. Deposits Filter

Feb 9th, 2018
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.24 KB | None | 0 0
  1. SELECT
  2.     wd.deposit_group, SUM(wd.deposit_amount) AS 'total_sum'
  3. FROM
  4.     `wizzard_deposits` AS wd
  5. WHERE
  6.     wd.magic_wand_creator LIKE ('Ollivander family')
  7. GROUP BY wd.deposit_group
  8. HAVING total_sum < 150000
  9. ORDER BY total_sum DESC;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement