Считайте домашних животных типы домашних животных в столбцах

SELECT distributor_id, COUNT(*)

GROUP BY distributor_id'
Clear Chinchilla