I have a table called mom, in this table I have a column called reasonsForCancellation. There are a number of pre defined reasons for the user to choose. What I am looking to do is count each of the reasons and group them under the reason, for example:
This data will ultimately be charted in a pie chart. I was trying a count case but it's not working so for example
SELECT reasonForCancellation FROM mom,
COUNT(CASE WHEN reasonForCancellation = 'Insufficient Participants' THEN 'yes' ELSE NULL END)
AS Insufficient Participants,
I'm not really sure what to do...if anyone can help me...
the reasons are
Missed Impacts Issue
I really would appreciate anyone's help on this as I'm not very experienced in MySQL
That is great thank you for you help, unfortunately it still displays the null fields. I've attached the capture of the result for your ref. So there is a total of 12 meetings, 2 were cancelled and ten went ahead, so there was no reason for cancellation. I am looking to only extract the data of those with data in the reasonForCancellatoion field.
I apologise for the silly questions, it's just that I'm learning as I go.