Jul 5, 2024
table1 JOIN table2 ON table1.column = table2.column
(SELECT column FROM table WHERE condition) AS new_alias
WITH cte_name AS (SELECT ... FROM ... WHERE ...) SELECT * FROM cte_name
SELECT column,
CASE
WHEN condition THEN result
ELSE result
END AS alias
FROM table;
Thank you!