有没有办法按开放任务的数量排序?
SELECT Tasks.ClientName, Count(*) AS OpenTaskCount
FROM Tasks
WHERE (((Tasks.Completed)=False))
GROUP BY Tasks.ClientName
ORDER BY OpenTaskCount DESC;
当我尝试这个时,它会在GUI中提示输入OpenTaskCount。
答案 0 :(得分:2)
试试这个:
SELECT Tasks.ClientName, Count(*) AS OpenTaskCount
FROM Tasks
WHERE (((Tasks.Completed)=False))
GROUP BY Tasks.ClientName
ORDER BY COUNT(*) DESC;
答案 1 :(得分:2)
或者:
SELECT Tasks.ClientName, Count(*) AS OpenTaskCount
FROM Tasks
WHERE (((Tasks.Completed)=False))
GROUP BY Tasks.ClientName
ORDER BY Count(*) DESC;
或
SELECT Tasks.ClientName, Count(*) AS OpenTaskCount
FROM Tasks
WHERE (((Tasks.Completed)=False))
GROUP BY Tasks.ClientName
ORDER BY 2 DESC;
应该有用。