Question: SQL QUERY HELP PLEASE These queries use the Lorenzo Shipping Company database as shown in the figure below. Lorenzo Shipping Company is an over-the-road shipping
SQL QUERY HELP PLEASE
These queries use the Lorenzo Shipping Company database as shown in the figure below. Lorenzo Shipping Company is an over-the-road shipping company that moves heavy freight from city to city. Typical weights of a load are in the hundreds or thousands of pounds. The structure of the database is simple in order to facilitate understanding and writing of solution queries. Be sure that you understand the database structure before attempting to write the SQL queries.
The database consists of five tables: Customer, Shipment, Truck, Drive, and City. The key symbol indicates which attribute is the key field for the table. The relationship lines indicate foreign keys. Each customer can have many shipments, and each shipment is for a single customer. Each shipment is delivered by a single truck, but a truck will have many shipments. Each shipment is delivered by a single driver, but a driver can deliver many shipments. Each shipmant is to a particular city, but a city will have many shipments.
For each information request below, formulate a single SQL query to produce the required information. In each case, you should display only the columns requested. Be sure that your queries do not produce duplicate records unless otherwise directed.
How many different customer types are there in the database? Label the column Number_Types.
For each city what is the maximum weight of a shipment sent to that city? Use city_ID to identify each city. Label the maximum weight column as Max_Weight. (Hint: Use a group by.)

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
