Just curious how I would do it without any unique row identifiers... not that this data means anything 
set nocount ondeclare @table_1 table (thedate datetime, revenues int)declare @table_2 table (thedate datetime, revenues int)insert into @table_1 select null, 10 union select null, 20 union select null, 30insert into @table_2 select '2005-01-01', null union select '2005-01-02', null union select '2005-01-03', nullselect t2.thedate, t1.revenuesfrom ( select count(*) row, a.revenues from @table_1 a inner join @table_1 b on a.revenues >= b.revenues group by a.revenues) t1 join ( select count(*) row, a.thedate from @table_2 a inner join @table_2 b on a.thedate >= b.thedate group by a.thedate) t2on t1.row = t2.row
Nathan Skerl