Question: Star Schema Script: create table DimSuppliers ( supplier_id int primary key, supplier_name varchar(30)) create table DimDates ( date_id int primary key, month varchar(10), year varchar(10))

Star Schema Script:

create table DimSuppliers (

supplier_id int primary key,

supplier_name varchar(30))

create table DimDates (

date_id int primary key,

month varchar(10),

year varchar(10))

create table DimCustomers (

customer_id int primary key,

state varchar(30),

zip varchar(12))

create table DimPayments (

payment_id int primary key,

supplier_id int,

customer_id int,

date_id int,

payment_amount money,

foreign key (supplier_id) references DimSuppliers(supplier_id),

foreign key (customer_id) references DimCustomers(customer_id),

foreign key (date_id) references DimDates(date_id))

create table FactBid (

bid_id int primary key,

customer_id int,

date_id int,

bid_amount money,

foreign key (customer_id) references DimCustomers(customer_id),

foreign key (date_id) references DimDates(date_id))

Question:

Using your populated star schema, create DML select statements for the following requirements.

Return the total bid dollar amount by customer zip code.

Return the avg bid dollar amount by customer state.

Return the total bid dollar amount by month.

Return the total bid dollar amount by customer zip code having a total bid dollar amount greater than $100.

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 Databases Questions!