lianghsun/bird-text2sql-bench huggingface dataset:
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
Tell the name of the driver who received the shipment on 2017/11/5.

### Hint
shipment on 2017/11/5 refers to ship_date = '2017-11/05'; name refers to first_name, last_name

### SQL
SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_date = '2017-11-05'
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
Show the population of the city which was the destination of shipment no.1398.

### Hint
shipment no. 1398 refers to ship_id = 1398

### SQL
SELECT T2.population FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1398'
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
Provide the ship date of the first shipment to customers in South Carolina.

### Hint
"South Carolina" refers to state = 'SC'; first shipment refers to Min(ship_date)

### SQL
SELECT MIN(T1.ship_date) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'SC'
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
For the shipment received by Leszek Kieltyka on 2017/9/25, what was its weight?

### Hint
on 2017/9/25 refers to ship_date = '2017-09-25'

### SQL
SELECT T1.weight FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Leszek' AND T2.last_name = 'Kieltyka' AND T1.ship_date = '2017-09-25'
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
What is the area of the destination city of shipment No.1346?

### Hint
shipment no. 1346 refers to ship_id = 1346

### SQL
SELECT T2.area FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1346'
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
Provide the weight of the shipment to U-haul Center Of N Syracuse on 2016/9/21.

### Hint
"U-haul Center Of N Syracuse" is the cust_name; on 2016/9/21 refers to ship_date = '2016/09/21'

### SQL
SELECT T1.weight FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.cust_name = 'U-haul Center Of N Syracuse' AND T1.ship_date = '2016-09-21'
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
Who was the driver of truck no.3 on 2016/9/19? Tell the full name.

### Hint
truck no. 3 refers to truck_id = 3; on 2016/9/19 refers to ship_date = '2016-09-19'; full name refers to first_name, last_name

### SQL
SELECT T3.first_name, T3.last_name FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id INNER JOIN driver AS T3 ON T3.driver_id = T2.driver_id WHERE T1.truck_id = '3' AND T2.ship_date = '2016-09-19'
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
Calculate the population density of the city as the destination of shipment no.1369.

### Hint
shipment no. 1369 refers to ship_id = 1369; population density refers to Divide (area, population)

### SQL
SELECT T2.area / T2.population FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1369'
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
What is the average number of shipments done by the Kenworth trucks?

### Hint
"Kenworth" is the make of truck; average = Divide (Count(ship_id where make = 'Kenworth'), Count(truck_id where make = 'Kenworth))

### SQL
SELECT CAST(COUNT(T2.ship_id) AS REAL) / COUNT(DISTINCT T1.truck_id) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T1.make = 'Kenworth'
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
How many pounds did Sue Newell transport during her first shipment?

### Hint
first shipment refers to Min(ship_date); pounds refers to weight

### SQL
SELECT T1.weight FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Sue' AND T2.last_name = 'Newell' ORDER BY T1.ship_date ASC LIMIT 1
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
To whom did the company transport its heaviest shipment?

### Hint
heaviest shipment refers to Max(weight)

### SQL
SELECT T2.cust_name FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id ORDER BY T1.weight DESC LIMIT 1
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
What is the full name of the driver who transported the first shipment of the company?

### Hint
first shipment of the company refers to Min(ship_date); full name refers to first_name, last_name

### SQL
SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id ORDER BY T1.ship_date ASC LIMIT 1
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
In total, how many shipments were transported to Olympic Camper Sales Inc?

### Hint
"Olympic Camper Sales Inc" is the cust_name

### SQL
SELECT COUNT(T2.ship_id) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_name = 'Olympic Camper Sales Inc'
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
How many of the shipments bound for New York City were shipped to Harry's Hot Rod Auto and Truck Accessories?

### Hint
"New York" is the city_name; 'Harry's Hot Rod Auto & Truck Accessories' is the cust_name

### SQL
SELECT COUNT(*) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id WHERE T3.city_name = 'New York' AND T1.cust_name = 'Harry''s Hot Rod Auto & Truck Accessories'
### Database Schema
CREATE TABLE city
(
    city_id    INTEGER
            primary key,
    city_name  TEXT,
    state      TEXT,
    population INTEGER,
    area       REAL
)

CREATE TABLE customer
(
    cust_id        INTEGER
            primary key,
    cust_name      TEXT,
    annual_revenue INTEGER,
    cust_type      TEXT,
    address        TEXT,
    city           TEXT,
    state          TEXT,
    zip            REAL,
    phone          TEXT
)

CREATE TABLE driver
(
    driver_id  INTEGER
            primary key,
    first_name TEXT,
    last_name  TEXT,
    address    TEXT,
    city       TEXT,
    state      TEXT,
    zip_code   INTEGER,
    phone      TEXT
)

CREATE TABLE truck
(
    truck_id   INTEGER
            primary key,
    make       TEXT,
    model_year INTEGER
)

CREATE TABLE shipment
(
    ship_id   INTEGER
            primary key,
    cust_id   INTEGER,
    weight    REAL,
    truck_id  INTEGER,
    driver_id INTEGER,
    city_id   INTEGER,
    ship_date TEXT,
    foreign key (cust_id) references customer(cust_id),
    foreign key (city_id) references city(city_id),
    foreign key (driver_id) references driver(driver_id),
    foreign key (truck_id) references truck(truck_id)
)

### Question
Among the top 5 heaviest shipments, how many shipments were transported via Mack?

### Hint
heaviest shipment refers to Max(weight); via Mack refers to make = 'Mack'

### SQL
SELECT COUNT(T2.ship_id) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T1.make = 'Mack' ORDER BY T2.weight DESC LIMIT 1