Question: 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:

SQL How to create DML scripts to update table Customers and set

-here's how do Customer_status table looks like:

Customer_Status_Id to the correct value for each of the customers? Data model

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:

for Customer and customer_status: -here's how do Customer_status table looks like: Inactive

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

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!