Answer the question
In order to leave comments, you need to log in
How to make GROUP BY output queries where count(column) >= 0?
SELECT `categories`.`id`, count(`redirects`.`category_id`)
FROM `categories`
INNER JOIN `redirects`
ON `categories`.`id` = `redirects`.`category_id`
WHERE 1
GROUP BY `redirects`.`category_id`
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question