Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- PA.`player`
- , PA.`block_id`
- , sum(case when PA.`action_type`='block-break' then 1 else 0 end)
- -sum(case when PA.`action_type`='block-place' then 1 else 0 end) as Broken
- from `prism_actions` as PA
- where PA.`action_type` in ('block-break','block-place')
- group by
- PA.`player`
- , PA.`block_id`
- having sum(case when PA.`action_type`='block-break' then 1 else 0 end)>0
- ;
Advertisement
Add Comment
Please, Sign In to add comment