db_id
stringclasses
66 values
question
stringlengths
24
325
evidence
stringlengths
1
673
gold_query
stringlengths
23
804
db_schema
stringclasses
66 values
movie_platform
What is the name of the movie that was rated recently by user 57756708?
user 57756708 refers to user_id = 57756708; rated recently refers to MAX(rating_timestamp_utc)
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 57756708 ORDER BY T1.rating_timestamp_utc DESC LIMIT 1
CREATE TABLE ratings_users ( user_cover_image_url TEXT, -- user_avatar_image_url TEXT, -- rating_date_utc TEXT, -- user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_id INTEGER references lists_users (user_id), -- ); CREATE TABLE movies ( director_name TEXT, -- movie_title TEXT, -- director_id TEXT, -- movie_image_url TEXT, -- movie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 director_url TEXT, -- movie_popularity INTEGER, -- movie_url TEXT, -- movie_release_year INTEGER, -- movie_id INTEGER not null primary key, ); CREATE TABLE lists ( list_creation_timestamp_utc TEXT, -- list_third_image_url TEXT, -- list_cover_image_url TEXT, -- list_description TEXT, -- list_movie_number INTEGER, -- list_first_image_url TEXT, -- user_id INTEGER references lists_users (user_id), -- list_title TEXT, -- list_comments INTEGER, -- list_second_image_url TEXT, -- list_update_timestamp_utc TEXT, -- list_id INTEGER not null primary key, list_url TEXT, -- list_followers INTEGER, -- ); CREATE TABLE lists_users ( list_update_date_utc TEXT, -- user_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 user_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 user_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 foreign key (list_id) references lists(list_id), foreign key (user_id) references lists(user_id), user_avatar_image_url TEXT, -- user_cover_image_url TEXT, -- primary key (user_id, list_id), user_id INTEGER not null, -- user_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 list_id INTEGER not null, -- list_creation_date_utc TEXT, -- ); CREATE TABLE ratings ( user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 movie_id INTEGER, -- rating_url TEXT, -- user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 foreign key (rating_id) references ratings(rating_id), critic TEXT, -- user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 foreign key (movie_id) references movies(movie_id), foreign key (user_id) references lists_users(user_id), foreign key (user_id) references lists_users(user_id), rating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 critic_likes INTEGER, -- foreign key (user_id) references ratings_users(user_id), foreign key (user_id) references ratings_users(user_id), rating_id INTEGER, -- rating_timestamp_utc TEXT, -- user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 critic_comments INTEGER, -- user_id INTEGER, -- );
food_inspection
Provide the name of the business which had the most number of inspections because of complaint.
the most number of inspections because of complaint refers to type = 'Complaint' where MAX(business_id);
SELECT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.type = 'Complaint' GROUP BY T2.name ORDER BY COUNT(T1.business_id) DESC LIMIT 1
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
What is the name of the podcast in which a commentor left a comment with the title 'Long time listener, calling it quits?' Include the URL of the podcast as well.
comment refers to review; 'Long time listener, calling it quits' is the title of review;  name of the podcast refers to title of podcast; URL refers to itunes_url
SELECT podcast_id, itunes_url FROM podcasts WHERE podcast_id = ( SELECT podcast_id FROM reviews WHERE title = 'Long time listener, calling it quits' )
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
olympics
What are the names of the events under Art Competitions?
Art Competitions refer to sport_name = 'Art Competitions'; names of events refers to event_name;
SELECT T2.event_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T1.sport_name = 'Art Competitions'
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
public_review_platform
What is the average number of review received by each business given that the user is an elite?
average review = Divide(Count(user_id), Count(business_id))
SELECT CAST(COUNT(T1.user_id) AS REAL) / COUNT(DISTINCT T1.business_id) FROM Reviews AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
movie_platform
Which 1988 movie got the most ratings?
1988 movie refers to movie_release_year = '1998'; most ratings refers to MAX(rating_score)
SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year = 1988 ORDER BY T1.rating_score DESC LIMIT 1
CREATE TABLE ratings_users ( user_cover_image_url TEXT, -- user_avatar_image_url TEXT, -- rating_date_utc TEXT, -- user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_id INTEGER references lists_users (user_id), -- ); CREATE TABLE movies ( director_name TEXT, -- movie_title TEXT, -- director_id TEXT, -- movie_image_url TEXT, -- movie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 director_url TEXT, -- movie_popularity INTEGER, -- movie_url TEXT, -- movie_release_year INTEGER, -- movie_id INTEGER not null primary key, ); CREATE TABLE lists ( list_creation_timestamp_utc TEXT, -- list_third_image_url TEXT, -- list_cover_image_url TEXT, -- list_description TEXT, -- list_movie_number INTEGER, -- list_first_image_url TEXT, -- user_id INTEGER references lists_users (user_id), -- list_title TEXT, -- list_comments INTEGER, -- list_second_image_url TEXT, -- list_update_timestamp_utc TEXT, -- list_id INTEGER not null primary key, list_url TEXT, -- list_followers INTEGER, -- ); CREATE TABLE lists_users ( list_update_date_utc TEXT, -- user_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 user_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 user_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 foreign key (list_id) references lists(list_id), foreign key (user_id) references lists(user_id), user_avatar_image_url TEXT, -- user_cover_image_url TEXT, -- primary key (user_id, list_id), user_id INTEGER not null, -- user_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 list_id INTEGER not null, -- list_creation_date_utc TEXT, -- ); CREATE TABLE ratings ( user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 movie_id INTEGER, -- rating_url TEXT, -- user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 foreign key (rating_id) references ratings(rating_id), critic TEXT, -- user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 foreign key (movie_id) references movies(movie_id), foreign key (user_id) references lists_users(user_id), foreign key (user_id) references lists_users(user_id), rating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 critic_likes INTEGER, -- foreign key (user_id) references ratings_users(user_id), foreign key (user_id) references ratings_users(user_id), rating_id INTEGER, -- rating_timestamp_utc TEXT, -- user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 critic_comments INTEGER, -- user_id INTEGER, -- );
food_inspection
Which business had the lowest score for the unscheduled routine inspection on 2016/9/26? Give the name of the business.
the lowest score for unscheduled routine inspection refers to type = 'Routine - Unscheduled' where MIN(score); date = '2016-09-26';
SELECT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE score = ( SELECT MIN(score) FROM inspections WHERE `date` = '2016-09-26' AND type = 'Routine - Unscheduled' ) AND T1.`date` = '2016-09-26' AND T1.type = 'Routine - Unscheduled'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
Which category does the podcast titled 'SciFi Tech Talk' belong to?
podcast titled 'SciFi Tech Talk' refers to title = 'SciFi Tech Talk'
SELECT T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'SciFi Tech Talk'
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
sales
Has Alex purchased product with id 498?
WHEN ProductID = 498 AND FirstName = 'Alex' means that Alex purchased a product; WHEN ProductID = 498 AND FirstName NOT 'Alex' means Alex has not purchased a product;
SELECT IIF(T1.ProductID = 498, 'YES', 'NO') FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Alex'
CREATE TABLE Sales ( CustomerID INTEGER not null, -- SalesID INTEGER not null primary key, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, SalesPersonID INTEGER not null, -- foreign key (CustomerID) references Customers (CustomerID) on update cascade on delete cascade, Quantity INTEGER not null, -- ProductID INTEGER not null, -- foreign key (ProductID) references Products (ProductID) on update cascade on delete cascade, ); CREATE TABLE Customers ( MiddleInitial TEXT null, -- FirstName TEXT not null, -- LastName TEXT not null, -- CustomerID INTEGER not null primary key, ); CREATE TABLE Products ( Price REAL null, -- ProductID INTEGER not null primary key, Name TEXT not null, -- ); CREATE TABLE Employees ( EmployeeID INTEGER not null primary key, LastName TEXT not null, -- FirstName TEXT not null, -- MiddleInitial TEXT null, -- Example Values: `e`, `l`, `a`, `u`, `r` | Value Statics: Total count 22 - Distinct count 11 - Null count 0 );
olympics
What is the id of Rio de Janeiro?
Rio de Janeiro refers to city_name = 'Rio de Janeiro';
SELECT id FROM city WHERE city_name = 'Rio de Janeiro'
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
public_review_platform
How many Yelp_Business under the category of "Food" are good for kids?
under the category of "Food" refers to category_name = 'Food'; are good for kids refers to attribute_name = 'Good for Kids' and attribute_value = 'true'
SELECT COUNT(T3.stars) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Business_Attributes AS T4 ON T3.business_id = T4.business_id INNER JOIN Attributes AS T5 ON T4.attribute_id = T5.attribute_id WHERE T1.category_name LIKE 'Food' AND T5.attribute_name LIKE 'Good for Kids' AND T4.attribute_value LIKE 'TRUE'
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
What is the title with the most ordered quantity in year 1992?
total quantity refers to qty; most ordered quantity refers to order with the highest quantity where MAX(count(qty)); date refers to ord_date; year 1992 refers to YEAR(ord_date) = 1992
SELECT T2.title FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id WHERE STRFTIME('%Y', T1.ord_date) = '1992' ORDER BY T1.qty DESC LIMIT 1
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
Give the description of the moderate risk violation which "Chez Fayala, Inc." had on 2016/7/1.
"Chez Fayala, Inc." is the name of the business; moderate risk violation refers to risk_category = 'Moderate Risk'; date = '2016-07-01';
SELECT T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Chez Fayala, Inc.' AND T1.`date` = '2016-07-01' AND T1.risk_category = 'Moderate Risk'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
What is the average rating for the podcast that is most reviewed?
most reviewed refers to Max(Count(reviews.podcast_id)); average rating refers to AVG (rating)
SELECT AVG(T2.rating) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id GROUP BY T1.podcast_id ORDER BY COUNT(T2.content) DESC LIMIT 1
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
beer_factory
What is the average review given by a subscriber?
average review = AVG(StarRating); subscriber refers to SubscribedToEmailList = 'TRUE';
SELECT AVG(T2.StarRating) FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.SubscribedToEmailList = 'TRUE'
CREATE TABLE rootbeerbrand ( Website TEXT, -- State TEXT, -- Example Values: `CA`, `MA`, `LA`, `WA`, `QLD` | Value Statics: Total count 23 - Distinct count 14 - Null count 1 Twitter TEXT, -- Example Values: `https://twitter.com/ilovedads`, `https://twitter.com/1919rootbeer` | Value Statics: Total count 2 - Distinct count 2 - Null count 22 Honey TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 Alcoholic TEXT, -- Example Values: `FALSE` | Value Statics: Total count 24 - Distinct count 1 - Null count 0 City TEXT, -- Country TEXT, -- Example Values: `United States`, `Australia` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 Caffeinated TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInCans TEXT, -- Example Values: `TRUE`, `FALSE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 BreweryName TEXT, -- FacebookPage TEXT, -- Example Values: `https://www.facebook.com/Dads-Old-Fashioned-Root-Beer-and-Cream-Soda-117159998301204/`, `https://www.facebook.com/Dog-N-Suds-Bottled-Root-Beer-117372294947833/`, `https://www.facebook.com/fitzsrootbeer`, `https://www.facebook.com/Gales-Root-Beer-207365072632626/`, `https://www.facebook.com/MugRootBeer/` | Value Statics: Total count 6 - Distinct count 6 - Null count 18 FirstBrewedYear INTEGER, -- Example Values: `1919`, `1926`, `1986`, `1898`, `1984` | Value Statics: Total count 24 - Distinct count 19 - Null count 0 BrandID INTEGER primary key, CurrentRetailPrice REAL, -- Example Values: `1.0`, `3.0`, `44.0` | Value Statics: Total count 24 - Distinct count 3 - Null count 0 ArtificialSweetener TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 BrandName TEXT, -- CornSyrup TEXT, -- Example Values: `TRUE`, `FALSE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInBottles TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInKegs TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 WholesaleCost REAL, -- Example Values: `0.42`, `0.98`, `1.13`, `0.4`, `1.1` | Value Statics: Total count 24 - Distinct count 17 - Null count 0 Description TEXT, -- CaneSugar TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 ); CREATE TABLE rootbeerreview ( CustomerID INTEGER, -- foreign key (CustomerID) references customers(CustomerID), ReviewDate DATE, -- BrandID INTEGER, -- Review TEXT, -- Example Values: `You could have done better Sactown.`, `Too much bite, not enough barq.`, `The drink is fine, but the crest on the label is pretentious.`, `Fantastic!`, `Love stopping by Fitz's in St. Louis.` | Value Statics: Total count 16 - Distinct count 16 - Null count 697 foreign key (BrandID) references rootbeerbrand(BrandID), foreign key (BrandID) references rootbeerbrand(BrandID), StarRating INTEGER, -- Example Values: `5`, `1`, `3`, `2`, `4` | Value Statics: Total count 713 - Distinct count 5 - Null count 0 primary key (CustomerID, BrandID), ); CREATE TABLE customers ( StreetAddress TEXT, -- Email TEXT, -- FirstPurchaseDate DATE, -- CustomerID INTEGER primary key, State TEXT, -- Example Values: `CA` | Value Statics: Total count 554 - Distinct count 1 - Null count 0 SubscribedToEmailList TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 554 - Distinct count 2 - Null count 0 City TEXT, -- Gender TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 554 - Distinct count 2 - Null count 0 Last TEXT, -- PhoneNumber TEXT, -- First TEXT, -- ZipCode INTEGER, -- ); CREATE TABLE location ( LocationID INTEGER primary key, LocationName TEXT, -- Example Values: `LOST`, `Sac State American River Courtyard`, `Sac State Union` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 foreign key (LocationID) references geolocation(LocationID), foreign key (LocationID) references geolocation(LocationID), ZipCode INTEGER, -- Example Values: `95819` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 StreetAddress TEXT, -- Example Values: `6000 J St` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 City TEXT, -- Example Values: `Sacramento` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 State TEXT, -- Example Values: `CA` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 ); CREATE TABLE geolocation ( Longitude REAL, -- Example Values: `0.0`, `-121.426432`, `-121.42243` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 foreign key (LocationID) references location(LocationID), LocationID INTEGER primary key, Latitude REAL, -- Example Values: `0.0`, `38.566129`, `38.559615` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE rootbeer ( foreign key (BrandID) references rootbeerbrand(BrandID), foreign key (BrandID) references rootbeerbrand(BrandID), RootBeerID INTEGER primary key, foreign key (LocationID) references location(LocationID), PurchaseDate DATE, -- ContainerType TEXT, -- Example Values: `Bottle`, `Can` | Value Statics: Total count 6430 - Distinct count 2 - Null count 0 foreign key (LocationID) references geolocation(LocationID), foreign key (LocationID) references geolocation(LocationID), LocationID INTEGER, -- Example Values: `1`, `2` | Value Statics: Total count 6430 - Distinct count 2 - Null count 0 BrandID INTEGER, -- ); CREATE TABLE transaction ( CreditCardType TEXT, -- Example Values: `Discover`, `Visa`, `MasterCard`, `American Express` | Value Statics: Total count 6312 - Distinct count 4 - Null count 0 CreditCardNumber INTEGER, -- foreign key (CustomerID) references customers(CustomerID), LocationID INTEGER, -- Example Values: `2`, `1` | Value Statics: Total count 6312 - Distinct count 2 - Null count 0 foreign key (RootBeerID) references rootbeer(RootBeerID), TransactionID INTEGER primary key, CustomerID INTEGER, -- RootBeerID INTEGER, -- TransactionDate DATE, -- foreign key (LocationID) references location(LocationID), PurchasePrice REAL, -- Example Values: `3.0`, `1.0` | Value Statics: Total count 6312 - Distinct count 2 - Null count 0 );
olympics
Tell the weight of Dagfinn Sverre Aarskog.
null
SELECT weight FROM person WHERE full_name = 'Dagfinn Sverre Aarskog'
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
public_review_platform
Please list the IDs of the users who have a high number of followers.
high number of followers refers to user_fans = 'High'
SELECT user_id FROM Users WHERE user_fans LIKE 'High' GROUP BY user_id
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
movie_platform
Who is the director of the most popular movie of all time and when was it released? Indicate the average rating score of the users who were on a trialist when they rated the movie.
most popular movie of all time refers to MAX(movie_popularity); a trialist refers to user_trialist = 1; average rating score = AVG(rating_score)
SELECT T1.director_name, T1.movie_release_year , SUM(T2.rating_score) / COUNT(T2.user_id) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T2.user_trialist = 1 ORDER BY T1.movie_popularity DESC LIMIT 1
CREATE TABLE ratings_users ( user_cover_image_url TEXT, -- user_avatar_image_url TEXT, -- rating_date_utc TEXT, -- user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_id INTEGER references lists_users (user_id), -- ); CREATE TABLE movies ( director_name TEXT, -- movie_title TEXT, -- director_id TEXT, -- movie_image_url TEXT, -- movie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 director_url TEXT, -- movie_popularity INTEGER, -- movie_url TEXT, -- movie_release_year INTEGER, -- movie_id INTEGER not null primary key, ); CREATE TABLE lists ( list_creation_timestamp_utc TEXT, -- list_third_image_url TEXT, -- list_cover_image_url TEXT, -- list_description TEXT, -- list_movie_number INTEGER, -- list_first_image_url TEXT, -- user_id INTEGER references lists_users (user_id), -- list_title TEXT, -- list_comments INTEGER, -- list_second_image_url TEXT, -- list_update_timestamp_utc TEXT, -- list_id INTEGER not null primary key, list_url TEXT, -- list_followers INTEGER, -- ); CREATE TABLE lists_users ( list_update_date_utc TEXT, -- user_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 user_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 user_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 foreign key (list_id) references lists(list_id), foreign key (user_id) references lists(user_id), user_avatar_image_url TEXT, -- user_cover_image_url TEXT, -- primary key (user_id, list_id), user_id INTEGER not null, -- user_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 list_id INTEGER not null, -- list_creation_date_utc TEXT, -- ); CREATE TABLE ratings ( user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 movie_id INTEGER, -- rating_url TEXT, -- user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 foreign key (rating_id) references ratings(rating_id), critic TEXT, -- user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 foreign key (movie_id) references movies(movie_id), foreign key (user_id) references lists_users(user_id), foreign key (user_id) references lists_users(user_id), rating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 critic_likes INTEGER, -- foreign key (user_id) references ratings_users(user_id), foreign key (user_id) references ratings_users(user_id), rating_id INTEGER, -- rating_timestamp_utc TEXT, -- user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 critic_comments INTEGER, -- user_id INTEGER, -- );
food_inspection
How many kinds of violations did "Stacks Restaurant" have on 2016/10/4?
"Stacks Restaurant" is the name of the business; date = '2016-10-04';
SELECT COUNT(DISTINCT T1.violation_type_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Stacks Restaurant' AND T1.`date` = '2016-10-04'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
List all reviews created in May 2019. State the title of podcast and review rating.
created in May 2019 refers to created_at like '2019-05%'
SELECT DISTINCT T1.title, T2.rating FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.created_at LIKE '2019-05-%'
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
sales
Calculate the total price for products from id 400 to 500.
total price = SUM(MULTIPLY(Price, Quantity)); from id 400 to 500 refers to ProductID BETWEEN 400 AND 500;
SELECT SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID BETWEEN 400 AND 500
CREATE TABLE Sales ( CustomerID INTEGER not null, -- SalesID INTEGER not null primary key, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, SalesPersonID INTEGER not null, -- foreign key (CustomerID) references Customers (CustomerID) on update cascade on delete cascade, Quantity INTEGER not null, -- ProductID INTEGER not null, -- foreign key (ProductID) references Products (ProductID) on update cascade on delete cascade, ); CREATE TABLE Customers ( MiddleInitial TEXT null, -- FirstName TEXT not null, -- LastName TEXT not null, -- CustomerID INTEGER not null primary key, ); CREATE TABLE Products ( Price REAL null, -- ProductID INTEGER not null primary key, Name TEXT not null, -- ); CREATE TABLE Employees ( EmployeeID INTEGER not null primary key, LastName TEXT not null, -- FirstName TEXT not null, -- MiddleInitial TEXT null, -- Example Values: `e`, `l`, `a`, `u`, `r` | Value Statics: Total count 22 - Distinct count 11 - Null count 0 );
olympics
How many gold medals does Henk Jan Zwolle have?
gold medals refer to medal_name = 'Gold';
SELECT COUNT(T1.id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T1.full_name = 'Henk Jan Zwolle' AND T4.medal_name = 'Gold'
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
public_review_platform
What is the longest business time on Mondays for a Yelp_Business under the category "Shopping"?
longest business time refers to max(subtract(closing_time, opening_time)); on Mondays refers to day_of_week = 'Monday';  category "Shopping" refers to category_name = 'Shopping'
SELECT T1.closing_time + 12 - T1.opening_time AS "hour" FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id INNER JOIN Business_Categories AS T4 ON T3.business_id = T4.business_id INNER JOIN Categories AS T5 ON T4.category_id = T5.category_id WHERE T2.day_of_week LIKE 'Monday' AND T5.category_name LIKE 'Shopping' ORDER BY T1.closing_time + 12 - T1.opening_time DESC LIMIT 1
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
Which date has the most ordered quantity? What is the total order quantity on that day?
total quantity refers to qty; most ordered quantity refers to order with the highest quantity where MAX(sum(qty))
SELECT ord_date, SUM(qty) FROM sales GROUP BY ord_date ORDER BY SUM(qty) DESC LIMIT 1
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
Which business had the most number of high risk violations? Give the name of the business.
the most number of high risk violations refers to MAX(COUNT(business_id)) where risk_category = 'High';
SELECT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' GROUP BY T2.name ORDER BY COUNT(T2.name) DESC LIMIT 1
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
For all reviews with the worst rating, state the podcast title as well as the review title and content.
worst rating refers to rating = 1
SELECT DISTINCT T1.title, T2.title, T2.content FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.rating = 1
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
olympics
What is the average age of the athletes from the United States of America who competed in the 2016 Summer Olympics?
AVG(age) where games_name = '2016 Summer' and region_name = 'USA';
SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person_region AS T3 ON T2.person_id = T3.person_id INNER JOIN noc_region AS T4 ON T3.region_id = T4.id WHERE T1.games_name = '2016 Summer' AND T4.region_name = 'USA'
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
food_inspection
Give the name of the business which met all the required standards during the unscheduled routine inspection on 2016/9/28.
met all the required standards refers to score = 100; unscheduled routine inspection on 2016/9/28 refers to type = 'Routine - Unscheduled' where date = '2016-09-28';
SELECT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = 100 AND T1.`date` = '2016-09-28' AND T1.type = 'Routine - Unscheduled'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
Name the podcast title, rating and review content created by '76A4C24B6038145'.
"76A4C24B6038145" is author_id; review content refers to content
SELECT T2.title, T2.rating, T2.content FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.author_id = '76A4C24B6038145'
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
sales
Sum up the number sales ids handled by employees called Morningstar, Heather and Dean.
SUM = ADD(SUM(SalesID WHERE FirstName = 'Morningstar'), SUM(SalesID WHERE FirstName = 'Heather'), SUM(SalesID WHERE FirstName = 'Dean'));
SELECT SUM(IIF(T2.FirstName = 'Morningstar', 1, 0)) + SUM(IIF(T2.FirstName = 'Heather', 1, 0)) + SUM(IIF(T2.FirstName = 'Dean', 1, 0)) AS num FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID
CREATE TABLE Sales ( CustomerID INTEGER not null, -- SalesID INTEGER not null primary key, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, SalesPersonID INTEGER not null, -- foreign key (CustomerID) references Customers (CustomerID) on update cascade on delete cascade, Quantity INTEGER not null, -- ProductID INTEGER not null, -- foreign key (ProductID) references Products (ProductID) on update cascade on delete cascade, ); CREATE TABLE Customers ( MiddleInitial TEXT null, -- FirstName TEXT not null, -- LastName TEXT not null, -- CustomerID INTEGER not null primary key, ); CREATE TABLE Products ( Price REAL null, -- ProductID INTEGER not null primary key, Name TEXT not null, -- ); CREATE TABLE Employees ( EmployeeID INTEGER not null primary key, LastName TEXT not null, -- FirstName TEXT not null, -- MiddleInitial TEXT null, -- Example Values: `e`, `l`, `a`, `u`, `r` | Value Statics: Total count 22 - Distinct count 11 - Null count 0 );
public_review_platform
How many users became an elite user the same year they joined Yelp?
became an elite user the same year they joined Yelp refers to user_yelping_since_year = year_id
SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = T2.year_id
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
What is the title that have at least 10% royalty without minimum range amount.
at least 10% royalty refers to royalty > = 10; minimum range is synonym for low range which refers to lorange; without minimum range amount refers to lorange <> 0
SELECT T1.title FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange = 0 AND T2.royalty >= 10
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
Tell the Id number of the business with the most number of violations.
Id number for that business refers to business_id; the most number of violations refers to MAX(COUNT(business_id));
SELECT business_id FROM violations GROUP BY business_id ORDER BY COUNT(business_id) DESC LIMIT 1
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
Which podcast was reviewed the latest? State the date of creation, podcast tile and rating.
latest refers to Max(created_at); date of creation refers to created_at
SELECT T1.podcast_id, T2.created_at, T2.title, T2.rating FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id ORDER BY T2.created_at DESC LIMIT 1
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
sales
Calculate the total price of products purchased by Adam.
total price = SUM(MULTIPLY(Price, Quantity));
SELECT SUM(T3.Price * T2.quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Adam'
CREATE TABLE Sales ( CustomerID INTEGER not null, -- SalesID INTEGER not null primary key, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, SalesPersonID INTEGER not null, -- foreign key (CustomerID) references Customers (CustomerID) on update cascade on delete cascade, Quantity INTEGER not null, -- ProductID INTEGER not null, -- foreign key (ProductID) references Products (ProductID) on update cascade on delete cascade, ); CREATE TABLE Customers ( MiddleInitial TEXT null, -- FirstName TEXT not null, -- LastName TEXT not null, -- CustomerID INTEGER not null primary key, ); CREATE TABLE Products ( Price REAL null, -- ProductID INTEGER not null primary key, Name TEXT not null, -- ); CREATE TABLE Employees ( EmployeeID INTEGER not null primary key, LastName TEXT not null, -- FirstName TEXT not null, -- MiddleInitial TEXT null, -- Example Values: `e`, `l`, `a`, `u`, `r` | Value Statics: Total count 22 - Distinct count 11 - Null count 0 );
olympics
How many 10-year old athletes participated in the Gymnastics Men's Parallel Bars, Teams event?
10-year old athletes refer to competitor_id where age = 10; Gymnastics Men's Parallel Bars, Teams refer to event_name = 'Gymnastics Men''s Parallel Bars, Teams';
SELECT COUNT(T2.person_id) FROM competitor_event AS T1 INNER JOIN games_competitor AS T2 ON T1.competitor_id = T2.id INNER JOIN event AS T3 ON T1.event_id = T3.id WHERE T3.event_name LIKE 'Gymnastics Men%s Parallel Bars, Teams' AND T2.age = 10
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
movie_platform
What are the top 10 oldest movies and what are the average rating score for each movie? Indicate the name of the director and when the movies were released.
the average rating score refers to AVG(T2.rating_score); oldest movies refers to MIN(rating_timestamp_utc)
SELECT T2.movie_id, AVG(T1.rating_score), T2.director_name, T2.movie_release_year FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.rating_timestamp_utc ASC LIMIT 10
CREATE TABLE ratings_users ( user_cover_image_url TEXT, -- user_avatar_image_url TEXT, -- rating_date_utc TEXT, -- user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_id INTEGER references lists_users (user_id), -- ); CREATE TABLE movies ( director_name TEXT, -- movie_title TEXT, -- director_id TEXT, -- movie_image_url TEXT, -- movie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 director_url TEXT, -- movie_popularity INTEGER, -- movie_url TEXT, -- movie_release_year INTEGER, -- movie_id INTEGER not null primary key, ); CREATE TABLE lists ( list_creation_timestamp_utc TEXT, -- list_third_image_url TEXT, -- list_cover_image_url TEXT, -- list_description TEXT, -- list_movie_number INTEGER, -- list_first_image_url TEXT, -- user_id INTEGER references lists_users (user_id), -- list_title TEXT, -- list_comments INTEGER, -- list_second_image_url TEXT, -- list_update_timestamp_utc TEXT, -- list_id INTEGER not null primary key, list_url TEXT, -- list_followers INTEGER, -- ); CREATE TABLE lists_users ( list_update_date_utc TEXT, -- user_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 user_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 user_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 foreign key (list_id) references lists(list_id), foreign key (user_id) references lists(user_id), user_avatar_image_url TEXT, -- user_cover_image_url TEXT, -- primary key (user_id, list_id), user_id INTEGER not null, -- user_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 list_id INTEGER not null, -- list_creation_date_utc TEXT, -- ); CREATE TABLE ratings ( user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 movie_id INTEGER, -- rating_url TEXT, -- user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 foreign key (rating_id) references ratings(rating_id), critic TEXT, -- user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 foreign key (movie_id) references movies(movie_id), foreign key (user_id) references lists_users(user_id), foreign key (user_id) references lists_users(user_id), rating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 critic_likes INTEGER, -- foreign key (user_id) references ratings_users(user_id), foreign key (user_id) references ratings_users(user_id), rating_id INTEGER, -- rating_timestamp_utc TEXT, -- user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 critic_comments INTEGER, -- user_id INTEGER, -- );
food_inspection
Which business had the most number of inspections? Give the Id number for that business.
the most number of inspections refers to MAX(COUNT(business_id)); Id number for that business refers to business_id;
SELECT business_id FROM inspections GROUP BY business_id ORDER BY COUNT(business_id) DESC LIMIT 1
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
Find the author, rating and review creation date of review for podcast title 'In The Thick'.
"In The Thick" is the title of podcast; author refers to author_id; creation date refers to created_at
SELECT T2.author_id, T2.rating, T2.created_at FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'In The Thick' GROUP BY T2.author_id, T2.rating, T2.created_at
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
beer_factory
List out the name of the top 10 spenders and what credit card type are they using.
top 10 spenders refers to MAX(PurchasePrice) LIMIT 10;
SELECT T1.First, T1.Last, T2.CreditCardType FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T1.CustomerID ORDER BY SUM(T2.PurchasePrice) DESC LIMIT 10
CREATE TABLE rootbeerbrand ( Website TEXT, -- State TEXT, -- Example Values: `CA`, `MA`, `LA`, `WA`, `QLD` | Value Statics: Total count 23 - Distinct count 14 - Null count 1 Twitter TEXT, -- Example Values: `https://twitter.com/ilovedads`, `https://twitter.com/1919rootbeer` | Value Statics: Total count 2 - Distinct count 2 - Null count 22 Honey TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 Alcoholic TEXT, -- Example Values: `FALSE` | Value Statics: Total count 24 - Distinct count 1 - Null count 0 City TEXT, -- Country TEXT, -- Example Values: `United States`, `Australia` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 Caffeinated TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInCans TEXT, -- Example Values: `TRUE`, `FALSE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 BreweryName TEXT, -- FacebookPage TEXT, -- Example Values: `https://www.facebook.com/Dads-Old-Fashioned-Root-Beer-and-Cream-Soda-117159998301204/`, `https://www.facebook.com/Dog-N-Suds-Bottled-Root-Beer-117372294947833/`, `https://www.facebook.com/fitzsrootbeer`, `https://www.facebook.com/Gales-Root-Beer-207365072632626/`, `https://www.facebook.com/MugRootBeer/` | Value Statics: Total count 6 - Distinct count 6 - Null count 18 FirstBrewedYear INTEGER, -- Example Values: `1919`, `1926`, `1986`, `1898`, `1984` | Value Statics: Total count 24 - Distinct count 19 - Null count 0 BrandID INTEGER primary key, CurrentRetailPrice REAL, -- Example Values: `1.0`, `3.0`, `44.0` | Value Statics: Total count 24 - Distinct count 3 - Null count 0 ArtificialSweetener TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 BrandName TEXT, -- CornSyrup TEXT, -- Example Values: `TRUE`, `FALSE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInBottles TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInKegs TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 WholesaleCost REAL, -- Example Values: `0.42`, `0.98`, `1.13`, `0.4`, `1.1` | Value Statics: Total count 24 - Distinct count 17 - Null count 0 Description TEXT, -- CaneSugar TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 ); CREATE TABLE rootbeerreview ( CustomerID INTEGER, -- foreign key (CustomerID) references customers(CustomerID), ReviewDate DATE, -- BrandID INTEGER, -- Review TEXT, -- Example Values: `You could have done better Sactown.`, `Too much bite, not enough barq.`, `The drink is fine, but the crest on the label is pretentious.`, `Fantastic!`, `Love stopping by Fitz's in St. Louis.` | Value Statics: Total count 16 - Distinct count 16 - Null count 697 foreign key (BrandID) references rootbeerbrand(BrandID), foreign key (BrandID) references rootbeerbrand(BrandID), StarRating INTEGER, -- Example Values: `5`, `1`, `3`, `2`, `4` | Value Statics: Total count 713 - Distinct count 5 - Null count 0 primary key (CustomerID, BrandID), ); CREATE TABLE customers ( StreetAddress TEXT, -- Email TEXT, -- FirstPurchaseDate DATE, -- CustomerID INTEGER primary key, State TEXT, -- Example Values: `CA` | Value Statics: Total count 554 - Distinct count 1 - Null count 0 SubscribedToEmailList TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 554 - Distinct count 2 - Null count 0 City TEXT, -- Gender TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 554 - Distinct count 2 - Null count 0 Last TEXT, -- PhoneNumber TEXT, -- First TEXT, -- ZipCode INTEGER, -- ); CREATE TABLE location ( LocationID INTEGER primary key, LocationName TEXT, -- Example Values: `LOST`, `Sac State American River Courtyard`, `Sac State Union` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 foreign key (LocationID) references geolocation(LocationID), foreign key (LocationID) references geolocation(LocationID), ZipCode INTEGER, -- Example Values: `95819` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 StreetAddress TEXT, -- Example Values: `6000 J St` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 City TEXT, -- Example Values: `Sacramento` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 State TEXT, -- Example Values: `CA` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 ); CREATE TABLE geolocation ( Longitude REAL, -- Example Values: `0.0`, `-121.426432`, `-121.42243` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 foreign key (LocationID) references location(LocationID), LocationID INTEGER primary key, Latitude REAL, -- Example Values: `0.0`, `38.566129`, `38.559615` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE rootbeer ( foreign key (BrandID) references rootbeerbrand(BrandID), foreign key (BrandID) references rootbeerbrand(BrandID), RootBeerID INTEGER primary key, foreign key (LocationID) references location(LocationID), PurchaseDate DATE, -- ContainerType TEXT, -- Example Values: `Bottle`, `Can` | Value Statics: Total count 6430 - Distinct count 2 - Null count 0 foreign key (LocationID) references geolocation(LocationID), foreign key (LocationID) references geolocation(LocationID), LocationID INTEGER, -- Example Values: `1`, `2` | Value Statics: Total count 6430 - Distinct count 2 - Null count 0 BrandID INTEGER, -- ); CREATE TABLE transaction ( CreditCardType TEXT, -- Example Values: `Discover`, `Visa`, `MasterCard`, `American Express` | Value Statics: Total count 6312 - Distinct count 4 - Null count 0 CreditCardNumber INTEGER, -- foreign key (CustomerID) references customers(CustomerID), LocationID INTEGER, -- Example Values: `2`, `1` | Value Statics: Total count 6312 - Distinct count 2 - Null count 0 foreign key (RootBeerID) references rootbeer(RootBeerID), TransactionID INTEGER primary key, CustomerID INTEGER, -- RootBeerID INTEGER, -- TransactionDate DATE, -- foreign key (LocationID) references location(LocationID), PurchasePrice REAL, -- Example Values: `3.0`, `1.0` | Value Statics: Total count 6312 - Distinct count 2 - Null count 0 );
olympics
Which region does the NOC code "COL" stand for?
region refers to region_name; NOC code "COL" refers to noc = 'COL';
SELECT region_name FROM noc_region WHERE noc = 'COL'
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
public_review_platform
What is the correlation between the review starts and business stars?
highest review count refers to review_count = 'Uber'; average business review stars = Divide (Sum(review_stars), Count(user_id))
SELECT CAST(SUM(T2.review_stars) AS REAL) / COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
Provide a list of titles together with its publisher name for all publishers located in the USA.
publisher name refers to pub_name;
SELECT T1.title, T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country = 'USA'
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
What is the average scores of Tiramisu Kitchen in all inspections?
avg(score);
SELECT AVG(T1.score) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Tiramisu Kitchen'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
State the podcast title, content review and rating for all reviews with titled 'Love it!'
"Love it!" is the title of review; content reviewed refers to content
SELECT DISTINCT T1.title, T2.content, T2.rating FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'Love it!'
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
sales
Calculate the total quantity of products purchased by customer called Adrian.
null
SELECT SUM(T2.Quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.FirstName = 'Adam'
CREATE TABLE Sales ( CustomerID INTEGER not null, -- SalesID INTEGER not null primary key, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, SalesPersonID INTEGER not null, -- foreign key (CustomerID) references Customers (CustomerID) on update cascade on delete cascade, Quantity INTEGER not null, -- ProductID INTEGER not null, -- foreign key (ProductID) references Products (ProductID) on update cascade on delete cascade, ); CREATE TABLE Customers ( MiddleInitial TEXT null, -- FirstName TEXT not null, -- LastName TEXT not null, -- CustomerID INTEGER not null primary key, ); CREATE TABLE Products ( Price REAL null, -- ProductID INTEGER not null primary key, Name TEXT not null, -- ); CREATE TABLE Employees ( EmployeeID INTEGER not null primary key, LastName TEXT not null, -- FirstName TEXT not null, -- MiddleInitial TEXT null, -- Example Values: `e`, `l`, `a`, `u`, `r` | Value Statics: Total count 22 - Distinct count 11 - Null count 0 );
olympics
Calculate the bmi of the competitor id 147420.
DIVIDE(weight), MULTIPLY(height, height) where id = 147420;
SELECT CAST(T1.weight AS REAL) / (T1.height * T1.height) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T2.id = 147420
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
book_publishing_company
List the title, price and publication date for all sales with 'ON invoice' payment terms.
publication date refers to pubdate; payment terms refers to payterms; payterms = 'ON invoice'
SELECT T2.title, T2.price, T2.pubdate FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id WHERE T1.payterms = 'ON invoice'
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
Which restaurant has the highest total number of high risk violations?
the highest total number of high risk violations refer to MAX(COUNT(risk_category = 'High Risk'));
SELECT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' GROUP BY T2.name ORDER BY COUNT(T2.name) DESC LIMIT 1
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
List all content reviewed for podcast with the best rating under the 'fiction' category. State the podcast title.
'fiction' is the category name; best rating refers to rating = 5; content reviewed refers to content
SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T3.rating = 5 AND T1.category = 'fiction'
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
beer_factory
How many bottles of beer have been bought by Jim Breech?
bottles refers to ContainerType = 'Bottle';
SELECT COUNT(T3.ContainerType) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T2.CustomerID = T1.CustomerID INNER JOIN rootbeer AS T3 ON T3.RootBeerID = T2.RootBeerID WHERE T3.ContainerType = 'Bottle' AND T1.First = 'Jim' AND T1.Last = 'Breech'
CREATE TABLE rootbeerbrand ( Website TEXT, -- State TEXT, -- Example Values: `CA`, `MA`, `LA`, `WA`, `QLD` | Value Statics: Total count 23 - Distinct count 14 - Null count 1 Twitter TEXT, -- Example Values: `https://twitter.com/ilovedads`, `https://twitter.com/1919rootbeer` | Value Statics: Total count 2 - Distinct count 2 - Null count 22 Honey TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 Alcoholic TEXT, -- Example Values: `FALSE` | Value Statics: Total count 24 - Distinct count 1 - Null count 0 City TEXT, -- Country TEXT, -- Example Values: `United States`, `Australia` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 Caffeinated TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInCans TEXT, -- Example Values: `TRUE`, `FALSE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 BreweryName TEXT, -- FacebookPage TEXT, -- Example Values: `https://www.facebook.com/Dads-Old-Fashioned-Root-Beer-and-Cream-Soda-117159998301204/`, `https://www.facebook.com/Dog-N-Suds-Bottled-Root-Beer-117372294947833/`, `https://www.facebook.com/fitzsrootbeer`, `https://www.facebook.com/Gales-Root-Beer-207365072632626/`, `https://www.facebook.com/MugRootBeer/` | Value Statics: Total count 6 - Distinct count 6 - Null count 18 FirstBrewedYear INTEGER, -- Example Values: `1919`, `1926`, `1986`, `1898`, `1984` | Value Statics: Total count 24 - Distinct count 19 - Null count 0 BrandID INTEGER primary key, CurrentRetailPrice REAL, -- Example Values: `1.0`, `3.0`, `44.0` | Value Statics: Total count 24 - Distinct count 3 - Null count 0 ArtificialSweetener TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 BrandName TEXT, -- CornSyrup TEXT, -- Example Values: `TRUE`, `FALSE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInBottles TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInKegs TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 WholesaleCost REAL, -- Example Values: `0.42`, `0.98`, `1.13`, `0.4`, `1.1` | Value Statics: Total count 24 - Distinct count 17 - Null count 0 Description TEXT, -- CaneSugar TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 ); CREATE TABLE rootbeerreview ( CustomerID INTEGER, -- foreign key (CustomerID) references customers(CustomerID), ReviewDate DATE, -- BrandID INTEGER, -- Review TEXT, -- Example Values: `You could have done better Sactown.`, `Too much bite, not enough barq.`, `The drink is fine, but the crest on the label is pretentious.`, `Fantastic!`, `Love stopping by Fitz's in St. Louis.` | Value Statics: Total count 16 - Distinct count 16 - Null count 697 foreign key (BrandID) references rootbeerbrand(BrandID), foreign key (BrandID) references rootbeerbrand(BrandID), StarRating INTEGER, -- Example Values: `5`, `1`, `3`, `2`, `4` | Value Statics: Total count 713 - Distinct count 5 - Null count 0 primary key (CustomerID, BrandID), ); CREATE TABLE customers ( StreetAddress TEXT, -- Email TEXT, -- FirstPurchaseDate DATE, -- CustomerID INTEGER primary key, State TEXT, -- Example Values: `CA` | Value Statics: Total count 554 - Distinct count 1 - Null count 0 SubscribedToEmailList TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 554 - Distinct count 2 - Null count 0 City TEXT, -- Gender TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 554 - Distinct count 2 - Null count 0 Last TEXT, -- PhoneNumber TEXT, -- First TEXT, -- ZipCode INTEGER, -- ); CREATE TABLE location ( LocationID INTEGER primary key, LocationName TEXT, -- Example Values: `LOST`, `Sac State American River Courtyard`, `Sac State Union` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 foreign key (LocationID) references geolocation(LocationID), foreign key (LocationID) references geolocation(LocationID), ZipCode INTEGER, -- Example Values: `95819` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 StreetAddress TEXT, -- Example Values: `6000 J St` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 City TEXT, -- Example Values: `Sacramento` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 State TEXT, -- Example Values: `CA` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 ); CREATE TABLE geolocation ( Longitude REAL, -- Example Values: `0.0`, `-121.426432`, `-121.42243` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 foreign key (LocationID) references location(LocationID), LocationID INTEGER primary key, Latitude REAL, -- Example Values: `0.0`, `38.566129`, `38.559615` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE rootbeer ( foreign key (BrandID) references rootbeerbrand(BrandID), foreign key (BrandID) references rootbeerbrand(BrandID), RootBeerID INTEGER primary key, foreign key (LocationID) references location(LocationID), PurchaseDate DATE, -- ContainerType TEXT, -- Example Values: `Bottle`, `Can` | Value Statics: Total count 6430 - Distinct count 2 - Null count 0 foreign key (LocationID) references geolocation(LocationID), foreign key (LocationID) references geolocation(LocationID), LocationID INTEGER, -- Example Values: `1`, `2` | Value Statics: Total count 6430 - Distinct count 2 - Null count 0 BrandID INTEGER, -- ); CREATE TABLE transaction ( CreditCardType TEXT, -- Example Values: `Discover`, `Visa`, `MasterCard`, `American Express` | Value Statics: Total count 6312 - Distinct count 4 - Null count 0 CreditCardNumber INTEGER, -- foreign key (CustomerID) references customers(CustomerID), LocationID INTEGER, -- Example Values: `2`, `1` | Value Statics: Total count 6312 - Distinct count 2 - Null count 0 foreign key (RootBeerID) references rootbeer(RootBeerID), TransactionID INTEGER primary key, CustomerID INTEGER, -- RootBeerID INTEGER, -- TransactionDate DATE, -- foreign key (LocationID) references location(LocationID), PurchasePrice REAL, -- Example Values: `3.0`, `1.0` | Value Statics: Total count 6312 - Distinct count 2 - Null count 0 );
olympics
How many athletes over the age of 59 competed in the 2016 Summer Olympics?
over the age of 59 refers to age > 59; the 2016 Summer Olympics refer to games_name = '2016 Summer';
SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '2016 Summer' AND T2.age > 59
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
public_review_platform
How many of the busineses are in Casa Grande?
in Casa Grande refers to city = 'Casa Grande'
SELECT COUNT(city) FROM Business WHERE city LIKE 'Casa Grande'
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
Among the titles with royalty percentage, which title has the greatest royalty percentage. State it's minimum range to enjoy this royalty percentage.
minimum range is synonym for low range which refers to lorange
SELECT T1.title, T2.lorange FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id ORDER BY T2.royalty DESC LIMIT 1
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
How many high risk violations do the restaurants in San Francisco have in total?
restaurants in San Francisco refer to business_id where city in ('San Francisco', 'SF', 'S.F.', 'SAN FRANCISCO'); high risk violations refer to risk_category = 'High Risk';
SELECT COUNT(T2.business_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.city IN ('San Francisco', 'SF', 'S.F.', 'SAN FRANCISCO') AND T1.risk_category = 'High Risk'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
Name all the podcast title and its category with average rating of more than 3.0.
average rating of more than 3.0 refers to avg(rating) > 3.0
SELECT T2.title, T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id GROUP BY T3.podcast_id HAVING AVG(T3.rating) > 3
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
sales
Among the products, how many of them are freebies?
freebies refers to Price = 0;
SELECT COUNT(ProductID) FROM Products WHERE Price = 0
CREATE TABLE Sales ( CustomerID INTEGER not null, -- SalesID INTEGER not null primary key, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, SalesPersonID INTEGER not null, -- foreign key (CustomerID) references Customers (CustomerID) on update cascade on delete cascade, Quantity INTEGER not null, -- ProductID INTEGER not null, -- foreign key (ProductID) references Products (ProductID) on update cascade on delete cascade, ); CREATE TABLE Customers ( MiddleInitial TEXT null, -- FirstName TEXT not null, -- LastName TEXT not null, -- CustomerID INTEGER not null primary key, ); CREATE TABLE Products ( Price REAL null, -- ProductID INTEGER not null primary key, Name TEXT not null, -- ); CREATE TABLE Employees ( EmployeeID INTEGER not null primary key, LastName TEXT not null, -- FirstName TEXT not null, -- MiddleInitial TEXT null, -- Example Values: `e`, `l`, `a`, `u`, `r` | Value Statics: Total count 22 - Distinct count 11 - Null count 0 );
olympics
Who is the youngest person who participated in the Olympics?
Who is the youngest person refers to full_name where MIN(age);
SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id ORDER BY T2.age LIMIT 1
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
movie_platform
How many paying subscribers gave a rating to the movie "One Flew Over the Cuckoo's Nest"?
paying subscribers refer to user_has_payment_method = 1; movie "One Flew Over the Cuckoo's Nest" refers to movie_id = 'One Flew Over the Cuckoo''s Nest'
SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN ratings_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'One Flew Over the Cuckoo''s Nest' AND T3.user_has_payment_method = 1
CREATE TABLE ratings_users ( user_cover_image_url TEXT, -- user_avatar_image_url TEXT, -- rating_date_utc TEXT, -- user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 user_id INTEGER references lists_users (user_id), -- ); CREATE TABLE movies ( director_name TEXT, -- movie_title TEXT, -- director_id TEXT, -- movie_image_url TEXT, -- movie_title_language TEXT, -- Example Values: `en` | Value Statics: Total count 100000 - Distinct count 1 - Null count 0 director_url TEXT, -- movie_popularity INTEGER, -- movie_url TEXT, -- movie_release_year INTEGER, -- movie_id INTEGER not null primary key, ); CREATE TABLE lists ( list_creation_timestamp_utc TEXT, -- list_third_image_url TEXT, -- list_cover_image_url TEXT, -- list_description TEXT, -- list_movie_number INTEGER, -- list_first_image_url TEXT, -- user_id INTEGER references lists_users (user_id), -- list_title TEXT, -- list_comments INTEGER, -- list_second_image_url TEXT, -- list_update_timestamp_utc TEXT, -- list_id INTEGER not null primary key, list_url TEXT, -- list_followers INTEGER, -- ); CREATE TABLE lists_users ( list_update_date_utc TEXT, -- user_subscriber INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 user_eligible_for_trial TEXT, -- Example Values: `0`, `1` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 user_has_payment_method TEXT, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 foreign key (list_id) references lists(list_id), foreign key (user_id) references lists(user_id), user_avatar_image_url TEXT, -- user_cover_image_url TEXT, -- primary key (user_id, list_id), user_id INTEGER not null, -- user_trialist INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 80311 - Distinct count 2 - Null count 0 list_id INTEGER not null, -- list_creation_date_utc TEXT, -- ); CREATE TABLE ratings ( user_subscriber INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 movie_id INTEGER, -- rating_url TEXT, -- user_eligible_for_trial INTEGER, -- Example Values: `1`, `0` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 foreign key (rating_id) references ratings(rating_id), critic TEXT, -- user_trialist INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 foreign key (movie_id) references movies(movie_id), foreign key (user_id) references lists_users(user_id), foreign key (user_id) references lists_users(user_id), rating_score INTEGER, -- Example Values: `3`, `2`, `4`, `5`, `1` | Value Statics: Total count 99731 - Distinct count 5 - Null count 269 critic_likes INTEGER, -- foreign key (user_id) references ratings_users(user_id), foreign key (user_id) references ratings_users(user_id), rating_id INTEGER, -- rating_timestamp_utc TEXT, -- user_has_payment_method INTEGER, -- Example Values: `0`, `1` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 critic_comments INTEGER, -- user_id INTEGER, -- );
food_inspection
Which restaurant had more low risk violation in inspections, Tiramisu Kitchen or OMNI S.F. Hotel - 2nd Floor Pantry?
Tiramisu Kitchen and OMNI S.F. Hotel - 2nd Floor Pantry are names of the business; more low risk violations refer to MAX(COUNT(risk_category = 'Low Risk'));
SELECT CASE WHEN SUM(CASE WHEN T2.name = 'OMNI S.F. Hotel - 2nd Floor Pantry' THEN 1 ELSE 0 END) > SUM(CASE WHEN T2.name = 'Tiramisu Kitchen' THEN 1 ELSE 0 END) THEN 'OMNI S.F. Hotel - 2nd Floor Pantry' ELSE 'Tiramisu Kitchen' END AS result FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'Low Risk'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
List the authors who created review for podcast titled 'Pop Rocket' in 2016 with rating less than 5.
Pop Rocket' is the title of podcast; in 2016 refers to created_at like'2016%'; rating less than 5 refers to rating < 5; author refers to author_id
SELECT T2.author_id FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Pop Rocket' AND T2.created_at LIKE '2016-%' AND T2.rating < 5
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
olympics
State the name of sport id 19.
name of sport refers to sport_name
SELECT sport_name FROM sport WHERE id = 19
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
public_review_platform
Find out which hotel and travel business having the most review? Calculate the standard deviation of the review star for this business.
"Hotel & Travel" is the category_name; most review refers to Max(Count(category_id)); Average star per user = Divide (Sum (review_stars), Count(user_id))
SELECT T2.category_id FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Reviews AS T3 ON T3.business_id = T1.business_id WHERE T2.category_name = 'Hotels & Travel' GROUP BY T2.category_id ORDER BY COUNT(T2.category_id) DESC LIMIT 1
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
List all titles published in year 1991. Also provide notes details of the title and the publisher's name.
publisher name refers to pub_name; publication date refers to pubdate; published in year 1991 refers to YEAR(pubdate) = 1991
SELECT T1.title, T1.notes, T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE STRFTIME('%Y', T1.pubdate) = '1991'
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
Among the routine inspections of Tiramisu Kitchen, how many of them have a score of over 70?
Tiramisu Kitchen is the name of the business; routine inspections refer to type = 'Routine - Unscheduled'; score of over 70 refers to score > 70;
SELECT COUNT(T2.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Tiramisu Kitchen' AND T1.type = 'Routine - Unscheduled' AND T1.score > 70
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
How many people rated 5 for the podcast which title contains the word 'spoiler' under the 'art' category '?
rated 5 refers to rating = 5; contain the word 'spoilers' refers to title like '%spoilers%'; 'art' is the category name;
SELECT COUNT(T3.podcast_id) FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T2.title LIKE '%spoilers%' AND T1.category = 'arts' AND T3.rating = 5
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
sales
Calculate the total quantity of products with name starting with alphabet "c".
name starting with alphabet "c" refers to Name LIKE 'C%';
SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE SUBSTR(T1.Name, 1, 1) = 'C'
CREATE TABLE Sales ( CustomerID INTEGER not null, -- SalesID INTEGER not null primary key, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, SalesPersonID INTEGER not null, -- foreign key (CustomerID) references Customers (CustomerID) on update cascade on delete cascade, Quantity INTEGER not null, -- ProductID INTEGER not null, -- foreign key (ProductID) references Products (ProductID) on update cascade on delete cascade, ); CREATE TABLE Customers ( MiddleInitial TEXT null, -- FirstName TEXT not null, -- LastName TEXT not null, -- CustomerID INTEGER not null primary key, ); CREATE TABLE Products ( Price REAL null, -- ProductID INTEGER not null primary key, Name TEXT not null, -- ); CREATE TABLE Employees ( EmployeeID INTEGER not null primary key, LastName TEXT not null, -- FirstName TEXT not null, -- MiddleInitial TEXT null, -- Example Values: `e`, `l`, `a`, `u`, `r` | Value Statics: Total count 22 - Distinct count 11 - Null count 0 );
olympics
Who has participated in the most Olympic Games in the database?
Who refers to full_name; participated in the most Olympic Games refers to MAX(COUNT(games_id));
SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id GROUP BY T2.person_id ORDER BY COUNT(T2.person_id) DESC LIMIT 1
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
public_review_platform
How many elite users have reviewed Yelp_Business no.1?
Yelp_Business no.1 refers to business_id = 1
SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id INNER JOIN Reviews AS T3 ON T1.user_id = T3.user_id WHERE T3.business_id = 1
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
State the title and royalty percentage for title ID BU2075 between 10000 to 50000 range.
lorange mean low range; hirange mean high range; range refers to between the low and high range; lorange>10000; hirange<12000
SELECT T1.title, T2.royalty FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange > 10000 AND T2.hirange < 50000 AND T1.title_ID = 'BU2075'
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
How many routine inspections did Tiramisu Kitchen have?
Tiramisu Kitchen is the name of the business; routine inspections refer to type = 'Routine - Unscheduled';
SELECT COUNT(T1.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.type = 'Routine - Unscheduled' AND T2.name = 'Tiramisu Kitchen'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
List all the podcast title and its itunes url under the 'society-culture' category.
null
SELECT T2.title, T2.itunes_url FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'society-culture'
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
sales
Tally the product name and quantity of the first ten sales.
first ten sales refers to SalesID BETWEEN 1 AND 10;
SELECT T3.Name, T2.Quantity FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T2.SalesID BETWEEN 1 AND 10
CREATE TABLE Sales ( CustomerID INTEGER not null, -- SalesID INTEGER not null primary key, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, SalesPersonID INTEGER not null, -- foreign key (CustomerID) references Customers (CustomerID) on update cascade on delete cascade, Quantity INTEGER not null, -- ProductID INTEGER not null, -- foreign key (ProductID) references Products (ProductID) on update cascade on delete cascade, ); CREATE TABLE Customers ( MiddleInitial TEXT null, -- FirstName TEXT not null, -- LastName TEXT not null, -- CustomerID INTEGER not null primary key, ); CREATE TABLE Products ( Price REAL null, -- ProductID INTEGER not null primary key, Name TEXT not null, -- ); CREATE TABLE Employees ( EmployeeID INTEGER not null primary key, LastName TEXT not null, -- FirstName TEXT not null, -- MiddleInitial TEXT null, -- Example Values: `e`, `l`, `a`, `u`, `r` | Value Statics: Total count 22 - Distinct count 11 - Null count 0 );
public_review_platform
List down the business ID with a low review count in Phoenix.
"Phoenix" is the city; low review count refers to review_count = 'Low'
SELECT business_id FROM Business WHERE city LIKE 'Phoenix' AND review_count LIKE 'Low'
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
Name the store with the highest quantity in sales? What is the least quantity title from the store's sale?
qty is abbreviation for quantity; highest quantity refers to MAX(qty); least quantity refers to MIN(qty)
SELECT T3.stor_id, T2.title FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id INNER JOIN stores AS T3 ON T3.stor_id = T1.stor_id WHERE T3.stor_id = ( SELECT stor_id FROM sales GROUP BY stor_id ORDER BY SUM(qty) DESC LIMIT 1 ) GROUP BY T3.stor_id, T2.title ORDER BY SUM(T1.qty) ASC LIMIT 1
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
Please list the descriptions of all the high risk violations of Tiramisu Kitchen.
Tiramisu Kitchen is the name of the business; high risk violations refer to risk_category = 'High Risk';
SELECT DISTINCT T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' AND T2.name = 'Tiramisu Kitchen'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
Name all the categories for podcast titled 'I Heart My Life Show'.
'I Hearty My Life Show' is the title of podcast
SELECT T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'I Heart My Life Show'
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
olympics
How many 24 years old competitors competed in Men's Basketball?
24 years old competitors refer to id where age = 24; Men's Basketball refers to event_name = 'Basketball Men''s Basketball';
SELECT COUNT(T2.person_id) FROM competitor_event AS T1 INNER JOIN games_competitor AS T2 ON T1.competitor_id = T2.id INNER JOIN event AS T3 ON T1.event_id = T3.id WHERE T3.event_name LIKE 'Basketball Men%s Basketball' AND T2.age = 24
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
public_review_platform
Please list the business IDs of the Yelp_Business that have a business time of longer than 12 hours on Sundays.
business time of longer than 12 hours refers to subtract(closing_time, opening_time) > 12; on Sundays refers to day_of_week = 'Sunday'
SELECT T1.business_id FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id WHERE T1.closing_time + 12 - T1.opening_time > 12 AND T2.day_of_week LIKE 'Sunday' GROUP BY T1.business_id
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
State the royalty percentage for the most year to date sale title within the 20000 range.
most year to date sales refers to MAX(ytd_sales); range limit means high range which refers to hirange; the 20000 range refers to hirange<20000
SELECT MAX(T1.ytd_sales) FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange > 20000 AND T2.hirange < 20000
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
What is the description of the low risk violation of Tiramisu Kitchen on 2014/1/14?
Tiramisu Kitchen is the name of the business; 2014/1/14 refers to date = '2014-01-14'; low risk violations refer to risk_category = 'Low Risk';
SELECT T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.`date` = '2014-01-14' AND T2.name = 'Tiramisu Kitchen' AND T1.risk_category = 'Low Risk'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
List all podcast with its itunes url for all title containing the word 'Dream'.
containing the word 'Dream' refers to title LIKE '%Dream%'
SELECT itunes_url FROM podcasts WHERE title LIKE '%Dream%' GROUP BY itunes_url
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
sales
List the product ID of the top five products, by descending order, in terms of price.
top 5 products in terms of Price refers to MAX(Price) LIMIT 5;
SELECT ProductID FROM Products ORDER BY Price DESC LIMIT 5
CREATE TABLE Sales ( CustomerID INTEGER not null, -- SalesID INTEGER not null primary key, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, SalesPersonID INTEGER not null, -- foreign key (CustomerID) references Customers (CustomerID) on update cascade on delete cascade, Quantity INTEGER not null, -- ProductID INTEGER not null, -- foreign key (ProductID) references Products (ProductID) on update cascade on delete cascade, ); CREATE TABLE Customers ( MiddleInitial TEXT null, -- FirstName TEXT not null, -- LastName TEXT not null, -- CustomerID INTEGER not null primary key, ); CREATE TABLE Products ( Price REAL null, -- ProductID INTEGER not null primary key, Name TEXT not null, -- ); CREATE TABLE Employees ( EmployeeID INTEGER not null primary key, LastName TEXT not null, -- FirstName TEXT not null, -- MiddleInitial TEXT null, -- Example Values: `e`, `l`, `a`, `u`, `r` | Value Statics: Total count 22 - Distinct count 11 - Null count 0 );
public_review_platform
How many of the businesses are active?
active refers to active = 'true'
SELECT COUNT(business_id) FROM Business WHERE active LIKE 'True'
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
List all titles with sales of quantity more than 20 and store located in the CA state.
qty is abbreviation for quantity; sales of quantity more than 20 refers to qty>20; store refers to stor_name
SELECT T1.title, T2.qty FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id INNER JOIN stores AS T3 ON T2.stor_id = T3.stor_id WHERE T2.qty > 20 AND T3.state = 'CA'
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
Please list the names of the restaurants that had a low risk violation in inspections in 2014.
inspection in 2014 refers to year(date) = 2014; low risk violations refer to risk_category = 'Low Risk';
SELECT DISTINCT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2014' AND T1.risk_category = 'Low Risk'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
Provide the itunes id and url for podcast titled 'Brown Suga Diaries'.
url refers to itunes_url; 'Brown Suga Diaries' is the title of podcast
SELECT itunes_id, itunes_url FROM podcasts WHERE title = 'Brown Suga Diaries'
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
sales
What is the full name of employee who sold 1000 units?
full name of employee = FirstName, MiddleInitial, LastName; units refers to quantity; Quantity = 100
SELECT DISTINCT T2.FirstName, T2.MiddleInitial, T2.LastName FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T1.Quantity = 1000
CREATE TABLE Sales ( CustomerID INTEGER not null, -- SalesID INTEGER not null primary key, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, foreign key (SalesPersonID) references Employees (EmployeeID) on update cascade on delete cascade, SalesPersonID INTEGER not null, -- foreign key (CustomerID) references Customers (CustomerID) on update cascade on delete cascade, Quantity INTEGER not null, -- ProductID INTEGER not null, -- foreign key (ProductID) references Products (ProductID) on update cascade on delete cascade, ); CREATE TABLE Customers ( MiddleInitial TEXT null, -- FirstName TEXT not null, -- LastName TEXT not null, -- CustomerID INTEGER not null primary key, ); CREATE TABLE Products ( Price REAL null, -- ProductID INTEGER not null primary key, Name TEXT not null, -- ); CREATE TABLE Employees ( EmployeeID INTEGER not null primary key, LastName TEXT not null, -- FirstName TEXT not null, -- MiddleInitial TEXT null, -- Example Values: `e`, `l`, `a`, `u`, `r` | Value Statics: Total count 22 - Distinct count 11 - Null count 0 );
public_review_platform
How many stars on average does a Yelp_Business in Anthem get from a user review?
in Anthem refers to city = 'Anthem'; stars on average = avg(review_stars)
SELECT AVG(T2.review_stars) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Anthem'
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
Name the store with ID 7066 and calculate the percentage of the the quantity ordered that were on 'Net 30' payment terms.
store with ID 7066 refers to stor_ID = '7066'; 'Net 60' payment terms refers to payterm = 'Net 60'; qty is abbreviation for quantity; percentage = DIVIDE(payterms = 'Net 60', sum(qty))*100
SELECT T2.stor_name , CAST(SUM(CASE WHEN payterms = 'Net 30' THEN qty ELSE 0 END) AS REAL) * 100 / SUM(qty) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE T1.stor_id = '7066' GROUP BY T2.stor_name
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
How many low risk violations were found in the inspection on 2014/1/14 for Tiramisu Kitchen?
Tiramisu Kitchen is the name of the business; inspection on 2014/1/14 refers to date = '2014-01-14'; low risk violations refer to risk_category = 'Low Risk';
SELECT COUNT(T1.business_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.`date` = '2014-01-14' AND T2.name = 'Tiramisu Kitchen' AND T1.risk_category = 'Low Risk'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
What is the percentage of the podcast that are categorized in four or more categories?
categorized in 4 or more refers to Count(category) > 4; percentage = Divide(Count(podcast_id(count(category) > 4)), Count(podcast_id)) * 100
SELECT COUNT(T1.podcast_id) FROM ( SELECT podcast_id FROM categories GROUP BY podcast_id HAVING COUNT(category) >= 4 ) AS T1
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
olympics
Which region do most of the athletes are from?
region refers to region_name; most of the athletes refer to MAX(COUNT(person_id));
SELECT T2.region_name FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id GROUP BY T2.region_name ORDER BY COUNT(T1.person_id) DESC LIMIT 1
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
food_inspection
What was the type of inspection Tiramisu Kitchen had on 2014/1/14?
Tiramisu Kitchen is the name of the business; inspection on 2014/1/14 refers to date = '2014-01-14';
SELECT T1.type FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.`date` = '2014-01-14' AND T2.name = 'Tiramisu Kitchen'
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );
music_platform_2
How many podcasts are there in the category which has the most podcasts?
category which has the most podcast refers to the category with Max(count(podcast_id))
SELECT COUNT(podcast_id) FROM categories WHERE category = ( SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) DESC LIMIT 1 )
CREATE TABLE reviews ( author_id TEXT not null, -- rating INTEGER not null, -- Example Values: `5`, `1`, `3`, `4`, `2` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 title TEXT not null, -- podcast_id TEXT not null constraint reviews_podcasts_podcast_id_fk references podcasts, -- content TEXT not null, -- created_at TEXT not null, -- ); CREATE TABLE categories ( category TEXT not null, -- podcast_id TEXT not null constraint categories_podcasts_podcast_id_fk references podcasts, -- constraint "PRIMARY" primary key (podcast_id, category), ); CREATE TABLE runs ( reviews_added integer not null, -- Example Values: `1215223`, `13139`, `11561`, `11855`, `11714` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 run_at text not null, -- Example Values: `2021-05-10 02:53:00`, `2021-06-06 21:34:36`, `2021-07-02 18:04:55`, `2021-08-01 17:54:42`, `2021-09-02 18:00:30` | Value Statics: Total count 12 - Distinct count 12 - Null count 0 max_rowid integer not null, -- Example Values: `3266481`, `3300773`, `3329699`, `3360315`, `3390165` | Value Statics: Total count 12 - Distinct count 11 - Null count 0 ); CREATE TABLE podcasts ( itunes_id integer not null, -- title text not null, -- itunes_url text not null, -- podcast_id text primary key, slug text not null, -- );
beer_factory
What is the container type, brand name and star rating for root beer ID 10054?
FALSE;
SELECT T4.ContainerType, T3.BrandName, T1.StarRating FROM rootbeerreview AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID INNER JOIN rootbeer AS T4 ON T2.RootBeerID = T4.RootBeerID WHERE T2.RootBeerID = 100054
CREATE TABLE rootbeerbrand ( Website TEXT, -- State TEXT, -- Example Values: `CA`, `MA`, `LA`, `WA`, `QLD` | Value Statics: Total count 23 - Distinct count 14 - Null count 1 Twitter TEXT, -- Example Values: `https://twitter.com/ilovedads`, `https://twitter.com/1919rootbeer` | Value Statics: Total count 2 - Distinct count 2 - Null count 22 Honey TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 Alcoholic TEXT, -- Example Values: `FALSE` | Value Statics: Total count 24 - Distinct count 1 - Null count 0 City TEXT, -- Country TEXT, -- Example Values: `United States`, `Australia` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 Caffeinated TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInCans TEXT, -- Example Values: `TRUE`, `FALSE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 BreweryName TEXT, -- FacebookPage TEXT, -- Example Values: `https://www.facebook.com/Dads-Old-Fashioned-Root-Beer-and-Cream-Soda-117159998301204/`, `https://www.facebook.com/Dog-N-Suds-Bottled-Root-Beer-117372294947833/`, `https://www.facebook.com/fitzsrootbeer`, `https://www.facebook.com/Gales-Root-Beer-207365072632626/`, `https://www.facebook.com/MugRootBeer/` | Value Statics: Total count 6 - Distinct count 6 - Null count 18 FirstBrewedYear INTEGER, -- Example Values: `1919`, `1926`, `1986`, `1898`, `1984` | Value Statics: Total count 24 - Distinct count 19 - Null count 0 BrandID INTEGER primary key, CurrentRetailPrice REAL, -- Example Values: `1.0`, `3.0`, `44.0` | Value Statics: Total count 24 - Distinct count 3 - Null count 0 ArtificialSweetener TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 BrandName TEXT, -- CornSyrup TEXT, -- Example Values: `TRUE`, `FALSE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInBottles TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 AvailableInKegs TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 WholesaleCost REAL, -- Example Values: `0.42`, `0.98`, `1.13`, `0.4`, `1.1` | Value Statics: Total count 24 - Distinct count 17 - Null count 0 Description TEXT, -- CaneSugar TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 24 - Distinct count 2 - Null count 0 ); CREATE TABLE rootbeerreview ( CustomerID INTEGER, -- foreign key (CustomerID) references customers(CustomerID), ReviewDate DATE, -- BrandID INTEGER, -- Review TEXT, -- Example Values: `You could have done better Sactown.`, `Too much bite, not enough barq.`, `The drink is fine, but the crest on the label is pretentious.`, `Fantastic!`, `Love stopping by Fitz's in St. Louis.` | Value Statics: Total count 16 - Distinct count 16 - Null count 697 foreign key (BrandID) references rootbeerbrand(BrandID), foreign key (BrandID) references rootbeerbrand(BrandID), StarRating INTEGER, -- Example Values: `5`, `1`, `3`, `2`, `4` | Value Statics: Total count 713 - Distinct count 5 - Null count 0 primary key (CustomerID, BrandID), ); CREATE TABLE customers ( StreetAddress TEXT, -- Email TEXT, -- FirstPurchaseDate DATE, -- CustomerID INTEGER primary key, State TEXT, -- Example Values: `CA` | Value Statics: Total count 554 - Distinct count 1 - Null count 0 SubscribedToEmailList TEXT, -- Example Values: `FALSE`, `TRUE` | Value Statics: Total count 554 - Distinct count 2 - Null count 0 City TEXT, -- Gender TEXT, -- Example Values: `M`, `F` | Value Statics: Total count 554 - Distinct count 2 - Null count 0 Last TEXT, -- PhoneNumber TEXT, -- First TEXT, -- ZipCode INTEGER, -- ); CREATE TABLE location ( LocationID INTEGER primary key, LocationName TEXT, -- Example Values: `LOST`, `Sac State American River Courtyard`, `Sac State Union` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 foreign key (LocationID) references geolocation(LocationID), foreign key (LocationID) references geolocation(LocationID), ZipCode INTEGER, -- Example Values: `95819` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 StreetAddress TEXT, -- Example Values: `6000 J St` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 City TEXT, -- Example Values: `Sacramento` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 State TEXT, -- Example Values: `CA` | Value Statics: Total count 2 - Distinct count 1 - Null count 1 ); CREATE TABLE geolocation ( Longitude REAL, -- Example Values: `0.0`, `-121.426432`, `-121.42243` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 foreign key (LocationID) references location(LocationID), LocationID INTEGER primary key, Latitude REAL, -- Example Values: `0.0`, `38.566129`, `38.559615` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE rootbeer ( foreign key (BrandID) references rootbeerbrand(BrandID), foreign key (BrandID) references rootbeerbrand(BrandID), RootBeerID INTEGER primary key, foreign key (LocationID) references location(LocationID), PurchaseDate DATE, -- ContainerType TEXT, -- Example Values: `Bottle`, `Can` | Value Statics: Total count 6430 - Distinct count 2 - Null count 0 foreign key (LocationID) references geolocation(LocationID), foreign key (LocationID) references geolocation(LocationID), LocationID INTEGER, -- Example Values: `1`, `2` | Value Statics: Total count 6430 - Distinct count 2 - Null count 0 BrandID INTEGER, -- ); CREATE TABLE transaction ( CreditCardType TEXT, -- Example Values: `Discover`, `Visa`, `MasterCard`, `American Express` | Value Statics: Total count 6312 - Distinct count 4 - Null count 0 CreditCardNumber INTEGER, -- foreign key (CustomerID) references customers(CustomerID), LocationID INTEGER, -- Example Values: `2`, `1` | Value Statics: Total count 6312 - Distinct count 2 - Null count 0 foreign key (RootBeerID) references rootbeer(RootBeerID), TransactionID INTEGER primary key, CustomerID INTEGER, -- RootBeerID INTEGER, -- TransactionDate DATE, -- foreign key (LocationID) references location(LocationID), PurchasePrice REAL, -- Example Values: `3.0`, `1.0` | Value Statics: Total count 6312 - Distinct count 2 - Null count 0 );
olympics
What is the percentage of male athletes from Estonia?
DIVIDE(COUNT(id where gender = 'M'), COUNT(id)) as percentage where region_name = 'Estonia';
SELECT CAST(COUNT(CASE WHEN T3.gender = 'M' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.person_id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Estonia'
CREATE TABLE event ( event_name TEXT default NULL, -- sport_id INTEGER default NULL, -- foreign key (sport_id) references sport(id), id INTEGER not null primary key, ); CREATE TABLE sport ( id INTEGER not null primary key, sport_name TEXT default NULL, -- ); CREATE TABLE city ( city_name TEXT default NULL, -- id INTEGER not null primary key, ); CREATE TABLE games_city ( city_id INTEGER default NULL, -- foreign key (games_id) references games(id), games_id INTEGER default NULL, -- foreign key (city_id) references city(id), ); CREATE TABLE competitor_event ( foreign key (event_id) references event(id), foreign key (competitor_id) references games_competitor(id), foreign key (competitor_id) references games_competitor(id), foreign key (medal_id) references medal(id), medal_id INTEGER default NULL, -- Example Values: `4`, `1`, `3`, `2` | Value Statics: Total count 100000 - Distinct count 4 - Null count 0 event_id INTEGER default NULL, -- competitor_id INTEGER default NULL, -- ); CREATE TABLE person ( weight INTEGER default NULL, -- height INTEGER default NULL, -- id INTEGER not null primary key, full_name TEXT default NULL, -- gender TEXT default NULL, -- Example Values: `M`, `F` | Value Statics: Total count 100000 - Distinct count 2 - Null count 0 ); CREATE TABLE noc_region ( region_name TEXT default NULL, -- id INTEGER not null primary key, noc TEXT default NULL, -- ); CREATE TABLE medal ( id INTEGER not null primary key, medal_name TEXT default NULL, -- Example Values: `Gold`, `Silver`, `Bronze`, `NA` | Value Statics: Total count 4 - Distinct count 4 - Null count 0 ); CREATE TABLE person_region ( foreign key (region_id) references noc_region(id), region_id INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- ); CREATE TABLE games ( season TEXT default NULL, -- Example Values: `Summer`, `Winter` | Value Statics: Total count 51 - Distinct count 2 - Null count 0 id INTEGER not null primary key, games_name TEXT default NULL, -- games_year INTEGER default NULL, -- ); CREATE TABLE games_competitor ( id INTEGER not null primary key, foreign key (games_id) references games(id), games_id INTEGER default NULL, -- age INTEGER default NULL, -- foreign key (person_id) references person(id), person_id INTEGER default NULL, -- );
public_review_platform
List down the business ID with a star range from 3 to 4, located at Tempe.
star range from 3 to 4 refers to stars > = 3 AND stars < 5; 'Tempe' is the name of city
SELECT business_id FROM Business WHERE city LIKE 'Tempe' AND stars BETWEEN 3 AND 4
CREATE TABLE Attributes ( attribute_name TEXT, -- attribute_id INTEGER constraint Attributes_pk primary key, ); CREATE TABLE Elite ( year_id INTEGER constraint Elite_Years_year_id_fk references Years, -- Example Values: `2010`, `2011`, `2012`, `2013`, `2014` | Value Statics: Total count 16366 - Distinct count 10 - Null count 0 constraint Elite_pk primary key (user_id, year_id), user_id INTEGER constraint Elite_Users_user_id_fk references Users, -- ); CREATE TABLE Business_Hours ( closing_time TEXT, -- business_id INTEGER constraint Business_Hours_Business_business_id_fk references Business, -- day_id INTEGER constraint Business_Hours_Days_day_id_fk references Days, -- Example Values: `2`, `3`, `4`, `5`, `6` | Value Statics: Total count 47831 - Distinct count 7 - Null count 0 opening_time TEXT, -- constraint Business_Hours_pk primary key (business_id, day_id), ); CREATE TABLE Categories ( category_id INTEGER constraint Categories_pk primary key, category_name TEXT, -- ); CREATE TABLE Business_Categories ( business_id INTEGER constraint Business_Categories_Business_business_id_fk references Business, -- category_id INTEGER constraint Business_Categories_Categories_category_id_fk references Categories, -- constraint Business_Categories_pk primary key (business_id, category_id), ); CREATE TABLE Tips ( likes INTEGER, -- Example Values: `0`, `1`, `2`, `3` | Value Statics: Total count 87157 - Distinct count 4 - Null count 0 user_id INTEGER constraint Tips_Users_user_id_fk references Users, -- tip_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 87157 - Distinct count 3 - Null count 0 business_id INTEGER constraint Tips_Business_business_id_fk references Business, -- constraint Tips_pk primary key (business_id, user_id), ); CREATE TABLE Reviews ( business_id INTEGER constraint Reviews_Business_business_id_fk references Business, -- review_length TEXT, -- Example Values: `Medium`, `Short`, `Long` | Value Statics: Total count 100000 - Distinct count 3 - Null count 0 constraint Reviews_pk primary key (business_id, user_id), review_votes_funny TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_stars INTEGER, -- Example Values: `2`, `1`, `5`, `4`, `3` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 review_votes_cool TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 user_id INTEGER constraint Reviews_Users_user_id_fk references Users, -- review_votes_useful TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 100000 - Distinct count 5 - Null count 0 ); CREATE TABLE Checkins ( label_time_7 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_19 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_17 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_1 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_13 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_20 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_14 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_5 TEXT, -- Example Values: `None`, `Low`, `Medium`, `Uber`, `High` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_2 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_22 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 day_id INTEGER constraint Checkins_Days_day_id_fk references Days, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 80038 - Distinct count 7 - Null count 0 label_time_8 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_0 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_4 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_21 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_23 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High` | Value Statics: Total count 80038 - Distinct count 4 - Null count 0 label_time_9 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_11 TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_16 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_10 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_15 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 business_id INTEGER constraint Checkins_Business_business_id_fk references Business, -- constraint Checkins_pk primary key (business_id, day_id), label_time_12 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_18 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 label_time_3 TEXT, -- Example Values: `None`, `Low`, `Medium` | Value Statics: Total count 80038 - Distinct count 3 - Null count 0 label_time_6 TEXT, -- Example Values: `None`, `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 80038 - Distinct count 5 - Null count 0 ); CREATE TABLE Days ( day_id INTEGER constraint Days_pk primary key, day_of_week TEXT, -- Example Values: `Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 ); CREATE TABLE Years ( actual_year INTEGER, -- Example Values: `2005`, `2006`, `2007`, `2008`, `2009` | Value Statics: Total count 10 - Distinct count 10 - Null count 0 year_id INTEGER constraint Years_pk primary key, ); CREATE TABLE Business ( business_id INTEGER constraint Business_pk primary key, state TEXT, -- Example Values: `AZ`, `SC`, `CA` | Value Statics: Total count 15585 - Distinct count 3 - Null count 0 city TEXT, -- active TEXT, -- Example Values: `true`, `false` | Value Statics: Total count 15585 - Distinct count 2 - Null count 0 stars REAL, -- Example Values: `3.0`, `4.5`, `4.0`, `5.0`, `3.5` | Value Statics: Total count 15585 - Distinct count 9 - Null count 0 review_count TEXT, -- Example Values: `Low`, `Medium`, `High`, `Uber` | Value Statics: Total count 15585 - Distinct count 4 - Null count 0 ); CREATE TABLE Business_Attributes ( business_id INTEGER constraint Business_Attributes_Business_business_id_fk references Business, -- attribute_value TEXT, -- constraint Business_Attributes_pk primary key (attribute_id, business_id), attribute_id INTEGER constraint Business_Attributes_Attributes_attribute_id_fk references Attributes, -- ); CREATE TABLE Users_Compliments ( user_id INTEGER constraint Users_Compliments_Users_user_id_fk references Users, -- constraint Users_Compliments_pk primary key (compliment_id, user_id), number_of_compliments TEXT, -- Example Values: `Medium`, `Low`, `High`, `Uber` | Value Statics: Total count 98810 - Distinct count 4 - Null count 0 compliment_id INTEGER constraint Users_Compliments_Compliments_compliment_id_fk references Compliments, -- Example Values: `1`, `2`, `3`, `4`, `5` | Value Statics: Total count 98810 - Distinct count 11 - Null count 0 ); CREATE TABLE Compliments ( compliment_type TEXT, -- Example Values: `photos`, `cool`, `hot`, `note`, `more` | Value Statics: Total count 11 - Distinct count 11 - Null count 0 compliment_id INTEGER constraint Compliments_pk primary key, ); CREATE TABLE Users ( user_votes_cool TEXT, -- Example Values: `Low`, `Uber`, `None`, `High`, `Medium` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_yelping_since_year INTEGER, -- Example Values: `2012`, `2010`, `2009`, `2008`, `2013` | Value Statics: Total count 70817 - Distinct count 11 - Null count 0 user_average_stars TEXT, -- Example Values: `4.0`, `2.5`, `4.5`, `5.0`, `2.0` | Value Statics: Total count 70817 - Distinct count 10 - Null count 0 user_review_count TEXT, -- Example Values: `Medium`, `High`, `Low`, `Uber` | Value Statics: Total count 70817 - Distinct count 4 - Null count 0 user_votes_useful TEXT, -- Example Values: `Low`, `Medium`, `Uber`, `None`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_id INTEGER constraint Users_pk primary key, user_votes_funny TEXT, -- Example Values: `Low`, `None`, `Uber`, `Medium`, `High` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 user_fans TEXT, -- Example Values: `Low`, `None`, `Medium`, `High`, `Uber` | Value Statics: Total count 70817 - Distinct count 5 - Null count 0 );
book_publishing_company
Name all employees who were hired before year 1990.
hired before year 1990 refers to YEAR(hire_date)<1990
SELECT fname, lname FROM employee WHERE STRFTIME('%Y', hire_date) < '1990'
CREATE TABLE jobs ( max_lvl INTEGER not null, -- Example Values: `10`, `250`, `225`, `200`, `175` | Value Statics: Total count 14 - Distinct count 8 - Null count 0 job_desc TEXT not null, -- Example Values: `New Hire - Job not specified`, `Chief Executive Officer`, `Business Operations Manager`, `Chief Financial Officier`, `Publisher` | Value Statics: Total count 14 - Distinct count 14 - Null count 0 min_lvl INTEGER not null, -- Example Values: `10`, `200`, `175`, `150`, `140` | Value Statics: Total count 14 - Distinct count 9 - Null count 0 job_id INTEGER primary key, ); CREATE TABLE titles ( title_id TEXT primary key, advance REAL, -- Example Values: `5000.0`, `10125.0`, `0.0`, `15000.0`, `7000.0` | Value Statics: Total count 16 - Distinct count 10 - Null count 2 pubdate DATETIME not null, -- Example Values: `1991-06-12 00:00:00.0`, `1991-06-09 00:00:00.0`, `1991-06-30 00:00:00.0`, `1991-06-22 00:00:00.0`, `1991-06-18 00:00:00.0` | Value Statics: Total count 18 - Distinct count 10 - Null count 0 ytd_sales INTEGER, -- Example Values: `4095`, `3876`, `18722`, `2032`, `22246` | Value Statics: Total count 16 - Distinct count 12 - Null count 2 price REAL, -- Example Values: `19.99`, `11.95`, `2.99`, `22.95`, `20.0` | Value Statics: Total count 16 - Distinct count 11 - Null count 2 notes TEXT, -- Example Values: `An overview of available database systems with emphasis on common business applications. Illustrated.`, `Helpful hints on how to use your electronic resources to the best advantage.`, `The latest medical and psychological techniques for living with the electronic office. Easy-to-understand explanations.`, `Annotated analysis of what computers can do for you: a no-hype guide for the critical user.`, `Favorite recipes for quick, easy, and elegant meals.` | Value Statics: Total count 17 - Distinct count 17 - Null count 1 title TEXT not null, -- Example Values: `The Busy Executive's Database Guide`, `Cooking with Computers: Surreptitious Balance Sheets`, `You Can Combat Computer Stress!`, `Straight Talk About Computers`, `Silicon Valley Gastronomic Treats` | Value Statics: Total count 18 - Distinct count 18 - Null count 0 royalty INTEGER, -- Example Values: `10`, `24`, `12`, `16`, `14` | Value Statics: Total count 16 - Distinct count 5 - Null count 2 type TEXT not null, -- Example Values: `business`, `mod_cook`, `UNDECIDED`, `popular_comp`, `psychology` | Value Statics: Total count 18 - Distinct count 6 - Null count 0 pub_id TEXT, -- Example Values: `1389`, `0736`, `0877` | Value Statics: Total count 18 - Distinct count 3 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, ); CREATE TABLE employee ( job_id INTEGER not null, -- Example Values: `10`, `6`, `3`, `8`, `5` | Value Statics: Total count 43 - Distinct count 13 - Null count 0 minit TEXT, -- job_lvl INTEGER, -- foreign key (job_id) references jobs(job_id) on update cascade on delete cascade, emp_id TEXT primary key, foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pub_id TEXT not null, -- Example Values: `1389`, `9999`, `9952`, `0877`, `0736` | Value Statics: Total count 43 - Distinct count 8 - Null count 0 lname TEXT not null, -- fname TEXT not null, -- hire_date DATETIME not null, -- ); CREATE TABLE publishers ( country TEXT, -- Example Values: `USA`, `Germany`, `France` | Value Statics: Total count 8 - Distinct count 3 - Null count 0 state TEXT, -- Example Values: `MA`, `DC`, `CA`, `IL`, `TX` | Value Statics: Total count 6 - Distinct count 6 - Null count 2 city TEXT, -- Example Values: `Boston`, `Washington`, `Berkeley`, `Chicago`, `Dallas` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_name TEXT, -- Example Values: `New Moon Books`, `Binnet & Hardley`, `Algodata Infosystems`, `Five Lakes Publishing`, `Ramona Publishers` | Value Statics: Total count 8 - Distinct count 8 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE pub_info ( logo BLOB, -- Example Values: `0x4749463839618B002F00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000008B002F004004FFF0C949ABBD38EBCDBBFFA0048464089CE384A62BD596309CC6F4F58A287EBA79ED73B3D26A482C1A8FC8A47249FCCD76BC1F3058D94135579C9345053D835768560CFE6A555D343A1B6D3FC6DC2A377E66DBA5F8DBEBF6EEE1FF2A805B463A47828269871F7A3D7C7C8A3E899093947F666A756567996E6C519E167692646E7D9C98A42295ABAC24A092AD364C737EB15EB61B8E8DB58FB81DB0BE8C6470A0BE58C618BAC365C5C836CEA1BCBBC4C0D0AAD6D14C85CDD86FDDDFAB5F43A580DCB519A25B9BAE989BC3EEA9A7EBD9BF54619A7DF8BBA87475EDA770D6C58B968C59A27402FB99E2378FC7187010D5558948B15CC58B4E20CE9A762E62B558CAB86839FC088D24AB90854662BCD60D653E832BBD7924F49226469327FDEC91C6AD2538972E6FFEE429720D4E63472901251A33A9D28DB47A5A731A7325D56D50B36ADDAA2463D5AF1EAE82F5F84FAA946656AA21AC31D0C4BF85CBA87912D6D194D4B535C5DDDBA93221CB226D022E9437D89C594305FD321C0CB7DFA5C58223036E088F3139B9032563DD0BE66D2ACD8B2BCB9283CEDEE3C6A53EE39BA7579A62C1294917DC473035E0B9E3183F9A3BB6F7ABDE608B018800003B`, `0x474946383961C2001D00B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000C2001D004004FFF0C949ABBD38EBCDBBFF60288E1C609E2840AE2C969E6D2CCFB339D90F2CE1F8AEE6BC9FEF26EC01413AA3F2D76BAA96C7A154EA7CC29C449AC7A8ED7A2FDC2FED25149B29E4D479FD55A7CBD931DC35CFA4916171BEFDAABC51546541684C8285847151537F898A588D89806045947491757B6C9A9B9C9D9E9FA0A1A2A3A4A5A6A7A8A95A6A3E64169923B0901A775B7566B25D7F8C888A5150BE7B8F93847D8DC3C07983BEBDC1878BCFAF6F44BBD0AD71C9CBD653BFD5CEC7D1C3DFDB8197D8959CB9AAB8B7EBEEEFF0BA92F1B6B5F4A0F6F776D3FA9EBCFD748C01DCB4AB5DBF7C03CF1454070F61423D491C326BA18E211081250C7AB12867619825F37F2ECE1168AC242B6A274556D121D28FA46C11E78564C5B295308F21BBF5CAD6CCE52C7018813932C4ED5C517346B7C1C2683368349D49A19D0439D31538A452A916135A0B19A59AAB9E6A835A0EABD00E5CD11D1D478C1C59714053AA4C4955AB4B9956879AB497F62E1CBA2373DA25B752239F8787119390AB5806C74E1100003B`, `0x474946383961F5003400B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000F50034004004FFF0C949ABBD38EBCDBBFF60288E64D90166AA016CEBBEB02ACF746D67E82DC2ACEEFFC0A02997B31027C521EF25698D8E42230E049D3E8AD8537385BC4179DB6B574C26637BE58BF38A1EB393DF2CE55CA52731F77918BE9FAFCD6180817F697F5F6E6C7A836D62876A817A79898A7E31524D708E7299159C9456929F9044777C6575A563A68E827D9D4C8D334BB3B051B6B7B83A8490B91EB4B3BDC1C251A1C24BC3C8C9C8C5C4BFCCCAD0D135ACC36B2E3BBCB655AD1CDB8F6921DEB8D48AA9ADA46046D7E0DC829B9D98E9988878D9AAE5AEF875BC6DEFF7E7A35C9943F18CCA3175C0A4295C48625F3B8610234A0C17D159C289189515CC7531A3C7891BFF9B59FA4812634820F24AAA94882EA50D8BBB3E8813598B8A3D7C0D6F12CB8710E5BA7536D9ED3C458F8B509CF17CE94CEA658F254D944889528306E83C245089629DDA4F8BD65885049ACBB7ADAB2A5364AFDAF344902752409A6085FA39105EBB3C2DAB2E52FA8611B7ACFA060956CB1370598176DB3E74FB956CCCA77207BB6B8CAAAADEA3FFBE01A48CD871D65569C37E25A458C5C9572E57AADE59F7F40A98B456CB36560F730967B3737B74ADBBB7EFDABF830BE70B11F6C8E1C82F31345E33B9F3A5C698FB7D4E9D779083D4B313D7985ABB77E0C9B07F1F0F3EFA71F2E8ED56EB98BEBD7559306FC72C6995EA7499F3B5DDA403FF17538AB6FD20C9FF7D463D531681971888E0104E45069D7C742D58DB7B29B45454811B381420635135B5D838D6E487612F876D98D984B73D2820877DFD871523F5E161D97DD7FCB4C82E31BEC8176856D9D8487D95E1E5D711401AE2448EF11074E47E9D69359382E8A8871391880C28E5861636399950FEFCA55E315D8279255C2C6AA89899B68588961C5B82C366693359F1CA89ACACB959971D76F6E6607B6E410E9D57B1A9196A52BDD56636CC08BA519C5E1EDA8743688906DA9D53F2E367999656A96292E2781397A6264E62A04E25FE49A59354696958409B11F527639DEAC84E7795553A9AACA85C68E8977D2A7919A5A7F83329A46F0D79698BF60D98688CCC118A6C3F8F38E6D89C8C12F635E49145F6132D69DCCE684725FC0546C3B40875D79E70A5867A8274E69E8BAEAC1FEEC02E92EE3AA7ADA015365BEFBE83F2EB6F351100003B`, `0x474946383961E3002500B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C00000000E30025004004FFF0C949ABBD38EBCDBBFF60288E240858E705A4D2EA4E6E0CC7324DD1EB9CDBBAFCE1AC878DE7ABBD84476452C963369F2F288E933A595B404DB27834E67A5FEC37ACEC517D4EB24E5C8D069966361A5E8ED3C3DCA5AA54B9B2AE2D423082817F848286898386858754887B8A8D939094947E918B7D8780959E9D817C18986FA2A6A75A7B22A59B378E1DACAEB18F1940B6A8B8A853727AB5BD4E76676A37BFB9AF2A564D6BC0776E635BCE6DCFD2C3C873716879D4746C6053DA76E0DAB3A133D6D5B290929F9CEAEDEB6FA0C435EF9E97F59896EC28EEFA9DFF69A21C1BB4CA1E3E63084DB42B970FD6407D05C9E59298B0A2C58B18337AA0E88DA3468DC3FFD0692187A7982F5F2271B152162DE54795CEB0F0DAF8EBDA2A932F1FF203B38C484B6ED07674194ACD639679424B4EDB36279B4D3852FE1095266743955138C5209ADA6D5CB26DCDFC644DD351EACF804BCD32421A562DB6965F25AADD11B056BD7BA436C903E82A1D4A3D024769BAE777B0BB7887F51A0E022E9589BCFCE0DD6527597223C4917502ACBCF8D5E6C49F0B6FA60751A7C2748A3EE7DD6B70B5628F9A5873C6DB5936E57EB843C726043B95EBDE394F3584EC7096ED8DA60D86001EBCB9F3E72F99439F0E7DEC7297BA84D9924EFDB11A65566B8EFB510C7CC258DBB7779F7834A9756E6C97D114F95E5429F13CE5F7F9AAF51C996928604710FF544AFDC79717C10CD85157C6EDD75F7EB49C81D45C5EA9674E5BBBA065941BFB45F3D62D5E99E11488516568A15D1292255F635E8045E0520F3E15A0798DB5C5A08105EE52E3884C05255778E6F5C4A287CCB4D84D1D41CE08CD913C56656482EAEDE8E38D71B974553C199EC324573C3669237C585588E52D1ACE049F85521648659556CD83445D27C9F4D68501CE580E31748ED4948C0E3E88959B257C87E39D0A8EC5D812559234996A9EE5B6E864FE31BA5262971DE40FA5B75D9A487A9A79975C6AB5DD06EA6CCA9DB94FA6A1568AD8A4C33DBA6A5995EE5450AC0AA24A9C6DBAE9F6883CB48976D0ABA8D90AA9A88D6246C2ABA3FE8A1B43CA229B9C58AFC11E071AB1D1BE366DB5C9AE85DCA48595466B83AC95C61DA60D1146EEB3BB817ADA40A08CFBDBB2EB9972EB6EDB66D26D71768D5B2B1FEFC65B11AFA5FA96C93AF50AA6AFBEFE263C1DC0FCA2AB8AC210472C310A1100003B`, `0x4749463839615D002200B30F00000000800000008000808000000080800080008080808080C0C0C0FF000000FF00FFFF000000FFFF00FF00FFFFFFFFFF21F9040100000F002C000000005D0022004004FFF0C949ABBD38EBCDFB03DF078C249895A386AA68BB9E6E0ACE623ABD1BC9E9985DFFB89E8E366BED782C5332563ABA4245A6744AAD5AAF4D2276CBED5EA1D026C528B230CD38B2C92721D78CC4772526748F9F611EB28DE7AFE25E818283604A1E8788898A7385838E8F55856F6C2C1D86392F6B9730708D6C5477673758A3865E92627E94754E173697A6A975809368949BB2AE7B9A6865AA734F80A2A17DA576AA5BB667C290CDCE4379CFD2CE9ED3D6A7CCD7DAA4D9C79341C8B9DF5FC052A8DEBA9BB696767B9C7FD5B8BBF23EABB9706BCAE5F05AB7E6C4C7488DDAF7251BC062530EFE93638C5B3580ECD4951312C217C425E73E89D38709D79D810D393BD20A528CE0AA704AA2D4D3082E583C89BD2C2D720753E1C8922697D44CF6AE53BF6D4041750B4AD467C54548932A1D7374A9D3A789004400003B` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 foreign key (pub_id) references publishers(pub_id) on update cascade on delete cascade, pr_info TEXT, -- Example Values: `This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C. This is sample text data for Binnet & Hardley, publisher 0877 in the pubs database. Binnet & Hardley is located in Washington, D.C.`, `This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California. This is sample text data for Algodata Infosystems, publisher 1389 in the pubs database. Algodata Infosystems is located in Berkeley, California.`, `This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois. This is sample text data for Five Lakes Publishing, publisher 1622 in the pubs database. Five Lakes Publishing is located in Chicago, Illinois.`, `This is sample text data for Ramona Publishers, publisher 1756 in the pubs database. Ramona Publishers is located in Dallas, Texas.`, `This is sample text data for GGG&G, publisher 9901 in the pubs database. GGG&G is located in München, Germany.` | Value Statics: Total count 7 - Distinct count 7 - Null count 0 pub_id TEXT primary key, ); CREATE TABLE titleauthor ( foreign key (au_id) references authors(au_id) on update cascade on delete cascade, primary key (au_id, title_id), foreign key (title_id) references titles (title_id) on update cascade on delete cascade, au_ord INTEGER, -- Example Values: `1`, `2`, `3` | Value Statics: Total count 25 - Distinct count 3 - Null count 0 royaltyper INTEGER, -- Example Values: `100`, `40`, `30`, `60`, `50` | Value Statics: Total count 25 - Distinct count 7 - Null count 0 au_id TEXT not null, -- Example Values: `172-32-1176`, `213-46-8915`, `238-95-7766`, `267-41-2394`, `274-80-9391` | Value Statics: Total count 25 - Distinct count 19 - Null count 0 title_id TEXT not null, -- Example Values: `PS3333`, `BU1032`, `BU2075`, `PC1035`, `BU1111` | Value Statics: Total count 25 - Distinct count 17 - Null count 0 ); CREATE TABLE stores ( city TEXT, -- Example Values: `Seattle`, `Tustin`, `Los Gatos`, `Remulade`, `Fremont` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_name TEXT, -- Example Values: `Eric the Read Books`, `Barnum's`, `News & Brews`, `Doc-U-Mat: Quality Laundry and Books`, `Fricative Bookshop` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 stor_address TEXT, -- Example Values: `788 Catamaugus Ave.`, `567 Pasadena Ave.`, `577 First St.`, `24-A Avogadro Way`, `89 Madison St.` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 zip TEXT, -- Example Values: `98056`, `92789`, `96745`, `98014`, `90019` | Value Statics: Total count 6 - Distinct count 6 - Null count 0 state TEXT, -- Example Values: `WA`, `CA`, `OR` | Value Statics: Total count 6 - Distinct count 3 - Null count 0 stor_id TEXT primary key, ); CREATE TABLE authors ( address TEXT, -- city TEXT, -- Example Values: `Menlo Park`, `Oakland`, `Berkeley`, `San Jose`, `Lawrence` | Value Statics: Total count 23 - Distinct count 16 - Null count 0 au_fname TEXT not null, -- state TEXT, -- Example Values: `CA`, `KS`, `TN`, `OR`, `MI` | Value Statics: Total count 23 - Distinct count 8 - Null count 0 phone TEXT not null, -- contract TEXT not null, -- Example Values: `0` | Value Statics: Total count 23 - Distinct count 1 - Null count 0 au_lname TEXT not null, -- au_id TEXT primary key, zip TEXT, -- Example Values: `94025`, `94618`, `94705`, `95128`, `94609` | Value Statics: Total count 23 - Distinct count 18 - Null count 0 ); CREATE TABLE roysched ( title_id TEXT not null, -- Example Values: `BU1032`, `PC1035`, `BU2075`, `PS2091`, `PS2106` | Value Statics: Total count 86 - Distinct count 16 - Null count 0 hirange INTEGER, -- royalty INTEGER, -- Example Values: `10`, `12`, `14`, `16`, `18` | Value Statics: Total count 86 - Distinct count 8 - Null count 0 lorange INTEGER, -- foreign key (title_id) references titles(title_id) on update cascade on delete cascade, ); CREATE TABLE discounts ( highqty INTEGER, -- Example Values: `1000` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 discounttype TEXT not null, -- Example Values: `Initial Customer`, `Volume Discount`, `Customer Discount` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 stor_id TEXT, -- Example Values: `8042` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 lowqty INTEGER, -- Example Values: `100` | Value Statics: Total count 1 - Distinct count 1 - Null count 2 foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, discount REAL not null, -- Example Values: `10.5`, `6.7`, `5.0` | Value Statics: Total count 3 - Distinct count 3 - Null count 0 ); CREATE TABLE sales ( ord_num TEXT not null, -- Example Values: `6871`, `722a`, `A2976`, `QA7442.3`, `D4482` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 payterms TEXT not null, -- Example Values: `Net 60`, `Net 30`, `ON invoice` | Value Statics: Total count 21 - Distinct count 3 - Null count 0 ord_date DATETIME not null, -- Example Values: `1994-09-14 00:00:00.0`, `1994-09-13 00:00:00.0`, `1993-05-24 00:00:00.0`, `1992-06-15 00:00:00.0`, `1993-05-29 00:00:00.0` | Value Statics: Total count 21 - Distinct count 10 - Null count 0 stor_id TEXT not null, -- Example Values: `6380`, `7066`, `7067`, `7131`, `7896` | Value Statics: Total count 21 - Distinct count 6 - Null count 0 primary key (stor_id, ord_num, title_id), foreign key (stor_id) references stores(stor_id) on update cascade on delete cascade, title_id TEXT not null, -- Example Values: `BU1032`, `PS2091`, `PC8888`, `TC3218`, `TC4203` | Value Statics: Total count 21 - Distinct count 16 - Null count 0 qty INTEGER not null, -- Example Values: `5`, `3`, `50`, `75`, `10` | Value Statics: Total count 21 - Distinct count 11 - Null count 0 foreign key (title_id) references titles(title_id) on update cascade on delete cascade, );
food_inspection
Among the restaurants being inspected in 2016, how many of them are in San Francisco?
inspected in 2016 refers to YEAR(date) = 2016; San Francisco refers to city in ('San Francisco', 'SF' ,'S.F.', 'SAN FRANCISCO');
SELECT COUNT(DISTINCT T2.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2016' AND T2.city IN ('San Francisco', 'SAN FRANCISCO', 'SF', 'S.F.')
CREATE TABLE violations ( `risk_category` TEXT NOT NULL, -- Example Values: `Moderate Risk`, `Low Risk`, `High Risk` | Value Statics: Total count 36050 - Distinct count 3 - Null count 0 `date` DATE NOT NULL, -- `violation_type_id` TEXT NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `description` TEXT NOT NULL, -- `business_id` INTEGER NOT NULL, -- ); CREATE TABLE businesses ( `phone_number` INTEGER DEFAULT NULL, -- `postal_code` TEXT DEFAULT NULL, -- `owner_city` TEXT DEFAULT NULL, -- `owner_name` TEXT NOT NULL, -- `business_certificate` INTEGER NOT NULL, -- PRIMARY KEY (`business_id`), `owner_zip` TEXT DEFAULT NULL, -- `address` TEXT DEFAULT NULL, -- `longitude` REAL DEFAULT NULL, -- `owner_state` TEXT DEFAULT NULL, -- `tax_code` TEXT DEFAULT NULL, -- `latitude` REAL DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- `name` TEXT NOT NULL, -- `city` TEXT DEFAULT NULL, -- `owner_address` TEXT DEFAULT NULL, -- `application_date` DATE DEFAULT NULL, -- ); CREATE TABLE inspections ( `type` TEXT NOT NULL, -- Example Values: `Routine - Unscheduled`, `Reinspection/Followup`, `Complaint Reinspection/Followup`, `Non-inspection site visit`, `Complaint` | Value Statics: Total count 23764 - Distinct count 13 - Null count 0 `score` INTEGER DEFAULT NULL, -- `business_id` INTEGER NOT NULL, -- FOREIGN KEY (`business_id`) REFERENCES `businesses` (`business_id`), `date` DATE NOT NULL, -- );