Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

SQL How to create DML scripts to update table Customers and set Customer_Status_Id to the correct value for each of the customers? Data model for

SQL

How to create DML scripts to update table Customers and set Customer_Status_Id to the correct value for each of the customers?

Data model for Customer and customer_status:

image text in transcribed

-here's how do Customer_status table looks like:

image text in transcribed

Inactive Customers => Have 0 orders

Active Customers => Have between 1 and 3 orders

Very Active Customers => Have 4 or more orders

-here's how many orders that each customer placed:

image text in transcribed

CUSTOMERS CUSTOMER ID NUMERIC CUSTOMER FIRST NAME VARCHAR (50 BYTE) CUSTOMER LAST NAME VARCHAR (50 BYTE) CUSTOMER ADDRESS VARCHAR 255 BYTE) CUSTOMER CITY VARCHAR (50 BYTE) O CUSTOMER STATE CHAR BYTE) CUSTOMER ZIP VARCHAR 20 BYTE) CUSTOMER PHONE VARCHAR 30 BYTE) CUSTOMER FAX F Customer Status Id nteger CUSTOMERS PK (CUSTOMER ID) Customer Customer Status Customer Status Id integer CustomeryStatus name VARCHAR Customer Status PK (Customer Status

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

More Books

Students also viewed these Databases questions

Question

2. What potential barriers would you encourage Samuel to avoid?

Answered: 1 week ago

Question

6. How would you design your ideal position?

Answered: 1 week ago