sql server - multiple conditions in the same SQL query -


Can you recommend a good way of getting the output right from input (left) by typing a SQL query ? We need to calculate the number of 'A' entries on call 1 and then the number of 'b' on call 2 (only for callers who have call 0).

Thank you. (Requires SQL Server solution) Enter image details here

very simple:

  SELECT col0, SUM (case when call 1 = 'one' and then 1 ELSE 0 ADD ) A, AM (case when call 2 = 'B' then 1 ELSE 0nd) B to B from where call 0 = 'Yes' by call group  

< / Div>

Comments