代码:
SELECT ta.name AS ta_name,
ta.unit AS ta_unit,
ta.id_producer_goods AS ta_id_producer_goods
FROM Table ta
WHERE id_city = '24'
AND id_firm = '22131'
AND id_service = '5'
在选择中,我需要按 ta_name 分组获取行(结果应仅包括唯一的 ta_name)并获取所有表中每个唯一 ta_name 的计数。
怎么做?