RDBMS ASSIGNMENT

40
RDBMS ASSIGNMENT By, Ritam Ghosh A14025

description

SQL queries

Transcript of RDBMS ASSIGNMENT

Page 1: RDBMS ASSIGNMENT

RDBMS ASSIGNMENT

By,Ritam GhoshA14025

Page 2: RDBMS ASSIGNMENT

Listing 1.1: Creating dwid user id

Page 3: RDBMS ASSIGNMENT

Listing 1.2: Creating dw and source databases

Page 4: RDBMS ASSIGNMENT

Listing 1.3: Creating data warehouse tables

Page 5: RDBMS ASSIGNMENT

Listing 2.1: Applying SCD1 to the customer names in customer_dim

Page 6: RDBMS ASSIGNMENT

Listing 2.2: Creating and loading the customer_stg table

Page 7: RDBMS ASSIGNMENT

Listing 2.3: Applying SCD2 to product_name and product_category in the product_dim table

Page 8: RDBMS ASSIGNMENT

Listing 2.4: Creating the product_stg table

Page 9: RDBMS ASSIGNMENT

Listing 2.5: Loading products to its staging table

Page 10: RDBMS ASSIGNMENT

Listing 3.2: Querying across all dimensions

Page 11: RDBMS ASSIGNMENT

Listing 3.3: Querying across the date, product, and order

Page 12: RDBMS ASSIGNMENT

Listing 3.5: Querying across the date and order

Page 13: RDBMS ASSIGNMENT

Listing 4.2: Daily Aggregation

Page 14: RDBMS ASSIGNMENT

Listing 4.3: Annual aggregation

Page 15: RDBMS ASSIGNMENT

Listing 4.5: Specific query (quarterly sales in Mechanicsburg)

Page 16: RDBMS ASSIGNMENT

Listing 4.6: Inside-out - Monthly Product Performer

Page 17: RDBMS ASSIGNMENT

Listing 4.7: Inside-out (loyal customer)

Page 18: RDBMS ASSIGNMENT

Listing 5.3: Data for testing Push mode

Page 19: RDBMS ASSIGNMENT

Listing 6.1: Stored procedure to pre-populate the date dimension

Page 20: RDBMS ASSIGNMENT

Listing 6.2: Daily date population

Page 21: RDBMS ASSIGNMENT

Listing 6.3: Loading dates from the source

Page 22: RDBMS ASSIGNMENT

Listing 8.1: Daily dw regular population

Page 23: RDBMS ASSIGNMENT

Listing 8.2: Adding sales orders

Page 24: RDBMS ASSIGNMENT

Listing 10.2: Adding the order quantity column

Page 25: RDBMS ASSIGNMENT

Listing 10.3: Revised daily DW regular population

Page 26: RDBMS ASSIGNMENT

Listing 10.5: Adding nine sales orders with order quantities

Page 27: RDBMS ASSIGNMENT

Listing 11.2: Populating the promotion indicator

Page 28: RDBMS ASSIGNMENT

Listing 12.2: The revised date pre-population script

Page 29: RDBMS ASSIGNMENT

Listing 12.3: PA customers

Page 30: RDBMS ASSIGNMENT

Listing 12.4: Non-PA customers

Page 31: RDBMS ASSIGNMENT

Listing 12.6: Adding two customers

Page 32: RDBMS ASSIGNMENT

Listing 13.1: Adding the request_delivery_date_sk column

Page 33: RDBMS ASSIGNMENT

Listing 13.2: The revised daily DW regular population

Page 34: RDBMS ASSIGNMENT

Listing 13.3: Adding the request_delivery_date column to the sales_order table

Page 35: RDBMS ASSIGNMENT

Listing 13.4: Adding three sales orders with request delivery dates

Page 36: RDBMS ASSIGNMENT

Listing 13.5: Daily sales summary

Page 37: RDBMS ASSIGNMENT

Listing 13.6: Creating date views

Page 38: RDBMS ASSIGNMENT

Listing 13.7: Database view role playing

Page 39: RDBMS ASSIGNMENT

13.8 the final

Page 40: RDBMS ASSIGNMENT

THANK YOU