Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL C. Your company deals with many international customers. Therefore, each time someone wants to lookup the total revenue for an international customer, a conversion

SQL

C. Your company deals with many international customers. Therefore, each time someone wants to lookup the total revenue for an international customer, a conversion rate must be calculated. To save your employees time, you decide to create a materialized view.

Q.PIII.C1. Create a materialized view that stores the total revenue for each customer, and the conversion rate for at least 5 different (actual) currencies of your choice.

You can assume that original amount is in USD. Also note that you can retrieve the revenue from the LINEORDER table, which is different than the TotalOrderPrice stored in CUSTOMER_T2.

Paste in browser:

http://dbgroup.cdm.depaul.edu/CSC355_Fall2018/FinalProjectData.zip

Schemas:

create table customer_t1(

c_custkey integer not null,

c_name varchar(25) not null,

c_address varchar(25) not null,

c_city varchar(10) not null

);

create table customer_t2(

c_custkey integer not null,

c_nation varchar(15) not null,

c_region varchar(12) not null,

c_phone varchar(15) not null,

c_mktsegment varchar(10) not null,

c_totalorderprice integer

);

create table lineorder( lo_orderkey integer not null, lo_linenumber integer not null, lo_custkey integer not null, lo_partkey integer not null, lo_suppkey integer not null, lo_orderdate integer not null, lo_orderpriority varchar(15) not null, lo_shippriority varchar(1) not null, lo_quantity integer not null, lo_extendedprice integer not null, lo_ordertotalprice integer not null, lo_discount integer not null, lo_revenue integer not null, lo_supplycost integer not null, lo_tax integer not null, lo_commitdate integer not null, lo_shipmode varchar(10) not null );

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Harness The Power Of Big Data The IBM Big Data Platform

Authors: Paul Zikopoulos, David Corrigan James Giles Thomas Deutsch Krishnan Parasuraman Dirk DeRoos Paul Zikopoulos

1st Edition

0071808183, 9780071808187

More Books

Students also viewed these Databases questions

Question

You are to meet him on friday at the un building in nyc.

Answered: 1 week ago