View difference between Paste ID: 7VKQ5EDm and 4L1iAj6s
SHOW: | | - or go back to the newest paste.
1-
SELECT email
1+
SELECT first_name,
2-
FROM staff
2+
       last_name,
3-
WHERE city = 'Calgary'
3+
       title,
4-
AND EXTRACT(YEAR FROM CAST(hire_date AS TIMESTAMP)) IN (2002);
4+
       CASE
5
           WHEN title LIKE '%IT%' THEN 'разработка'
6
           WHEN(title LIKE '%Manager%' 
7
                AND title NOT LIKE '%IT%') THEN 'отдел продаж'
8
           WHEN title LIKE '%Support%' THEN 'поддержка'
9
       END
10
FROM staff;