Reporting Services视图中的小时销售额,SQL
我有一张表:每小时的销售额是这样的(计算有多少人买东西和身份证): 现在,我希望能够在Reporting Services中这样显示它:Reporting Services视图中的小时销售额,SQL,sql,reporting-services,left-join,Sql,Reporting Services,Left Join,我有一张表:每小时的销售额是这样的(计算有多少人买东西和身份证): 现在,我希望能够在Reporting Services中这样显示它: 09:00 10:00 11:00 12:00 13:00 14:00 15:00 Store: 00001 Count_Service 40 50 0 0 0 0 50 Cou
09:00 10:00 11:00 12:00 13:00 14:00 15:00
Store: 00001
Count_Service 40 50 0 0 0 0 50
Count_Service_ID_Check 3 5 0 0 0 0 5
也就是说,我想添加没有事务的小时数,并添加一个0
我有一张时间表:Dim_时间表
由时间和存储id填充的:
Store Time
00001 09:00
00001 10:00
00001 11:00
00001 12:00
00001 13:00
00001 14:00
00001 15:00
在每小时的销售中做一个左连接难道还不够吗
我发现了一个类似的问题,但无法得到问题的答案:
谢谢你的帮助 是-使用:
select t.store, t.time, s.Count_Service, s.Count_Service_ID_Check
from Dim_TimeTable t
left join Hourly_Sales s on t.store = s.store and t.time = s.time
作为查询,然后使用矩阵显示整个页面的时间
select t.store, t.time, s.Count_Service, s.Count_Service_ID_Check
from Dim_TimeTable t
left join Hourly_Sales s on t.store = s.store and t.time = s.time