Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use the following schema, as created in exercise 3 , to express the following queries in SQL. CUSTOMER (CUST_ID CUST_NAMEANNUAL_REVENUE, CUST_TYPE) SHIPMENT (SHIPMENT_#, CUST_ID, WEIGHT,
Use the following schema, as created in exercise 3 , to express the following queries in SQL. CUSTOMER (CUST_ID CUST_NAMEANNUAL_REVENUE, CUST_TYPE) SHIPMENT (SHIPMENT_\#, CUST_ID, WEIGHT, TRUCK_\#, DESTINATION, SHIP_DATE) TRUCK (TRUCK-\#, DRIVER_NAME) CITY (CI'IY-NAME, POPULATION) Simple Queries 4. a. What is the name of customer 433 ? b. What is the destination city of shipment #3244 ? c. What are the truck numbers of trucks that have carried packages (shipments) weighing over 100 pounds? d. Give all data for shipments weighing over 20 pounds. e. Create an alphabetical list of names of customers with more than $10 million in annual revenue. f. What is the customer ID for Wilson Brothers? g. Give names and average monthly revenue of customers having annual revenue exceeding $5 million but less than $10 million. h. Give IDs for customers who have sent packages (shipments) to Chicago, St. Louis, or Baltimore. i. Give names of customers who have sent shipments to cities with names starting with 'C.' j. Give names of customers who have sent shipments to cities with names ending with 'City.' k. Give names of customers that have a capital ' D ' as the third character in their names. 1. Give names of all customers that are retailers
Step 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