Count the total records containing specific values
问题 I have a question and hope you guys can assist me. I have a table containing two columns: type // contains 2 different values: "Raid" and "Hold" authorization // contains 2 different values: "Accepted" or "Denied" I need to make a view that returns values like this: TYPE:RAID ACCEPTED:5 DENIED:7 Basically I want to know how many of the values in TYPE are "Raid" and then how many of them are "Accepted" and "Denied". Thank you in advance!! 回答1: SELECT Type ,sum(case Authorization when 'Accepted