Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9225193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T04:31:01+00:00 2026-06-18T04:31:01+00:00

I am using following tables from adventure work to write a query: The table

  • 0

I am using following tables from adventure work to write a query:

enter image description here

The table FactInternetSales table has FK OrderDateKey, DueDateKey and ShipDateKey Assosiate with DateKey in DimDate table.

I have wrote following query to test:

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

Above query produces empty output. I’ve checked the data in the FactInternetSales table and it has FK that associates with PK in the DimDate Table.What would be possible cause of this problem?

Please advise? Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T04:31:02+00:00Added an answer on June 18, 2026 at 4:31 am

    While this is extremely difficult to understand without having the Adventure Works Database (and I can’t see your attached image), my guess is that FactInternetSales should only JOIN DimDate ON a single field. Currently, the way you have the query written, you are joining DimDate.DateKey = FactInternetSales.OrderDateKey = FactInternetSales.DueDateKey = FactInternetSales.ShipDateKey

    Unless those 3 fields in FactInternetSales are the same, this will never produce results.

    Instead try something like:

    SELECT dd.DateKey, dd.EnglishMonthName, fis.TotalProductCost
    FROM DimDate AS dd INNER JOIN FactInternetSales AS fis 
    ON dd.DateKey = fis.OrderDateKey 
    

    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the following query to select wait times from the table wait_times
I'm using the following query to select users from my 'users' table with the
Consider following tables: How to skip and take groups from the table? Tried using
I am using the following query to get the count from multiple tables:- SELECT
I'm using EF v1. I have following tables: CREATE TABLE category ( category_id int
When using Doctrine ORM in Symfony2, I have the following tables generated from three
So using the following 2 tables Employee: mysql> select * from employee; +----------+-------+---------+-----------+------------+--------------------------+------+--------+-----------+-----+ |
Given the following tables: tableA(v1,v2) tableB(v3,v4) tableC(v5,v6) I want to write a query like
I'm using the following code in an attempt to retrieve data from two tables
I'm using the following mysql query to return some data from my database. Currently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.