Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT first_name, last_name,
- CASE
- WHEN store_id = 1 and active = 1 THEN 'store 1 active'
- WHEN store_id = 2 and active = 1 THEN 'store 2 active'
- WHEN store_id = 1 and active = 0 THEN 'store 1 unactive'
- ELSE 'store 2 unactive'
- END AS 'store_and_status'
- FROM customer;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement