下面的查询:错误与GROUP BY语句
SELECT a.vendor_id, a.crew_type_id, count(a.vendor_id) as `totalVendor`
FROM tb_vendor_crew_type_details as a
WHERE a.market = 1
AND a.crew_available > 0
AND a.crew_type_id IN (161, 183, 220, 221, 227)
Group by a.vendor_id
Having totalVendor >= 5
抛出一个错误:
SELECT list is not in GROUP BY clause and contains nonaggregated
column 'scope_worker_dev.a.crew_type_id' which is not functionally
dependent on columns in GROUP BY clause; this is incompatible with
sql_mode=only_full_group_by 0.00037 sec
可能是什么原因呢?我在查询中犯了什么错误?