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:

-here's how do Customer_status table looks like:

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:

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
Get step-by-step solutions from verified subject matter experts
