Of the arts-books and arts-design categories, which one has more podcasts and what is the numerical difference between them?
arts-books' and 'arts-design' are category; numerical difference = Subtract(Count(podcast_id(category = 'arts-books')), Count(podcast_id(category = 'arts-design'))); one has much more podcast refers to Max(Count(podcast_id))
SELECT ( SELECT category FROM categories WHERE category = 'arts-books' OR category = 'arts-design' GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 ) "has more podcasts" , ( SELECT SUM(CASE WHEN category = 'arts-books' THEN 1 ELSE 0 END) - SUM(CASE WHEN category = 'arts-design' THEN 1 ELSE 0 END) FROM categories ) "differenct BETWEEN arts-books and arts-design"
CREATE TABLE runs (
        run_at text not null,
        max_rowid integer not null,
        reviews_added integer not null
    );
CREATE TABLE podcasts (
        podcast_id text primary key,
        itunes_id integer not null,
        slug text not null,
        itunes_url text not null,
        title text not null
    );
CREATE TABLE IF NOT EXISTS "reviews"
(
    podcast_id TEXT    not null
        constraint reviews_podcasts_podcast_id_fk
            references podcasts,
    title      TEXT    not null,
    content    TEXT    not null,
    rating     INTEGER not null,
    author_id  TEXT    not null,
    created_at TEXT    not null
);
CREATE TABLE IF NOT EXISTS "categories"
(
    podcast_id TEXT not null
        constraint categories_podcasts_podcast_id_fk
            references podcasts,
    category   TEXT not null,
    constraint "PRIMARY"
        primary key (podcast_id, category)
);
CREATE INDEX category_podcast_id_idx
    on categories (podcast_id);
