Answers for "pgsql sum switch case"

SQL
1

pgsql sum switch case

SELECT 
SUM(
    CASE 
      WHEN condition_1  THEN result_1
      WHEN condition_2  THEN result_2
      [WHEN ...]
      [ELSE else_result]
	END
)
FROM ...
Posted by: Guest on May-28-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language