#1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ) AS county FROM q_mem_tim at line 2
SELECT Count( * ) AS m,
SUM(CASE
WHEN y = '2011' THEN 1
ELSE 0 ) AS county
FROM q_mem_tim
What is wrong with my code?
Use:
A
CASEstatement requires theENDkeyword to indicate when it ends.