I have a table structured like so:

```
CREATE TABLE [dbo].[vt](
[id] [uniqueidentifier] NOT NULL,
[ones] [money] NULL,
[twos] [money] NULL,
[fives] [money] NULL,
[tens] [money] NULL,
[twenties] [money] NULL,
[fifties] [money] NULL,
[hundreds] [money] NULL,
[ReportDate] [datetime] NULL)

```

How can I write a query to do what the query below does for each distinct ReportDate:

```
declare @date datetime
set @date = '11/3/2014';
SELECT 
ISNULL(SUM([ones]), 0) AS ones
,ISNULL(SUM([twos]), 0) AS twos
,ISNULL(SUM([fives]), 0) AS fives
,ISNULL(SUM([tens]), 0) AS tens
,ISNULL(SUM([twenties]), 0) AS twenties
,ISNULL(SUM([fifties]), 0) AS fifties
,ISNULL(SUM([hundreds]), 0) AS hundreds
,max(ReportDate) as ReportDate
FROM [vt]
WHERE 
ReportDate is not null and reportDate <= (@date)

```