MySQL查询问题
|
我有当前的数据库设置:
Forename | Surname | Department | Completion_Status
Tom Smith Sales Started
Bob Jones Sales Completed
Alison Baines Sales Not Started
Arthur Smith Marketing Started
Claire Staines Marketing Completed
我能够返回没有问题的总行数以及完成状态为“已开始”或“已完成”但不在单个语句中的总数-但是,我想在单个语句中执行的操作是:
COUNT for Department As Total AND the COUNT for Department As Responses WHERE Completion_Status IN (\'Started\', \'Completed\')
它看起来像这样:
Department | Total | Responses
Sales 3 2
Marketing 2 2
希望有道理!?
谢谢荷马。
没有找到相关结果
已邀请:
2 个回复
犁攀富
这是一个更标准的版本
净爽