steve wang Member
 Since: 02 May 2009 Posts: 1 | Posted 03 May 2009 00:19:07 Hi guys, i'm very new to this type of forum. I have a SQL assignment for a class, and I don't have enough resources to help me figure out some problems, so hopefully I can get some insight here.
These are the tables for the question: (underlined is primary key, italicized is foreign key) Customer (CustID, CustName, AnnualRevenue, CustType) Shipment (ShipmentNumber, CustID, Weight, TruckID, DestinationCity, ShipDate) Truck (TruckID, DriverName) City(CityName, Population)
question: List the names of drivers who have delivered shipments for customers with annual revenue over $30 million to cities with populations over 2 million?
this is what i have so far from it:
SELECT Truck.DriverName FROM Truck, Customer, City WHERE Customer.AnnualRevenue>30,000,000 AND City.Population>2,000,000
I think i have to join the three tables together with another "AND", but I am very lost on how to do that. Can anyone help? I would appreciate it greatly. Thanks Hi guys, i'm very new to this type of forum. I have a SQL assignment for a class, and I don't have enough resources to help me figure out some problems, so hopefully I can get some insight here.
These are the tables for the question: (underlined is primary key, italicized is foreign key) Customer (CustID, CustName, AnnualRevenue, CustType) Shipment (ShipmentNumber, CustID, Weight, TruckID, DestinationCity, ShipDate) Truck (TruckID, DriverName) City(CityName, Population)
question: List the names of drivers who have delivered shipments for customers with annual revenue over $30 million to cities with populations over 2 million?
this is what i have so far from it:
SELECT Truck.DriverName FROM Truck, Customer, City WHERE Customer.AnnualRevenue>30,000,000 AND City.Population>2,000,000
I think i have to join the three tables together with another "AND", but I am very lost on how to do that. Can anyone help? I would appreciate it greatly. Thanks |