I have a MySQL table with two columns: a and b. There are 20 entries in that table
For 10 entries, a = 3. For the other 10 entries, a = 4.
I want to select rows such that b = 0, but I only want one from the group where a = 3, and one from the group a = 4.
The base query would be something like:
SELECT * FROM `table_name` WHERE b = 0 AND rest_of_query
What should rest_of_query be?