Created
November 21, 2022 16:42
-
-
Save rafaeltedesco/a8d4924380510ba4a0fcb18b9c10de43 to your computer and use it in GitHub Desktop.
SELECT CASE EXAMPLE 01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT * FROM sakila.customer; | |
| SELECT | |
| (CASE | |
| WHEN active = 1 THEN 'ATIVO' | |
| ELSE 'INATIVO' | |
| END) AS user_active, | |
| CONCAT(first_name, ' ', last_name) AS full_name, | |
| YEAR(create_date) AS joined_at | |
| FROM | |
| sakila.customer; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment