Which city and state produces the most and least bitter beer, and what is the difference in bitterness between the two? List also the names of the beer.
The more IBU, the more bitter the beer is, most bitter means highest IBU; The less IBU, the less bitter the beer is, least bitter means lowest IBU
SELECT T1.state, T1.city, T2.name, T2.ibu FROM breweries AS T1 INNER JOIN beers AS T2 ON T1.id = T2.brewery_id GROUP BY T1.state, T1.city, T2.name, T2.ibu HAVING MAX(ibu) AND MIN(ibu) LIMIT 2
CREATE TABLE breweries
(
    id    INTEGER          not null
        primary key,
    name  TEXT null,
    city  TEXT null,
    state TEXT null
);
CREATE TABLE IF NOT EXISTS "beers"
(
    id         INTEGER not null
        primary key,
    brewery_id INTEGER not null
        constraint beers_ibfk_1
            references breweries,
    abv        REAL,
    ibu        REAL,
    name       TEXT    not null,
    style      TEXT,
    ounces     REAL    not null
);
CREATE INDEX brewery_id
    on beers (brewery_id);
