I currently have a table which looks similar to this:
+----+----------+--+------------+
| id | entry_id | | value |
+----+----------+--+------------+
| 1 | 20 | | name |
| 2 | 20 | | email |
| 3 | 20 | | Menu 1 |
| 4 | 20 | | 2020-04-23 |
| 5 | 21 | | name |
| 6 | 21 | | email |
| 7 | 21 | | Menu 1 |
| 8 | 21 | | 2020-04-23 |
+----+----------+--+------------+
I would now like to count the menus for a certain date which means that I would like to show "2" for menu 1 on 2020-04-23:
+-------+
| count |
+-------+
| 2 |
+-------+
My current SQL looks as follows:
SELECT COUNT(entry_id) FROM my_table WHERE value IN ("Menu 1", "2020-04-23") GROUP BY entry_id HAVING COUNT(*) = 2
However, this does not seem to work for me. Is there a way to count the entry once if two conditions are fulfilled?
Thanks for your help!