Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT store_id,
- COUNT(CASE WHEN active = 1 THEN customer_id ELSE NULL END) as active,
- COUNT(CASE WHEN active = 0 THEN customer_id ELSE NULL END) as inactive
- FROM customer
- GROUP BY store_id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement