SELECT Count(*) AS MonthTotal
FROM CRMProjects
WHERE CreatedDate between '01 May 2016' and '31 May 2016'
SELECT Count(*) AS YearTotal
FROM CRMProjects
WHERE CreatedDate between '01 Jan 2016' and '31 Dec 2016'
SELECT Count(*) AS MonthNew
FROM CRMProjects
WHERE CreatedDate between '01 May 2016' and '31 May 2016'
AND SystemType = 'O'
SELECT Count(*) AS YearClosed
FROM CRMProjects
WHERE CreatedDate between '01 Jan 2016' and '31 Dec 2016'
AND SystemType = 'C'
它只填充表中的月份,它不填充其他部分,因爲Visual Studio不允許多個select語句用於一個數據集。我可以在SQL中創建一個select語句嗎?