I was just looking up GROUP BY and see that it's used with an aggregate function, so I think that's not going to work for me.
Allow me to explain more thoroughly what I'm after. I'm trying to validate data from an uploaded CSV file. Errors could include missing values, like first and last names, or an invalid email address. I'm able to do this:
$strQuery = "SELECT
COUNT(CASE WHEN `firstname` = '' THEN 1 END) AS no_first,
COUNT(CASE WHEN `lastname` = '' THEN 1 END) AS no_last,
FROM tablename";
With the results, I can indicate that there are x rows with no first name and y rows