我的目标是(对于所有要计算的列)
The Number of Invoices Per Date
1 There were a total of 1 invoice(s) on Apr 02, 2012
2 There were a total of 5 invoice(s) on Apr 01, 2012
InvoiceDate 表需要格式化,但我似乎根本无法投射它,当天有多个发票日期必须以某种方式计算:S
SELECT convert(varchar, getdate(), 107) AS InvoiceDate FROM Invoices
以上是我所知道的,但它一遍又一遍地重复相同的日期