我有一个查询:
SELECT
f.name as f_name,
f.address as f_address,
f.business as f_business,
f.web as f_web,
f.id_service as f_id_service,
f.id_city as f_id_city,
f.id_firm as f_id_firm,
f.phone as f_phone,
p.name as p_name
FROM Firm f
left join Price p on p.id_service=f.id_service
AND p.id_city=f.id_city AND p.id_firm=f.id_firm
WHERE
p.id_city='73041' AND
p.include='1' AND
p.blocked='0' AND
f.blocked='0'AND
p.id_group='44' AND
p.id_subgroup='369'
Group by
f.name
ORDER by
f.name ASC
我收到以下错误:
Msg 8120, Level 16, State 1, Line 4
Column 'Firm.address' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
为什么我会得到这个,我该如何解决?