Answered step by step
Verified Expert Solution
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:
-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 StatusStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started