我正在使用来自冒险工作的下表来编写查询:
FactInternetSales 表具有 FK OrderDateKey、DueDateKey 和 ShipDateKey 与 DimDate 表中的 DateKey 关联。
我写了以下查询来测试:
SELECT dd.DateKey, dd.EnglishMonthName, fis.TotalProductCost
FROM DimDate AS dd INNER JOIN FactInternetSales AS fis
ON dd.DateKey = fis.OrderDateKey AND dd.DateKey = fis.DueDateKey
AND dd.DateKey = fis.ShipDateKey
上面的查询产生空输出。我检查了 FactInternetSales 表中的数据,它具有与 DimDate 表中的 PK 相关联的 FK。这个问题的可能原因是什么?
请指教?提前致谢!