db_id stringclasses 66
values | question stringlengths 24 325 | evidence stringlengths 1 673 ⌀ | gold_query stringlengths 23 804 | db_schema stringclasses 66
values |
|---|---|---|---|---|
movie_3 | List the films' titles which were rented by Brian Wyman in July, 2005. | rented in July 2005 refers to year (rental_date) = 2005 and month (rental_date) = 7 | SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'BRIAN' AND T1.last_name = 'WYMAN' AND STRFTIME('%Y', T2.rental_date) = '2005' AND STRFTIM... | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | Which of the top 3 economies by GDP has the lowest proportion of the economy devoted to agriculture? | Economies refers to countries | SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T2.GDP DESC, T2.Agriculture ASC LIMIT 1 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | What is the percentage of wholesaler customers who have shipment weight of not greater than 70000 pounds? | "wholesaler" is the cust_type; weight of not greater than 70000 pounds refers to weight < 70000; percentage = Divide (Count(cust_id where weight < 70000), Count(cust_id)) * 100 | SELECT CAST(SUM(CASE WHEN T2.weight < 70000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type = 'wholesaler' | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
authors | List all the title of the paper that Jianli Hua published. | Jianli Hua is the author of a paper | SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Jianli Hua' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | How many male clients born in the year 1977 were given priority 0 in their complaints? | male refers to sex = 'Male'; | SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.sex = 'Male' AND T2.priority = 0 AND T1.year = 1997 | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | List the films' titles which were rented on 24th May,2005. | rented on 24th May 2005 refers to rental_date = '2005-05-24%' | SELECT T1.title FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id WHERE SUBSTR(T3.rental_date, 1, 10) = '2005-05-24' | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | What nations are considered British Overseas Territories? | British Overseas Territories is one government form; Nation and country share the same meaning | SELECT name FROM country WHERE CODE IN ( SELECT country FROM politics WHERE government = 'British Overseas Territories' ) | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
public_review_platform | What is the closing and opening time of businesses located at Glendale with highest star rating? | Glendale is a city; the highest star rating refers to MAX(stars) | SELECT T2.opening_time, T2.closing_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Glendale' ORDER BY T1.stars 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 ... |
retail_complains | Lists the last name of all clients who made a PS-type complaint and were served by TOVA. | PS-type complaint refers to type = 'PS'; served by refers to server;
| SELECT t1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'PS' AND T2.server = 'TOVA' | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | Mention the language of Untouchables Sunrise film and calculate its rental cost per day. | "UNTOUCHABLES SUNRISE" is the title of film; language refers to name; rental cost per day = Divide (rental_cost, rental_duration) | SELECT T2.name, T1.replacement_cost / T1.rental_duration AS cost FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'UNTOUCHABLES SUNRISE' | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | How many Italian regions are bordered by the Mediterranean Sea? How deep is the Mediterranean Sea? | Reigion refers to province | SELECT COUNT(DISTINCT T2.province), T3.Depth FROM country AS T1 INNER JOIN located AS T2 ON T1.Code = T2.Country INNER JOIN sea AS T3 ON T3.Name = T2.Sea WHERE T1.Code = 'I' AND T3.Name = 'Mediterranean Sea' GROUP BY T3.Depth | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | Name the customer who sent the shipment to Oak Park. | "Oak Park" is the city_name; customer name refers to cust_name | SELECT T2.cust_name FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T1.city_id WHERE T3.city_name = 'Oak Park' | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
authors | What is the full name of the journal that published the paper "Multiple paternity in a natural population of a salamander with long-term sperm storage"? | paper "Multiple paternity in a natural population of a salamander with long-term sperm storage" refers to Title = 'Multiple paternity in a natural population of a salamander with long-term sperm storage' | SELECT T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Title = 'Multiple paternity in a natural population of a salamander with long-term sperm storage' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | How many clients under the age of 35 gave Eagle National Mortgage 1 star? | age < 35; Eagle National Mortgage refers to Product = 'Eagle National Mortgage'; | SELECT COUNT(T2.age) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle National Mortgage' AND T1.Stars = 1 AND T2.age < 35 | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | Write down any five film names under the documentary category. | "Documentary" is the name of category; film name refers to title | SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Documentary' LIMIT 5 | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | What province did the river Klaeaelv travel through and how long is the river? | null | SELECT T1.Province FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T3.Name = 'Klaraelv' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
public_review_platform | What is the most common type of compliments that a user has received from other users? | the most common type of compliments refers to MAX(COUNT(compliment_type)) | SELECT T2.compliment_type FROM Users_Compliments AS T1 INNER JOIN Compliments AS T2 ON T1.compliment_id = T2.compliment_id GROUP BY T2.compliment_type ORDER BY COUNT(T2.compliment_type) 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 ... |
authors | List all the paper that the journal "Theoretical Computer Science
" published in 2003. | 'Theoretical Computer Science' is the FullName; paper refers to Title; published in 2003 refers to Year = 2003 | SELECT DISTINCT T1.Title FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Theoretical Computer Science' AND T1.Year = 2003 AND T1.Title <> '' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | In which region have the most 1-star reviews been done? | most 1-star reviews refers to MAX(COUNT(stars = 1)); | SELECT T3.Region FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.Stars = 1 GROUP BY T3.Region ORDER BY COUNT(T3.Region) DESC LIMIT 1 | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | Distinguish the films performed by Judy Dean according to category. | films performed refers to film | SELECT T5.name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN film_category AS T4 ON T2.film_id = T4.film_id INNER JOIN category AS T5 ON T4.category_id = T5.category_id WHERE T1.first_name = 'Judy' AND T1.last_name = 'Dean' | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | How many businesses were founded after 1960 in a nation that wasn't independent? | Established means founded; Country means nation; Organization means businesses | SELECT COUNT(T3.Name) FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country INNER JOIN organization AS T3 ON T3.Country = T2.Country WHERE T2.Independence = NULL AND STRFTIME('%Y', T3.Established) > '1960' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | Give the phone of drivers who transported shipment weight of greater than 20000 pounds. | shipment weight of greater than 20000 pounds refers to Sum(weight) > 20000 | SELECT T2.phone FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id GROUP BY T2.driver_id HAVING SUM(T1.weight) > 20000 | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
authors | Who is the author of the paper titled "Open Sourcing Social Solutions (Building Communities of Change)"? | 'Open Sourcing Social Solutions (Building Communities of Change)' is a title of the paper; author refers to PaperAuthor.Name | SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Open Sourcing Social Solutions (Building Communities of Change)' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | How many male clients are from the state of Massachusetts? | male refers to sex = 'Male'; | SELECT COUNT(T3.sex) FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN client AS T3 ON T2.district_id = T3.district_id WHERE T1.state = 'Massachusetts' AND T3.sex = 'Male' | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | How many films in the horror category were included in PG-13-rated? | "Horror" is the name of category; PG-13 rated refers to rating = 'PG-13' | SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Horror' AND T1.rating = 'PG-13' | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | Please provide a list of every nation where English is spoken and utilized entirely. | Utilizition entirely means Percentage = 100% uses | SELECT T1.Name FROM country AS T1 INNER JOIN language AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'English' AND T2.Percentage = 100 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | What is the average annual revenue of customers who have shipment weight of less than 65000 pounds? | weight of less than 65000 pounds refers to weight < 65000; average annual revenue refers to AVG(annual_revenue) | SELECT AVG(T1.annual_revenue) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T2.weight < 65000 | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
public_review_platform | Find the location of businesses that has business hours from 7 am to 7 pm every Wednesday. | location of business refers to city; business hours from 7am to 7pm refers to opening_time = '7AM' AND closing_time = '7PM'; Wednesday refers to day_of_week = 'Wednesday' | SELECT DISTINCT T1.city FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T2.opening_time = '7AM' AND T2.closing_time = '7PM' AND T3.day_of_week = 'Wednesday' | 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 ... |
authors | How many papers are published in year 2000 under the conference "SSPR"? | SSPR is a ShortName; papers refers to Paper.Id | SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Year = 2000 AND T2.ShortName = 'SSPR' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | List priority 2 complaints by date received. | null | SELECT DISTINCT `Complaint ID` FROM callcenterlogs WHERE priority = 2 ORDER BY `Date received` DESC | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | List down the actors' full names who performed in "CHOCOLATE DUCK" film. | "CHOCOLATE DUCK" is the title of film; full name refers to first_name, last_name | SELECT T3.first_name, T3.last_name FROM film_actor AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id INNER JOIN actor AS T3 ON T1.actor_id = T3.actor_id WHERE T2.title = 'CHOCOLATE DUCK' | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | Please list the top 3 countries with the highest inflation rate. | null | SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T2.Inflation DESC LIMIT 3 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | How many customers are manufacturer? | "manufacturer" is the cust_type | SELECT COUNT(*) FROM customer WHERE cust_type = 'manufacturer' | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
public_review_platform | Count the active businesses that has an attribute of BYOB with high review count. | active business ID refers to active = 'true'; category of Food refers to category_name = 'Food'; attribute of BYOB refers to attribute_name = 'BYOB'; high review count refers to review_count = 'High' | SELECT COUNT(DISTINCT T1.business_id) FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T3.attribute_name = 'BYOB' AND T1.review_count = 'High' AND T1.active = '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 ... |
authors | Among the author who drafted the paper "A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus", which of them is/are affiliated with the Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea
? | author refers to PaperAuthor.Name; 'A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus' is the title; 'Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea' is an Affiliation | SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Affiliation = 'Asan Medical Center, University of Ulsan College of Medicine, Seoul, Korea' AND T1.Title = 'A Randomized Comparison of Sirolimus- Versus Paclitaxel-Eluting Stent Implantation in Patients With Diabetes Mellitus' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | What are the products that people who were born after 2005 complain about? | year > 2005; | SELECT DISTINCT T2.Product FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.year > 2005 | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | List down the film titles performed by Emily Dee. | null | SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Emily' AND T1.last_name = 'Dee' | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | Which country has three different religions-Anglicanism, Christianity, and Roman Catholicism and uses 100% English? | null | SELECT T2.Country FROM country AS T1 INNER JOIN religion AS T2 ON T1.Code = T2.Country INNER JOIN language AS T3 ON T3.Country = T2.Country WHERE (T2.Name = 'Anglican' OR T2.Name = 'Christian' OR T2.Name = 'Roman Catholic') AND T3.Name = 'English' AND T3.Percentage = 100 GROUP BY T1.Name HAVING COUNT(T1.Name) = 3 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | What is the last name of driver who transported shipment id 1088? | shipment id 1088 refers to ship_id = 1088 | SELECT T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_id = '1088' | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
public_review_platform | List the categories of active businesses in Glendale, AZ. | active business ID refers to active = 'true'; categories refers to category_name; Glendale is a city; AZ is a state | SELECT DISTINCT T3.category_name FROM Business_Categories AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T1.category_id = T3.category_id WHERE T2.active = 'true' AND T2.state = 'AZ' AND T2.city = 'Glendale' | 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 ... |
authors | Who authored the paper titled "Testing timed automata
"? | 'Testing timed automata' is a title of a paper; Who authored refers to PaperAuthor.Name | SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Testing timed automata' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | Calculate the difference in the average age of elderly and middle-aged clients in the Northeast region. | difference in the average = SUBTRACT(AVG(age BETWEEN 35 AND 55), AVG( age > 65)); elderly refers to age > 65; middle-aged refers to age BETWEEN 35 AND 55; | SELECT (CAST(SUM(CASE WHEN T1.age BETWEEN 35 AND 55 THEN T1.age ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age BETWEEN 35 AND 55 THEN 1 ELSE 0 END)) - (CAST(SUM(CASE WHEN T1.age > 65 THEN T1.age ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END)) AS difference FROM client AS T1 INNER JOIN district AS T2 O... | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | Calculate customers' total payment amount in August, 2005. | in August 2005 refers to payment_date like '2005-08%'; total payment amount refers to Sum(amount) | SELECT SUM(amount) FROM payment WHERE SUBSTR(payment_date, 1, 7) = '2005-08' | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | Which nation has the lowest proportion of people who speak an African language? Please state the nation's full name. | Nation and country share the same meaning. Proportion refers to percentage | SELECT T1.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'African' ORDER BY T2.Percentage ASC LIMIT 1 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | How many trucks were manufactured in year 2009? | manufactured in year 2009 refers to model_year = 2009 | SELECT COUNT(truck_id) FROM truck WHERE model_year = 2009 | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
public_review_platform | What is the opening time of the active businesses in Glendale that have a medium review count. | active business ID refers to active = 'true'; Glendale is a city; medium review count refers to review_count = 'Medium' | SELECT DISTINCT T2.opening_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city = 'Glendale' AND T1.review_count = 'Medium' AND T1.active = '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 ... |
authors | What is the conference homepage URL of the paper titled "Quality evaluation of long duration audiovisual content"? | homepage URL refers to HomePage; 'Quality evaluation of long duration audiovisual content' is the Title | SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Quality evaluation of long duration audiovisual content' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | List by their ID the complaints received by the company on 25/09/2014 that took the longest. | ID of the complaints refers to "Complaint ID"; on 25/09/2014 refers to "Date sent to company" = '2014-09-25'; took the longest = MAX(SUBTRACT("Date sent to company", "Date received")); | SELECT `Complaint ID` FROM events WHERE strftime('%J', `Date sent to company`) - strftime('%J', `Date received`) = ( SELECT MAX(strftime('%J', `Date sent to company`) - strftime('%J', `Date received`)) FROM events WHERE `Date sent to company` = '2014-09-25' ) AND `Date sent to company` = '2014-09-25' | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | What is the description and film title of ID 996? | ID 996 refers to film_id = 996 | SELECT description, title FROM film_text WHERE film_id = 996 | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | Which two nations are separated from one another by the longest border? Please include the entire names of the nations in your answer. | null | SELECT Country1, Country2 FROM borders ORDER BY Length DESC LIMIT 1 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
public_review_platform | Among the active businesses located at Goodyear, AZ, list the category and atrributes of business with a high review count. | active business ID refers to active = 'true'; Goodyear is a city; AZ is a state; high review count refers to review_count = 'High' | SELECT T3.category_name, T5.attribute_name FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id INNER JOIN Business_Attributes AS T4 ON T1.business_id = T4.business_id INNER JOIN Attributes AS T5 ON T4.attribute_id = T... | 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 ... |
authors | List all the paper that were under the conference homepage URL "http://www.irma-international.org/". | paper refers to Paper.Title; http://www.irma-international.org/ is the HomePage | SELECT T1.Title FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.HomePage = 'http://www.irma-international.org/' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
book_publishing_company | In the books published by US publishers, which book has the highest royalty? List these books in the descending order of royalty. | US publisher refers publisher in the US where country = 'USA'; | SELECT T1.title FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id INNER JOIN roysched AS T3 ON T1.title_id = T3.title_id WHERE T2.country = 'USA' ORDER BY T1.royalty DESC | 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 O... |
movie_3 | How many percent of customers were inactive? | inactive refers to active = 0; percent = Divide (Count (customer_id where active = 0), Count(customer_id)) * 100 | SELECT CAST(SUM(IIF(active = 0, 1, 0)) AS REAL) * 100 / COUNT(customer_id) FROM customer | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | Which lake is the largest in terms of both surface area and depth? | Area * Depth can represents the metric in terms of both surface area and depth | SELECT Name FROM lake ORDER BY Area * Depth DESC LIMIT 1 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | Where was shipment no. 1002 headed? | shipment no. 1002 refers to ship_id = 1002; where shipment was headed refers to city_name | SELECT T2.city_name FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1002' | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
authors | List the short name and home page URL of all the international conferences on artificial intelligence. | all the international conferences on artificial intelligence refers to FullName LIKE 'International Conference on Artificial Intelligence%' | SELECT ShortName, HomePage FROM Conference WHERE FullName LIKE 'International Conference on Artificial Intelligence%' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
book_publishing_company | Calculate the average level difference between the Marketing editors hired by the US and non-US publishers? | Marketing manager is a job description which refers to job_desc; US publisher refers publisher in the US where country = 'USA'; non-US publishers refers publisher not in the US where country! = 'USA'; job level refers to job_lvl; average level = AVG(job_lvl) | SELECT (CAST(SUM(CASE WHEN T1.country = 'USA' THEN job_lvl ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.country = 'USA' THEN 1 ELSE 0 END)) - (CAST(SUM(CASE WHEN T1.country != 'USA' THEN job_lvl ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.country != 'USA' THEN 1 ELSE 0 END)) FROM publishers AS T1 INNER JOIN employee AS T2 ON T1... | 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 O... |
movie_3 | What is the name and email of the staff in store ID 2? | name refers to first_name, last_name | SELECT first_name, last_name, email FROM staff WHERE store_id = 2 | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | In which city is the European Bank for Reconstruction and Development's headquarters? Please include the city and province where the headquarters are located in your answer. | null | SELECT City, Province FROM organization WHERE Name = 'European Bank for Reconstruction and Development' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | How many cities are in Connecticut? | "Connecticut" is the state | SELECT COUNT(*) FROM city WHERE state = 'Connecticut' | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
public_review_platform | What is the attribute value of an active business with a low review count and 3 stars which is located at Goodyear, AZ? | active business ID refers to active = 'true'; low review count refers to review_count = 'Low'; 3 stars refers to stars = 3; Goodyear is a city; AZ is a state | SELECT DISTINCT T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.state = 'AZ' AND T1.city = 'Goodyear' AND T1.active = 'true' AND T1.stars = 3 AND T1.review_count = '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 ... |
authors | What is the short name for "Software - Concepts and Tools / Structured Programming"? | 'Software - Concepts and Tools / Structured Programming' is the FullName; | SELECT ShortName FROM Journal WHERE FullName = 'Software - Concepts and Tools / Structured Programming' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | In what years were the clients who demanded more problems with Certificate of deposit born? | more problems with Certificate refers to MAX(COUNT("Sub-product" = '(CD) Certificate of deposit')); | SELECT T1.year FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Sub-product` = '(CD) Certificate of deposit' GROUP BY T1.year ORDER BY COUNT(T1.year) DESC LIMIT 1 | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | Calculate the average payment amount per customer. | average payment refers to AVG(amount) | SELECT AVG(amount) FROM payment GROUP BY customer_id | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | What is the population gap between the United Kingdom and Italy? | Population gap = Total population of the United Kingdom - Total population of Italy | SELECT MAX(Population) - MIN(Population) FROM country WHERE Name = 'United Kingdom' OR Name = 'Italy' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
authors | How many papers are published under the journal "Software - Practice and Experience"? | papers refers to Paper.Id; 'Software - Practice and Experience' is the FullName of a journal; | SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T2.FullName = 'Software - Practice and Experience' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | What is the medium through which most complaints are registered in Florida? | medium refers to "Submitted via"; most complaints refers to MAX(Complaint ID); Florida refers to state = 'florida'; | SELECT T3.`Submitted via` FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN events AS T3 ON T1.`Complaint ID` = T3.`Complaint ID` WHERE T2.state = 'FL' GROUP BY T1.`Complaint ID` ORDER BY COUNT(T1.`Complaint ID`) DESC LIMIT 1 | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | How many films rented on 26th May, 2005 were returned on 30th May, 2005? | rented on 26th May 2005 refers to rental_date = '2005-05-26'; return on 30th May, 2005 refers to return_date = '2005-05-30'; number of rented film refers to Count (rental_id) | SELECT COUNT(DISTINCT rental_id) FROM rental WHERE date(rental_date) BETWEEN '2005-05-26' AND '2005-05-30' | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | What is the geographic location of Aarhus city? Please provide the answer with the coordinates of the location. | Longitude, Latitude = coordinates of the location | SELECT Longitude, Latitude FROM city WHERE Name = 'Aarhus' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | What is the brand and model of truck used in shipment id 1055? | shipment id 1055 refers to ship_id = 1055; brand refers to make; model refers to model_year | SELECT T1.make, T1.model_year FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = '1055' | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
public_review_platform | List the closing time and day of week of active businesses in Goodyear with stars greater than the 80% of average age of star rating. | active business ID refers to active = 'true'; Goodyear is a city; Calculation = AVG(stars) * 0.8; businesses with stars greater than 80% of average star rating refers to stars > AVG(stars) * 0.8 | SELECT DISTINCT T2.closing_time, T3.day_of_week FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.active = 'true' AND T1.city = 'Goodyear' AND T1.stars > ( SELECT AVG(stars) * 0.8 FROM Business WHERE active = 'true' AND city = ... | 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 ... |
authors | From year 1991 to 2000, calculate the difference betweeen the total number of papers published under the conference "International Conference on Supercomputing " and "Informatik & Schule"? | From year 1991 to 2000 refers to Year BETWEEN 1991 AND 2000; papers refers to Paper.Id; 'International Conference on Supercomputing' AND 'Informatik & Schule' are the FullName of conference; calculate the difference between the total number of papers of these two conferences refers to SUBTRACT(SUM(Paper.Id where FullNa... | SELECT SUM(CASE WHEN T2.FullName = 'Informatik & Schule' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.FullName = 'International Conference on Supercomputing' THEN 1 ELSE 0 END) AS DIFF FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Year > 1990 AND T1.Year < 2001 | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | List by their ID number the 3 longest complaints. | ID number refers to "Complaint ID"; longest complaints refers to MAX(ser_time); | SELECT `Complaint ID` FROM callcenterlogs ORDER BY ser_time DESC LIMIT 3 | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | Among the films with the longest duration, list any five title with their descriptions and special features. | longest duration of film refers to Max(length) | SELECT title, description, special_features FROM film WHERE length = ( SELECT MAX(length) FROM film ) LIMIT 5 | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | How much more space does Asia have than Europe? | Asia and Europe are two continents. | SELECT MAX(Area) - MIN(Area) FROM continent WHERE Name = 'Asia' OR Name = 'Europe' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | What is the annual revenue of Klett & Sons Repair? | "Klett & Sons Repair" is the cust_name | SELECT annual_revenue FROM customer WHERE cust_name = 'Klett & Sons Repair' | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
public_review_platform | How many users with a long tip and 2 likes for their tip have a high number of fans? | long tip refers to tip_length = 'Long'; 2 likes refers to likes = 2; high number of fans refers to user_fans = 'High' | SELECT COUNT(DISTINCT T1.user_id) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T2.tip_length = 'Long' AND T2.likes = 2 AND T1.user_fans = 'High' | 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 ... |
book_publishing_company | List the title name, type, and price of the titles published by New Moon Books. Arrange the list in ascending order of price. | Eric the Read Books is a publisher which refers to pub_name; | SELECT T1.title, T1.type, T1.price FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.pub_name = 'New Moon Books' ORDER BY T1.price | 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 O... |
movie_3 | List down the films titles with the lowest replacement cost under the general audiences rating. | lowest replacement cost refers to Min(replacement_cost); under general audience rating refers to rating = G | SELECT title FROM film WHERE replacement_cost = ( SELECT MIN(replacement_cost) FROM film ) | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | Which nation has the smallest population, and where is its capital located? | null | SELECT Name, Capital FROM country ORDER BY Population ASC LIMIT 1 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
citeseer | What is the most cited word? How many papers was that word cited in? | most cited word refers to max(count(word_cited_id); | SELECT word_cited_id, COUNT(paper_id) FROM content GROUP BY word_cited_id ORDER BY COUNT(word_cited_id) DESC LIMIT 1 | CREATE TABLE cites
(
primary key (cited_paper_id, citing_paper_id),
cited_paper_id TEXT not null, --
citing_paper_id TEXT not null, --
);
CREATE TABLE paper
(
paper_id TEXT not null primary key,
class_label TEXT not null, -- Example Values: `Agents`, `IR`, `ML`, `AI`, `DB` | Value Statics: Total count 3312 - ... |
authors | What was the name of the paper that was published on "IEEE Transactions on Pattern Analysis and Machine Intelligence" in 2011? | 'IEEE Transactions on Pattern Analysis and Machine Intelligence' is the FullName of journal; 2011 refers to Year = '2011'; name of the paper refers to Title of paper | SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'IEEE Transactions on Pattern Analysis and Machine Intelligence' AND T2.Year = 2011 AND T2.Title <> '' | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | How many cases of billing dispute issues occurred in the Mountain division? | billing dispute refers to issue = 'Billing disputes'; | SELECT COUNT(T1.Issue) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.Issue = 'Billing disputes' AND T3.division = 'Mountain' | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | List the actors' IDs who have "KILMER" as last name. | null | SELECT actor_id FROM actor WHERE last_name = 'KILMER' | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | What is the name of Anguilla's capital, and where is it located? | Anguilla is a country | SELECT Capital, Province FROM country WHERE Name = 'Anguilla' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | How many customers who live in California that are retailers? | "retailer" is the cust_type; live in California refers to state = 'CA' | SELECT COUNT(*) FROM customer WHERE cust_type = 'retailer' AND state = 'CA' | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
public_review_platform | Among the businesses with a category of Food, what is the percentage of the business with greater than 3 stars? | category of food refers to category_name = 'Food'; calculation = DIVIDE(COUNT(stars > 3), SUM(stars)) | SELECT CAST(SUM(CASE WHEN T1.stars > 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.stars) FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Food' | 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 ... |
retail_complains | Among the calls from California, what percentage are priority 1? | California refers to state = 'California'; percentage = MULTIPLY(DIVIDE(SUM(priority = 1), COUNT("Complaint ID"), 1.0)); | SELECT CAST(SUM(CASE WHEN T1.priority = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.priority) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id INNER JOIN state AS T4 ON T3.state_abbrev = T4.StateCode WHERE T4.State = 'Ca... | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | Who are the top 5 actors with the highest number of films? List their full names and calculate the average number of films for each of the actors. | actors with highest number of films refers to actor_id with Max(Count(film_id)); full name refers to first_name, last_name; average number of film = Divide (Count(film_id), 5) | SELECT T.first_name, T.last_name, num FROM ( SELECT T1.first_name, T1.last_name, COUNT(T2.film_id) AS num FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 5 | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | Which nation has the highest GDP? Please give the nation's full name. | null | SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T2.GDP DESC LIMIT 1 | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
citeseer | Among all the citation, what is the percentage of paper ID under the Agents classification? | classification refers to class_label; class_label = 'Agents'; percentage = (divide(count(paper_id where class_label = 'Agents')), (count(paper_id)))*100; | SELECT CAST(COUNT(CASE WHEN class_label = 'Agents' THEN paper_id ELSE NULL END) AS REAL) * 100 / COUNT(paper_id) FROM paper | CREATE TABLE cites
(
primary key (cited_paper_id, citing_paper_id),
cited_paper_id TEXT not null, --
citing_paper_id TEXT not null, --
);
CREATE TABLE paper
(
paper_id TEXT not null primary key,
class_label TEXT not null, -- Example Values: `Agents`, `IR`, `ML`, `AI`, `DB` | Value Statics: Total count 3312 - ... |
authors | Calculate the total average number of papers published from 2002 to 2010 under the conference "Information and Knowledge Engineering". | average number of papers refers to DIVIDE(count(id), 9); published from 2002 to 2010 refers to Year BETWEEN 2002 AND 2010; 'Information and Knowledge Engineering' is the FullName of conference; | SELECT CAST(COUNT(T1.Id) AS REAL) / COUNT(DISTINCT T1.Year) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'Information and Knowledge Engineering' AND T1.Year >= 2002 AND T1.Year <= 2010 | CREATE TABLE Journal
(
FullName TEXT, --
ShortName TEXT, --
HomePage TEXT, --
Id INTEGER constraint Journal_pk primary key,
);
CREATE TABLE Conference
(
ShortName TEXT, --
Id INTEGER constraint Conference_pk primary key,
HomePage TEXT, --
FullName TEXT, --
);
CREATE TABLE Paper
(
Title TEXT, -- ... |
retail_complains | Find the number of service members who complained in Syracuse. | service members refers to client.client_id; Syracuse refers to city = 'Syracuse'; | SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Tags = 'Servicemember' AND T1.city = 'Syracuse' | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | What is the full name of the actor who has the highest number of restricted films? | restricted refers to rating = 'R'; highest number of film refers to Max(Count(film_id)); full name refers to first_name, last_name | SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T2.film_id) AS num FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.rating = 'R' GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1 | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
mondial_geo | What is the average population ratio of the countries in which organizations were established in 1947? | Average population ratio = Population / Area | SELECT T1.Population / T1.Area FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE STRFTIME('%Y', T2.Established) = '1947' | CREATE TABLE politics
(
Government TEXT, --
Country TEXT default '' not null primary key constraint politics_ibfk_1 references country on update cascade on delete cascade,
Independence DATE, --
Dependent TEXT constraint politics_ibfk_2 references country on update cascade on delete cascade, -- Example Values: `... |
shipping | How many shipments were shipped to customers living in California in year 2016? | living in California refers to state = 'CA'; in year 2016 refers to CAST(ship_date AS DATE) = 2016 | SELECT COUNT(*) AS per FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE STRFTIME('%Y', T2.ship_date) = '2016' AND T1.state = 'CA' | CREATE TABLE city
(
population INTEGER, --
state TEXT, --
city_name TEXT, --
city_id INTEGER primary key,
area REAL, --
);
CREATE TABLE driver
(
driver_id INTEGER primary key,
address TEXT, -- Example Values: `268 Richmond Ave`, `3574 Oak Limb Cv`, `1839 S Orleans St`, `3649 Park Lake Dr`, `749 E Mckell... |
citeseer | For all words cited in paper ID 315017, state the other paper ID and class label which also cited those words. | null | SELECT T1.class_label, T2.word_cited_id FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.paper_id = 315017 | CREATE TABLE cites
(
primary key (cited_paper_id, citing_paper_id),
cited_paper_id TEXT not null, --
citing_paper_id TEXT not null, --
);
CREATE TABLE paper
(
paper_id TEXT not null primary key,
class_label TEXT not null, -- Example Values: `Agents`, `IR`, `ML`, `AI`, `DB` | Value Statics: Total count 3312 - ... |
retail_complains | How many clients have an email account other than gmail.com? | email account other than gmail.com refers to email not like '%@gmail.com'; | SELECT COUNT(email) FROM client WHERE email NOT LIKE '%@gmail.com' | CREATE TABLE state
(
Region TEXT, -- Example Values: `South`, `West`, `Northeast`, `Midwest` | Value Statics: Total count 48 - Distinct count 4 - Null count 0
State TEXT, --
StateCode TEXT constraint state_pk primary key,
);
CREATE TABLE callcenterlogs
(
ser_time TEXT, --
"Complaint ID" TEXT, --
ser_exi... |
movie_3 | How many times was "Blanket Beverly" rented? | "BLANKET BEVERLY" is the title of film; rented times refers to count(rental_id) | SELECT COUNT(T3.rental_id) FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id WHERE T1.title = 'Blanket Beverly' | CREATE TABLE staff
(
last_name TEXT not null, -- Example Values: `Hillyer`, `Stephens` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
email TEXT, -- Example Values: `Mike.Hillyer@sakilastaff.com`, `Jon.Stephens@sakilastaff.com` | Value Statics: Total count 2 - Distinct count 2 - Null count 0
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.