View difference between Paste ID: Z62aD4DM and 7VKQ5EDm
SHOW: | | - or go back to the newest paste.
1-
SELECT first_name,
1+
SELECT title,
2-
       last_name,
2+
       rental_rate,
3-
       title,
3+
4
           WHEN rental_rate < 1 THEN 'категория 1'
5-
           WHEN title LIKE '%IT%' THEN 'разработка'
5+
           WHEN rental_rate >= 1
6-
           WHEN(title LIKE '%Manager%' 
6+
                AND rental_rate < 3 THEN 'категория 2'
7-
                AND title NOT LIKE '%IT%') THEN 'отдел продаж'
7+
           WHEN rental_rate >= 3 THEN 'категория 3'
8-
           WHEN title LIKE '%Support%' THEN 'поддержка'
8+
9
FROM movie;