I have this table:
╔════════════════╤═══════════════════╤═══════════╤═══════════╗
║ question1 │ question2 │ question3 │ question4 ║
╠════════════════╪═══════════════════╪═══════════╪═══════════╣
║ Agree │ Disagree │ Agree │ Disagree ║
╟────────────────┼───────────────────┼───────────┼───────────╢
║ Strongly Agree │ Strongly Disagree │ Agree │ Disagree ║
╚════════════════╧═══════════════════╧═══════════╧═══════════╝
I'm trying to write a query using COUNT() which shows the number of responses per question like this:
╔══════════╤════════════════╤═══════╤══════════╤═══════════════════╗
║ Question │ Strongly Agree │ Agree │ Disagree │ Strongly Disagree ║
╠══════════╪════════════════╪═══════╪══════════╪═══════════════════╣
║ Q1 │ 1 │ 1 │ 0 │ 0 ║
╟──────────┼────────────────┼───────┼──────────┼───────────────────╢
║ Q2 │ 0 │ 0 │ 1 │ 1 ║
╟──────────┼────────────────┼───────┼──────────┼───────────────────╢
║ Q3 │ 0 │ 2 │ 0 │ 0 ║
╟──────────┼────────────────┼───────┼──────────┼───────────────────╢
║ Q4 │ 0 │ 0 │ 2 │ 0 ║
╚══════════╧════════════════╧═══════╧══════════╧═══════════════════╝
I've tried several queries but it always gave me wrong results. Any help would be appreciated. Thanks.