unit フィールドと producer_goods フィールドに名前ごとに複数の行があり、それらすべてを表示したいとします。
SELECT ta.[Name], (SELECT count([Name]) FROM [Table] tc WHERE tc.[Name] = ta.[Name] AND ta.id_city='333' AND ta.id_firm='444' AND ta.id_service='555' ) as [Name Count], ta.unit as ta_unit, ta.id_producer_goods as ta_id_producer_goods FROM [Table] ta WHERE ta.id_city='333' AND ta.id_firm='444' AND ta.id_service='555' ORDER BY ta.[Name]
プレ>