select officer.forename || ' ' || Officer.surname || ' is working on : ' ||
count(crime.crime_id) "Officers Current Crimes"
From officer, crime
where officer.officer_id = crime.officer_id
order by crime.crime_id;
任何人都可以告诉我如何解决这个错误,它与count函数有关,提前谢谢。
答案 0 :(得分:2)
select officer.forename, Officer.surname || ' is working on : ' ||
count(crime.crime_id) "Officers Current Crimes"
From officer, crime
where officer.officer_id = crime.officer_id
GROUP BY officer.forename, Officer.surname;
您无法在非分组列上使用ORDER BY
..