tubelius

Prism net blocks broken

Apr 12th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. SELECT
  2. PA.`player`
  3. , PA.`block_id`
  4. , sum(case when PA.`action_type`='block-break' then 1 else 0 end)
  5. -sum(case when PA.`action_type`='block-place' then 1 else 0 end) as Broken
  6. from `prism_actions` as PA
  7. where PA.`action_type` in ('block-break','block-place')
  8. group by
  9. PA.`player`
  10. , PA.`block_id`
  11. having sum(case when PA.`action_type`='block-break' then 1 else 0 end)>0
  12. ;
Advertisement
Add Comment
Please, Sign In to add comment