我想从缺陷数据库构建查询。每个缺陷都有一个提交日期和一个状态(打开、关闭、延迟等)。我希望我的结果集有 3 列:
Date, # bugs w/ Open status, # bugs with Closed status
2012-05-31, 3, 1
2012-06-01, 2, 0
2012-06-02, 3, 2
我不知道如何超越这个查询来获得我想要的:
select
DEFECT.SUBMITTED_DATE as "Opened",
count (DEFECT.SUBMITTED_DATE),
DEFECT.STATUS as "Status"
from
DEFECT
where
DEFECT.STATUS='Open' or DEFECT.STATUS='Fixed'
group by
DEFECT.SUBMITTED_DATE
寻找建议。