how to cast the case expression in postgresql code example
Example 1: postgresql cast
SELECT '100'::INTEGER;
SELECT CAST ('100' AS INTEGER);
Example 2: case when postgres
CASE
WHEN condition_1 THEN result_1
WHEN condition_2 THEN result_2
[WHEN ...]
[ELSE else_result]
END