Chinastark/bird_dataset huggingface dataset:
Database: shipping
Note: "Kenworth" is the make of truck; average = Divide (Count(ship_id where make = 'Kenworth'), Count(truck_id where make = 'Kenworth));
Question: What is the average number of shipments done by the Kenworth trucks?
SQL: SELECT cast(count(shipment.ship_id) AS REAL) / count(DISTINCT truck.truck_id) FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id WHERE truck.make = 'Kenworth'
Database: shipping
Note: first shipment refers to Min(ship_date); pounds refers to weight;
Question: How many pounds did Sue Newell transport during her first shipment?
SQL: SELECT shipment.weight FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE driver.first_name = 'Sue' AND driver.last_name = 'Newell' ORDER BY shipment.ship_date ASC LIMIT 1
Database: shipping
Note: heaviest shipment refers to Max(weight);
Question: To whom did the company transport its heaviest shipment?
SQL: SELECT customer.cust_name FROM shipment INNER JOIN customer ON shipment.cust_id = customer.cust_id ORDER BY shipment.weight DESC LIMIT 1
Database: shipping
Note: first shipment of the company refers to Min(ship_date); full name refers to first_name, last_name;
Question: What is the full name of the driver who transported the first shipment of the company?
SQL: SELECT driver.first_name, driver.last_name FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id ORDER BY shipment.ship_date ASC LIMIT 1
Database: shipping
Note: "Olympic Camper Sales Inc" is the cust_name;
Question: In total, how many shipments were transported to Olympic Camper Sales Inc?
SQL: SELECT count(shipment.ship_id) FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE customer.cust_name = 'Olympic Camper Sales Inc'
Database: shipping
Note: "New York" is the city_name; 'Harry's Hot Rod Auto & truck Accessories' is the cust_name;
Question: How many of the shipments bound for New York City were shipped to Harry's Hot Rod Auto and Truck Accessories?
SQL: SELECT count(*) FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id INNER JOIN city ON city.city_id = shipment.city_id WHERE city.city_name = 'New York' AND customer.cust_name = 'Harry''s Hot Rod Auto & Truck Accessories'
Database: shipping
Note: heaviest shipment refers to Max(weight); via Mack refers to make = 'Mack';
Question: Among the top 5 heaviest shipments, how many shipments were transported via Mack?
SQL: SELECT count(shipment.ship_id) FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id WHERE truck.make = 'Mack' ORDER BY shipment.weight DESC LIMIT 1
Database: shipping
Note: least populated city refers to Min(population); fullname refers to first_name, last_name; most shipment refers to driver_id where Max(Count (ship_id));
Question: What is the full name of the driver who delivered the most shipments to the least populated city?
SQL: SELECT driver.first_name, driver.last_name FROM driver INNER JOIN shipment ON driver.driver_id = shipment.driver_id INNER JOIN city ON city.city_id = shipment.city_id GROUP BY driver.first_name, driver.last_name, city.population HAVING city.population = max(city.population) ORDER BY count(*) DESC LIMIT 1
Database: shipping
Note: weight of no more than 1000 pounds refers to weight < 1000; oldest truck refers to Min (model_year);
Question: How many shipments with weight of no more than 1,000 pounds were shipped by the oldest truck?
SQL: SELECT count(*) FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id WHERE shipment.weight < 1000 ORDER BY truck.model_year ASC LIMIT 1
Database: shipping
Note: customer with the most number of shipment refers to cust_id where Max(Count(ship_id));
Question: How much is the annual revenue of the customer with the most number of shipments?
SQL: SELECT customer.annual_revenue FROM shipment INNER JOIN customer ON shipment.cust_id = customer.cust_id GROUP BY shipment.cust_id ORDER BY count(shipment.cust_id) DESC LIMIT 1
Database: shipping
Note: "Downey" is the city_name; 'California' is the state, whose abbreviation is CA; in 2016 refers to year(ship_date) = 2016,;
Question: Among the shipments for Downey, how many shipments were shipped to California in 2016?
SQL: SELECT count(*) FROM shipment INNER JOIN city ON shipment.city_id = city.city_id INNER JOIN customer ON customer.cust_id = shipment.cust_id WHERE city.city_name = 'Downey' AND strftime('%Y', shipment.ship_date) = '2016' AND customer.state = 'CA'
Database: shipping
Note: "North Las Vegas" is the city_name;
Question: How many shipments did Holger Nohr transport to North Las Vegas overall?
SQL: SELECT count(*) FROM driver INNER JOIN shipment ON driver.driver_id = shipment.driver_id INNER JOIN city ON city.city_id = shipment.city_id WHERE driver.first_name = 'Holger' AND driver.last_name = 'Nohr' AND city.city_name = 'North Las Vegas'
Database: shipping
Note: most densely populated city refers to Max(Divide(area, population));
Question: How many shipments were shipped to the most densely populated city?
SQL: SELECT count(*) FROM shipment INNER JOIN city ON shipment.city_id = city.city_id ORDER BY city.area / city.population DESC LIMIT 1
Database: shipping
Note: "Texas" refers to state = 'TX'; 'manufacturer' is the cust_type; percentage = Divide (Count(cust_id where state = 'TX'), Count(cust_id)) * 100;
Question: Determine the percentage of manufacturers who are from Texas among all of Lorenzo's customers.
SQL: SELECT cast(sum(CASE WHEN cust_type = 'manufacturer' THEN 1 ELSE 0 END) AS REAL) * 100 / count(*) FROM customer WHERE state = 'TX'
Database: shipping
Note: "San Mateo" is the city_name; in 2016 refers to Cast(ship_date as DATE) = 2016;
Question: Identify the total weight of shipments transported to San Mateo, California, in 2016.
SQL: SELECT sum(shipment.weight) FROM shipment INNER JOIN city ON shipment.city_id = city.city_id WHERE city.city_name = 'San Mateo' AND strftime('%Y', shipment.ship_date) = '2016'
Database: shipping
Note: transported in 2016 refers to CAST(ship_date as DATE) = 2016; 'Peterbilt' is the make; newest refers to Max(model_year);
Question: Identify the total weight of shipments transported in 2016 by the newest Peterbilt.
SQL: SELECT sum(shipment.weight) FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id WHERE truck.make = 'Peterbilt' AND strftime('%Y', shipment.ship_date) = '2016' ORDER BY truck.model_year DESC LIMIT 1
Database: shipping
Note: "Boston" is the city_name; maximum weight refers to Max(weight); customer refers to cust_name;
Question: What was the maximum weight of the shipment carried to Boston? Name the customer of that shipment.
SQL: SELECT shipment.weight, customer.cust_name FROM shipment INNER JOIN customer ON shipment.cust_id = customer.cust_id INNER JOIN city ON city.city_id = shipment.city_id WHERE city.city_name = 'Boston' ORDER BY shipment.weight DESC LIMIT 1
Database: shipping
Note: shipment no. 1002 refers to ship_id = 1002; where shipment was headed refers to city_name;
Question: Where was shipment no. 1002 headed?
SQL: SELECT city.city_name FROM shipment INNER JOIN city ON shipment.city_id = city.city_id WHERE shipment.ship_id = '1002'
Database: shipping
Note: "Mack" is the make; oldest refers to Min(model_year); average shipment weight refers to AVG(weight);
Question: What is the average shipment weight carried by the oldest Mack?
SQL: SELECT avg(shipment.weight) FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id WHERE truck.make = 'Mack'
Database: shipping
Note: "New York" is the city_name; in February 2016 refers to ship_date LIKE '2016-02%'; full name refers to first_name, last_name;
Question: Identify the full name of the driver who delivered a shipment to the city of New York in February 2016.
SQL: SELECT driver.first_name, driver.last_name FROM shipment INNER JOIN city ON shipment.city_id = city.city_id INNER JOIN driver ON driver.driver_id = shipment.driver_id WHERE city.city_name = 'New York' AND shipment.ship_date LIKE '2016-02%'
Database: shipping
Note: "Oak Park" is the city_name; customer name refers to cust_name;
Question: Name the customer who sent the shipment to Oak Park.
SQL: SELECT customer.cust_name FROM shipment INNER JOIN customer ON shipment.cust_id = customer.cust_id INNER JOIN city ON city.city_id = shipment.city_id WHERE city.city_name = 'Oak Park'
Database: shipping
Note: "Huntsville" is the city_name; in 2016 refers to Cast(ship_date AS DATE) = 2016; number of shipment refers to Count(ship_id);
Question: Determine the number of shipments delivered by Andrea Simons to Huntsville in 2016.
SQL: SELECT count(*) FROM shipment INNER JOIN city ON shipment.city_id = city.city_id INNER JOIN driver ON driver.driver_id = shipment.driver_id WHERE driver.first_name = 'Andrea' AND driver.last_name = 'Simons' AND city.city_name = 'Huntsville' AND strftime('%Y', shipment.ship_date) = '2016'
Database: shipping
Note: shipment data was for 24 months in 2016 and 2017 respectively; deliver per month on average refers to Divide(Count(ship_id), Multiply (24, Count(driver_id)));
Question: How many shipments does each driver deliver per month on average?
SQL: SELECT cast(count(*) AS REAL) / (12 * count(driver.driver_id)) FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id
Database: shipping
Note: "Sunguard Window Tinting & truck Accessories" is the cust_name; weight exceed 10,000 pounds refers to weight >= 10000; in 2017 refers to Cast(ship_date AS DATE) = 2017; percentage = Divide (Sum(weight >= 10000), Sum(weight)) * 100;
Question: Among all shipments placed by Sunguard Window Tinting & Truck Accessories in 2017, identify the percentage of shipments whose weight exceeded 10,000 pounds.
SQL: SELECT cast(sum(CASE WHEN shipment.weight >= 10000 THEN 1 ELSE 0 END) AS REAL) * 100 / count(*) FROM shipment INNER JOIN customer ON shipment.cust_id = customer.cust_id WHERE customer.cust_name = 'Sunguard Window Tinting & Truck Accessories' AND strftime('%Y', shipment.ship_date) = '2017'
Database: shipping
Note: "Autoware Inc" is the cust_name; percentage = Divide (Count(ship_id where cust_name = 'Autoware Inc'), Count(ship_id)) * 100;
Question: Among all shipments delivered by Sue Newel, identify the percentage of shipments that were placed by Autoware Inc.
SQL: SELECT cast(sum(CASE WHEN customer.cust_name = 'Autoware Inc' THEN 1 ELSE 0 END) AS REAL) * 100 / count(*) AS per FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id INNER JOIN customer ON customer.cust_id = shipment.cust_id WHERE driver.first_name = 'Sue' AND driver.last_name = 'Newell'
Database: shipping
Note: "New Jersey" is the state; transported weight greater than 20000 refers to Sum(weight) > 20000;
Question: How many cities which belong to New Jersey have transported weight greater than 20000?
SQL: SELECT count(*) FROM ( SELECT city.city_id AS cityid FROM shipment INNER JOIN city ON shipment.city_id = city.city_id WHERE city.state = 'New Jersey' GROUP BY city.city_id HAVING sum(shipment.weight) > 20000 )
Database: shipping
Note: population is larger than 50000 refers to population > 50000;
Question: How many cities whose polulation is larger than 50000 pounds have shipment in 2017?
SQL: SELECT count(*) FROM city INNER JOIN shipment ON city.city_id = shipment.city_id WHERE city.population > 50000 AND strftime('%Y', shipment.ship_date) = '2017'
Database: shipping
Note: "Peterbilt" is the make;
Question: State the weight of shipments transported by Peterbilt.
SQL: SELECT shipment.weight FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id WHERE make = 'Peterbilt'
Database: shipping
Note: shipment id 1003 refers to ship_id = 1003;
Question: What is the model year of the truck used in shipment id 1003?
SQL: SELECT truck.model_year FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id WHERE shipment.ship_id = '1003'
Database: shipping
Note: shipment id 1011 refers to ship_id = 1011; brand of truck refers to make;
Question: What is the brand of truck used in shipment id 1011?
SQL: SELECT truck.make FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id WHERE shipment.ship_id = '1011'
Database: shipping
Note: shipment id 1028 refers to ship_id = 1028;
Question: What is the first name of the driver who transported shipment id 1028?
SQL: SELECT driver.first_name, driver.last_name FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE shipment.ship_id = 1028
Database: shipping
Note: shipment id 1055 refers to ship_id = 1055;
Question: List out the state of driver who transported the shipment id 1055.
SQL: SELECT driver.state FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE shipment.ship_id = '1055'
Database: shipping
Note: shipment with weight greater than 50000 pounds refers to Sum(weight) > 50000;
Question: State the address of drivers who transported the shipment with weight greater than 50000 pounds.
SQL: SELECT driver.address FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id GROUP BY driver.driver_id HAVING sum(shipment.weight) > 50000
Database: shipping
Note: on 3/2/2016 refers to ship_date = '2016-02-03'; full name refers to first_name, last_name;
Question: Give the full name of driver who transported the items on 3/2/2016.
SQL: SELECT driver.first_name, driver.last_name FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE shipment.ship_date = '2016-03-02'
Database: shipping
Note: weight of less than 65000 pounds refers to weight < 65000; average annual revenue refers to AVG(annual_revenue);
Question: What is the average annual revenue of customers who have shipment weight of less than 65000 pounds?
SQL: SELECT avg(customer.annual_revenue) FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE shipment.weight < 65000
Database: shipping
Note: "wholesaler" is the cust_type; weight of not greater than 70000 pounds refers to weight < 70000; percentage = Divide (Count(cust_id where weight < 70000), Count(cust_id)) * 100;
Question: What is the percentage of wholesaler customers who have shipment weight of not greater than 70000 pounds?
SQL: SELECT cast(sum(CASE WHEN shipment.weight < 70000 THEN 1 ELSE 0 END) AS REAL) * 100 / count(*) FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE customer.cust_type = 'wholesaler'
Database: shipping
Note: shipment id 1088 refers to ship_id = 1088;
Question: What is the last name of driver who transported shipment id 1088?
SQL: SELECT driver.last_name FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE shipment.ship_id = '1088'
Database: shipping
Note: shipment weight of greater than 20000 pounds refers to Sum(weight) > 20000;
Question: Give the phone of drivers who transported shipment weight of greater than 20000 pounds.
SQL: SELECT driver.phone FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id GROUP BY driver.driver_id HAVING sum(shipment.weight) > 20000
Database: shipping
Note: shipment id 1055 refers to ship_id = 1055; brand refers to make; model refers to model_year;
Question: What is the brand and model of truck used in shipment id 1055?
SQL: SELECT truck.make, truck.model_year FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id WHERE shipment.ship_id = '1055'
Database: shipping
Note: manufactured in year 2009 refers to model_year = 2009;
Question: How many trucks were manufactured in year 2009?
SQL: SELECT count(truck_id) FROM truck WHERE model_year = 2009
Database: shipping
Note: "manufacturer" is the cust_type;
Question: How many customers are manufacturer?
SQL: SELECT count(*) FROM customer WHERE cust_type = 'manufacturer'
Database: shipping
Note: "retailer" is the cust_type; live in California refers to state = 'CA';
Question: How many customers who live in California that are retailers?
SQL: SELECT count(*) FROM customer WHERE cust_type = 'retailer' AND state = 'CA'
Database: shipping
Note: "Connecticut" is the state;
Question: How many cities are in Connecticut?
SQL: SELECT count(*) FROM city WHERE state = 'Connecticut'
Database: shipping
Note: in California refers to state = 'CA'; most populated city refers to Max(population);
Question: What is the most populated city in California?
SQL: SELECT city_name FROM city WHERE state = 'California' AND population = ( SELECT max(population) FROM city WHERE state = 'California' )
Database: shipping
Note: "Klett & Sons Repair" is the cust_name;
Question: What is the annual revenue of Klett & Sons Repair?
SQL: SELECT annual_revenue FROM customer WHERE cust_name = 'Klett & Sons Repair'
Database: shipping
Note: lightest weight refers to Min(weight); full name refers to first_name, last_name;
Question: Who is the driver that transported the lightest weight of shipment? Provide the full name of the driver.
SQL: SELECT driver.first_name, driver.last_name FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id ORDER BY shipment.weight ASC LIMIT 1
Database: shipping
Note: living in California refers to state = 'CA'; in year 2016 refers to CAST(ship_date AS DATE) = 2016;
Question: How many shipments were shipped to customers living in California in year 2016?
SQL: SELECT count(*) AS per FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE strftime('%Y', shipment.ship_date) = '2016' AND customer.state = 'CA'
Database: shipping
Note: brand of truck refers to make;
Question: What is the brand of the truck that is used to ship by Zachery Hicks?
SQL: SELECT DISTINCT truck.make FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id INNER JOIN driver ON driver.driver_id = shipment.driver_id WHERE driver.first_name = 'Zachery' AND driver.last_name = 'Hicks'
Database: shipping
Note: shipment in February 2017 refers to ship_date LIKE '2017-02-%'; name of customer refers to cust_name;
Question: List all the name of the customers that received a shipment in February 2017.
SQL: SELECT customer.cust_name FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE shipment.ship_date LIKE '2017-02%'
Database: shipping
Note: "Klett & Sons Repair" is the cust_name; brand of truck refers to make; name of driver refers to first_name, last_name;
Question: Provide the brand of the truck and the name of the driver that transported goods in Klett & Sons Repair.
SQL: SELECT truck.make, driver.first_name, driver.last_name FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id INNER JOIN truck ON truck.truck_id = shipment.truck_id INNER JOIN driver ON driver.driver_id = shipment.driver_id WHERE customer.cust_name = 'Klett & Sons Repair'
Database: shipping
Note: shipment ID refers to ship_id; heaviest shipment refers to Max(weight);
Question: What is the shipment ID of the heaviest shipment that Zachery Hicks transported?
SQL: SELECT shipment.ship_id FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE driver.first_name = 'Zachery' AND driver.last_name = 'Hicks' ORDER BY shipment.weight DESC LIMIT 1
Database: shipping
Note: "New York" is the city_name; in 2016 refers to CAST(ship_date AS DATE) = 2016;
Question: How many shipments did Zachery Hicks transport goods to New York in the year 2016?
SQL: SELECT count(*) FROM city INNER JOIN shipment ON city.city_id = shipment.city_id INNER JOIN driver ON driver.driver_id = shipment.driver_id WHERE driver.first_name = 'Zachery' AND driver.last_name = 'Hicks' AND city.city_name = 'New York' AND strftime('%Y', shipment.ship_date) = '2016'
Database: shipping
Note: in 2016 refers to CAST(ship_date AS DATE) = 2016; make = 'Peterbilt' means headquarter is 'Texas (TX)', make = 'Mack' means headquarter is 'North Carolina (NC)', make = 'Kenworth' means headquarter is 'Washington (WA)'; highest shipment refers to MAX(COUNT(ship_id));
Question: Which headquarter's truck has the highest shipments in year 2016?
SQL: SELECT CASE WHEN truck.make = 'Peterbilt' THEN 'Texas (TX)' WHEN truck.make = 'Mack' THEN 'North Carolina (NC)' WHEN truck.make = 'Kenworth' THEN 'Washington (WA)' END AS "result" FROM shipment INNER JOIN truck ON shipment.truck_id = truck.truck_id WHERE cast(shipment.ship_date AS DATE) = 2016 GROUP BY truck.make ORDER BY count(shipment.ship_id) DESC LIMIT 1
Database: shipping
Note: "California" is the state; least populated city refers to Min(population);
Question: How many shipments were shipped to the least populated city in California?
SQL: SELECT count(city.city_name) FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id INNER JOIN city ON city.city_id = shipment.city_id WHERE city.state = 'California' ORDER BY city.population ASC LIMIT 1
Database: shipping
Note: heaviest shipment refers to Max(weight); city refers to city_name;
Question: In which city did the heaviest shipment transported?
SQL: SELECT city.city_name FROM shipment INNER JOIN city ON shipment.city_id = city.city_id ORDER BY shipment.weight DESC LIMIT 1
Database: shipping
Note: city refers to city_name;
Question: List all the cities where Zachery Hicks transported goods.
SQL: SELECT DISTINCT city.city_name FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id INNER JOIN city ON shipment.city_id = city.city_id WHERE driver.first_name = 'Zachery' AND driver.last_name = 'Hicks'
Database: shipping
Note: in year 2017 refers to CAST(ship_date AS DATE) = 2017; percentage = Divide (Count(ship_id where first_name = 'Zachery' AND last_name = 'Hicks'), Count(ship_id)) * 100;
Question: Calculate the average number of shipments that Zachery Hicks shipped in year 2017.
SQL: SELECT cast(sum(CASE WHEN driver.first_name = 'Zachery' AND driver.last_name = 'Hicks' THEN shipment.ship_id ELSE 0 END) AS REAL) * 100 / count(*) FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE strftime('%Y', shipment.ship_date) = '2017'
Database: shipping
Note: "California" is the state; in 2016 refers to CAST (ship_date AS DATE) = 2016; percentage = Divide (Sum(weight where first_name = 'Zachery' AND last_name = 'Hicks'), Sum(weight)) * 100;
Question: Calculate the percentage of the weight of goods being transported by Zachery Hicks to California in year 2016.
SQL: SELECT cast(sum(CASE WHEN driver.first_name = 'Zachery' AND driver.last_name = 'Hicks' THEN shipment.weight ELSE 0 END) AS REAL) * 100 / sum(shipment.weight) FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE strftime('%Y', shipment.ship_date) = '2016'
Database: shipping
Question: How many shipments were shipped by the driver named Zachary Hicks?
SQL: SELECT count(*) FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE shipment.driver_id = 23
Database: shipping
Note: city with largest area refers to Max(area);
Question: What is the ship ID of shipments shipped to the city with the largest area?
SQL: SELECT shipment.ship_id FROM shipment INNER JOIN city ON shipment.city_id = city.city_id ORDER BY city.area DESC LIMIT 1
Database: shipping
Note: least populated city refers to Min(population); name refers to first_name, last_name;
Question: List the drivers who shipped the shipments to the least populated city.
SQL: SELECT driver.first_name, driver.last_name FROM shipment INNER JOIN city ON shipment.city_id = city.city_id INNER JOIN driver ON driver.driver_id = shipment.driver_id ORDER BY city.population ASC LIMIT 1
Database: shipping
Note: "Cicero" is the city; 'Illinois' is the state;
Question: Among the shipments shipped to Cicero, Illinois, how many shipments weighed between 9,000 to 15,000?
SQL: SELECT count(*) FROM shipment INNER JOIN city ON shipment.city_id = city.city_id WHERE city.city_name = 'Cicero' AND city.state = 'Illinois' AND shipment.weight BETWEEN 9000 AND 15000
Database: shipping
Question: What model year of truck delivered the ship ID 1233?
SQL: SELECT truck.model_year FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id WHERE shipment.ship_id = '1233'