Question: How would i go and create and SQL Query statements for these f. g. INNER JOIN: retrieve LastName, FirstName from DimCustomer table, total Extended Amount

How would i go and create and SQL Query statements for these

How would i go and create and SQL Query

f. g. INNER JOIN: retrieve LastName, FirstName from DimCustomer table, total Extended Amount from FactInternetSales with CustomerRevenue as the column name in the result window (this requires an inner join between the two tables with the column Customerkey as the joining column from each table), group the results by LastName, FirstName and order the results by CustomerRevenue. The first 15 results are shown below: Last Name First Name Collins Alex Bennett Abigail Taylor Dylan Morgan Marcus Peterson Melanie Bryant Natalie [I Moms Abigail Kumar Brad Sanders Cody Miller Hunter Rivera Natalie She Michele Lopez Monica Sherman Richardson Julia 1 46955WN. 2 3 7 8 9 10 11 12 13 14 15 Megan CustomerRevenue 2.29 2.29 2.29 2.29 2.29 2.29 2.29 2.29 2.29 2.29 2.29 3.99 3.99 3.99 3.99 LEFT OUTER JOIN: retrieve ProductKey, English ProductName, English Description from the table DimProduct and ProductKey, CultureName, Product Description from the table FactAdditional International Product Description. Because Product Key exists in both tables. In the SELECT clause, you prefix the table name to the ProductKey column: DimProduct.ProductKey, FactAdditionalInternational Product Description.Productkey. Other columns only exist in one table, they do not need table name prefix. We want all records returned from the table DimProduct no matter a record has or has not a corresponding record in the table FactAdditional International Product Description, which means that you need to use the LEFT OUTER JOIN based on DimProduct.ProductKey-FactAdditionalInternational Product Description.ProductKey. (6 columns and 15537 rows). NOTE the first 209 records do not have the values for the three columns from the table FactAdditionalInternational Product Description because there are no matching Product Keys in FactAdditional International Product Description for those records in DimProduct

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!