我有以下查询:
Select TRUNC(create_dtime) as Day, Count(Create_Dtime) As SinS_Tot
From player_chkin_hist
Where Product_Id Is Not Null
And Trunc(Create_Dtime) >= To_Date('2012-sep-01','yyyy-mon-dd')
And Trunc(Create_Dtime) < To_Date('2012-sep-19','yyyy-mon-dd')
Group By Trunc(Create_Dtime)
Order By 1 Asc
和
Select TRUNC(Create_Dtime) As Day, Count(Create_Dtime) As Sins_Tot
From Player_Chkin
where Product_Id Is Not Null
And Trunc(Create_Dtime) >= To_Date('2012-sep-01','yyyy-mon-dd')
And Trunc(Create_Dtime) < To_Date('2012-sep-19','yyyy-mon-dd')
Group By Trunc(Create_Dtime)
Order By 1 Asc
查询 1 结果:
Day SinS_Tot
01-Sep-12 10000
02-Sep-12 9000
查询两个结果:
Day SinS_Tot
03-Sep-12 11500
04-Sep-12 9800
有没有一种简单的方法可以组合这两个查询以便我看到所有数据?我考虑过使用连接,但由于日期不重叠,所以没有什么可以将内部连接设置为相等。