Answers for "sql conditional sum"

SQL
0

sql sum if

/* Count the number of ColumnA lines where ColumnB is above 10 */
SELECT COLUMNA
	 , SUM(CASE WHEN COLUMNB > 10 THEN 1 ELSE 0 END) AS COUNT_ABOVE_TEN
FROM TABLEA
GROUP BY COLUMNA
Posted by: Guest on July-22-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language