db_id stringclasses 66
values | question stringlengths 24 325 | evidence stringlengths 1 673 ⌀ | gold_query stringlengths 23 804 | db_schema stringclasses 66
values |
|---|---|---|---|---|
trains | Among the cars on a train that runs in the east direction, how many of them have a flat roof and a circle load shape? | flat roof refers to roof = 'flat'; load_shape = 'circle' | SELECT SUM(CASE WHEN T1.load_shape = 'circle' THEN 1 ELSE 0 END)as count FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T2.direction = 'east' AND T1.roof = 'flat' | CREATE TABLE cars
(
`id` INTEGER NOT NULL, --
`load_shape` TEXT DEFAULT NULL, -- Example Values: `circle`, `hexagon`, `triangle`, `rectangle`, `diamond` | Value Statics: Total count 63 - Distinct count 5 - Null count 0
`train_id` INTEGER DEFAULT NULL, --
`load_num` INTEGER DEFAULT NULL, -- Example Values: `1... |
image_and_language | How many images have at least one pair of object samples with the relation "parked on"? | How many images have at least one pair of object samples with the relation "parked on" refers to count(IMG_ID) where OBJ1_SAMPLE_ID ! = OBJ2_SAMPLE_ID and PRED_CLASS = 'parked on' | SELECT SUM(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE 0 END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
address | Provide the zip codes, cities, and locations of the postal points that have Shared Reshipper as a bad alias. | latitude and longitude coordinates can be used to identify the location; | SELECT T1.zip_code, T2.city, T2.latitude, T2.longitude FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Shared Reshipper' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
trains | What is the total number of short cars on all the trains that run in the east direction? | short cars refers to len = 'short' | SELECT SUM(CASE WHEN T1.len = 'short' then 1 ELSE 0 END)as count FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T2.direction = 'east' | CREATE TABLE cars
(
`id` INTEGER NOT NULL, --
`load_shape` TEXT DEFAULT NULL, -- Example Values: `circle`, `hexagon`, `triangle`, `rectangle`, `diamond` | Value Statics: Total count 63 - Distinct count 5 - Null count 0
`train_id` INTEGER DEFAULT NULL, --
`load_num` INTEGER DEFAULT NULL, -- Example Values: `1... |
image_and_language | Please list all the predicted relation classes of object sample no.14 in image no.1. | predicted relation classes refers to PRED_CLASS; object sample no.14 in image no.1 refers to OBJ1_SAMPLE_ID = 14 AND OBJ2_SAMPLE_ID = 14 and IMG_ID = 1 | SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.OBJ1_SAMPLE_ID = 14 AND T2.OBJ2_SAMPLE_ID = 14 | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
trains | Trains that run in which direction have more rectangle-shaped cars in total? | more rectangle-shaped cars refers to MAX(rectCarsNum) | SELECT T1.direction FROM trains AS T1 INNER JOIN ( SELECT train_id, COUNT(id) AS rectCarsNum FROM cars WHERE shape = 'rectangle' GROUP BY train_id ) AS T2 ON T1.id = T2.train_id ORDER BY T2.rectCarsNum DESC | CREATE TABLE cars
(
`id` INTEGER NOT NULL, --
`load_shape` TEXT DEFAULT NULL, -- Example Values: `circle`, `hexagon`, `triangle`, `rectangle`, `diamond` | Value Statics: Total count 63 - Distinct count 5 - Null count 0
`train_id` INTEGER DEFAULT NULL, --
`load_num` INTEGER DEFAULT NULL, -- Example Values: `1... |
image_and_language | How many pairs of object samples in image no.1 have the relation of "parked on"? | pairs of object samples refers to OBJ1_SAMPLE_ID and OBJ2_SAMPLE_ID; image no.1 refers to IMG_ID = 1; relation of "parked on" refers to PRED_CLASS = 'parked on' | SELECT SUM(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE 0 END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 1 AND T2.OBJ1_SAMPLE_ID != OBJ2_SAMPLE_ID | CREATE TABLE OBJ_CLASSES
(
OBJ_CLASS TEXT not null, --
OBJ_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE ATT_CLASSES
(
ATT_CLASS TEXT not null, --
ATT_CLASS_ID INTEGER default 0 not null primary key,
);
CREATE TABLE IMG_OBJ_ATT
(
IMG_ID INTEGER default 0 not null, --
foreign key (IMG_ID... |
address | Provide the zip codes and their affiliated organization for the postal point under Kingsport-Bristol, TN-VA. | postal point under Kingsport-Bristol, TN-VA refers to zip_code where CBSA_name = 'Kingsport-Bristol, TN-VA'; affiliated organization refers to organization from CBSA; | SELECT T2.zip_code, T2.organization FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Kingsport-Bristol, TN-VA' | CREATE TABLE state
(
name TEXT, --
abbreviation TEXT primary key,
);
CREATE TABLE country
(
zip_code INTEGER, --
foreign key (state) references state(abbreviation),
county TEXT, --
primary key (zip_code, county),
state TEXT, --
foreign key (zip_code) references zip_data(zip_code),
);
CREATE TABLE area... |
trains | How many cars on a train that runs in the east direction have a flat roof? | flat roof refers to roof = 'flat' | SELECT SUM(CASE WHEN T1.roof = 'flat' THEN 1 ELSE 0 END)as count FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T2.direction = 'east' | CREATE TABLE cars
(
`id` INTEGER NOT NULL, --
`load_shape` TEXT DEFAULT NULL, -- Example Values: `circle`, `hexagon`, `triangle`, `rectangle`, `diamond` | Value Statics: Total count 63 - Distinct count 5 - Null count 0
`train_id` INTEGER DEFAULT NULL, --
`load_num` INTEGER DEFAULT NULL, -- Example Values: `1... |
movie_3 | In films with a length duration of 113 minutes, how many of the films are starred by Kirk Jovovich? | length duration of 113 minutes refers to length = 113; 'Kirk Jovovich' is a full name of an actor; full name refers to first_name, last_name | SELECT COUNT(T1.actor_id) 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.length = 113 AND T1.first_name = 'Kirk' AND T1.last_name = 'Jovovich' | 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 | Name the first organisation established in the Paris city. State its abbreviation, full name and date of establishment. | Paris is a city | SELECT Abbreviation, Name, Established FROM organization WHERE City = 'Paris' ORDER BY Established 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 much is the annual revenue of the customer with the most number of shipments? | customer with the most number of shipment refers to cust_id where Max(Count(ship_id)) | SELECT T2.annual_revenue FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_id ORDER BY COUNT(T1.cust_id) DESC LIMIT 1 | 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 down the business ID with a high review count in Tempe. | Tempe is a city; high review count refers to review_count = 'High' | SELECT business_id FROM Business WHERE review_count = 'High' AND city = 'Tempe' | 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 authors affiliated with Soongsil University, list the authors' names and papers published during the year 2000. | authors affiliated with Soongsil University refers to Affiliation = 'Soongsil University' | SELECT T2.Title, T1.Name FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Affiliation = 'Soongsil University' AND T2.Year = 2000 | 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 complaints were served in 5 minutes or less by DORIT and responded to the customer with an explanation, were made by phone? | served in 5 minutes or less refers to ser_time < '00:05:00'; DORIT refers to server = 'DORIT'; responded with an explanation refers to "Company response to consumer" = 'Closed with explanation'; made by refers to "Submitted via"; | SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T1.ser_time < '00:05:00' AND T1.server = 'DORIT' AND T2.`Submitted via` = 'Phone' AND T2.`Company response to consumer` = 'Closed with explanation' | 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 inventory ID of the film titled "African Egg". | 'African Egg' is a title of a film | SELECT T2.inventory_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.title = 'African Egg' | 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 | For each organisations with headquarters in the USA, provide the its full name and the city where the headquarter is located at. | null | SELECT Name, City FROM organization WHERE Country = 'USA' | 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 which belong to New Jersey have transported weight greater than 20000? | "New Jersey" is the state; transported weight greater than 20000 refers to Sum(weight) > 20000 | SELECT COUNT(*) FROM ( SELECT T2.city_id AS CITYID FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'New Jersey' GROUP BY T2.city_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... |
retail_complains | What is the name of the state in which there have been the largest number of complaints with priority 0? | largest number of complaints refers to MAX(COUNT("Complaint ID") WHERE priority = 0); | SELECT T2.state 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 T1.priority = 0 GROUP BY T2.state ORDER BY COUNT(T2.state) 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 | Among the films starred by Angelina Astaire, what is the title of the film with a replacement cost of 27.99? | Angelina Astaire' is a full name of an actor; full name refers to first_name, last_name | 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 = 'Angelina' AND T1.last_name = 'Astaire' AND T3.replacement_cost = 27.99 | 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 | Provide a list of all organisations with headquarters in London? | London is a city | SELECT Name FROM organization WHERE City = 'London' | 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 does each driver deliver per month on average? | shipment data was for 24 months in 2016 and 2017 respectively; deliver per month on average refers to Divide(Count(ship_id), Multiply (24, Count(driver_id))) | SELECT CAST(COUNT(*) AS REAL) / (12 * COUNT(T2.driver_id)) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id | 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 down the business ID with a star range from 3 to 5, located at Chandler. | businesses with a star range from 3 to 5 refers to stars BETWEEN 3 AND 5; Chandler is a city | SELECT business_id FROM Business WHERE stars >= 3 AND stars < 6 AND city = 'Chandler' | 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 the names of authors affiliated with the University of Oxford in alphabetical order. | affiliated with the University of Oxford refers to Affiliation = 'University of Oxford' | SELECT Name FROM Author WHERE Affiliation = 'University of Oxford' ORDER BY Name ASC | 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 complaints made by women and served after 3 pm received a timely response from the company? | women refers to sex = 'Female'; served after 3 pm refers to ser_time BETWEEN '15:00:01' AND '23:59:59'; received a timely response refers to "Timely response?" = 'Yes'; | SELECT COUNT(T1.`Complaint ID`) 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.sex = 'Female' AND T1.ser_start BETWEEN '15:00:01' AND '23:59:59' AND T3.`Timely response?` = 'Yes' | 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 films with store ID of 2, list the title of films with the highest rental rate. | highest rental rate refers to MAX(rental_rate) | SELECT T1.title FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.store_id = 2 ORDER BY rental_rate 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 | Name all the organisations that were established from 1970 to 1980. | null | SELECT Name FROM organization WHERE STRFTIME('%Y', Established) BETWEEN '1970' AND '1980' | 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 | Among all shipments delivered by Sue Newel, identify the percentage of shipments that were placed by Autoware Inc. | "Autoware Inc" is the cust_name; percentage = Divide (Count(ship_id where cust_name = 'Autoware Inc'), Count(ship_id)) * 100 | SELECT CAST(SUM(CASE WHEN T3.cust_name = 'Autoware Inc' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) AS per FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id INNER JOIN customer AS T3 ON T3.cust_id = T1.cust_id WHERE T2.first_name = 'Sue' AND T2.last_name = 'Newell' | 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 of the businesses are in Surprise? | Surprise is a city | SELECT COUNT(business_id) FROM Business WHERE city = 'Surprise' | 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 | How many reviews by people between 30 and 50 years include the word 'great'? | between 30 and 50 years refers to age BETWEEN 30 AND 50; include the word great refers to Review like '%Great%'; | SELECT COUNT(T1.Reviews) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.age BETWEEN 30 AND 50 AND T1.Reviews LIKE '%great%' | 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 | Give the title of the film starred by Liza Bergman with the highest replacement cost. | Liza Bergman' is a full name; full name refers to first_name, last_name; highest replacement cost refers to MAX(replacement_cost) | 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 = 'Liza' AND T1.last_name = 'Bergman' ORDER BY replacement_cost 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 full name of ABEDA and when was it established? | null | SELECT Name, Established FROM organization WHERE Abbreviation = 'ABEDA' | 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 | State the weight of shipments transported by Peterbilt. | "Peterbilt" is the make | SELECT T2.weight FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE make = 'Peterbilt' | 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... |
book_publishing_company | For the quantities, what percent more did the store in Fremont sell than the store in Portland in 1993? | qty is abbreviation for quantity; Fremont and Portland are name of city; sell in 1993 refers to YEAR(ord_date) = 1993; percentage = DIVIDE(
SUBTRACT(SUM(qty where city = ‘Fremont’ and year(ord_date = 1993)),
SUM(qty where city = ‘Portland’ and year(ord_date = 1993))), SUM(qty where city = ‘Fremont’ and year(ord_date =... | SELECT CAST(SUM(CASE WHEN T2.city = 'Fremont' THEN qty END) - SUM(CASE WHEN T2.city = 'Portland' THEN qty END) AS REAL) * 100 / SUM(CASE WHEN T2.city = 'Fremont' THEN qty END) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE STRFTIME('%Y', T1.ord_date) = '1993' | 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 the actor's last name that starred the film with the description of "A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies". | null | SELECT T1.last_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 WHERE T3.description = 'A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies' | 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 proportion of rivers have a length of more than 3,000 miles? Please provide the name of a Russian river that is more than 3,000 miles long. | Proportion of rivers with lengths greater than 3,000 miles = [(Total number of rivers with lengths greater than 3,000 miles) / (Total number of rivers)] * 100% | SELECT CAST(SUM(CASE WHEN T1.Length > 3000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Name) FROM river AS T1 INNER JOIN located AS T2 ON T1.Name = T2.River INNER JOIN country AS T3 ON T3.Code = T2.Country | 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 total number of active businesses in AZ with a medium review count? | active businesses refers to active = 'true'; AZ is a state; medium review count refers to review_count = 'Medium' | SELECT COUNT(business_id) FROM Business WHERE review_count = 'Medium' AND state = 'AZ' AND 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 average number of papers published in the World Computer Congress each year? | published in the World Computer Congress refers to FullName = 'World Computer Congress'; average refers to DIVIDE(COUNT(FullName = 'World Computer Congress'), COUNT(Id)) | SELECT CAST(SUM(CASE WHEN T2.FullName = 'International Congress Series' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Id) AS Div1, T1.Year FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id GROUP BY T1.YEAR HAVING Div1 != 0 | 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 complaints from female clients born in the year 2000 were not sent through the web? | female refers to sex = 'Female'; sent through refers to "Submitted via"; not sent through web refers to "Submitted via" ! = 'Web';
| SELECT COUNT(T2.`Submitted via`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Female' AND T1.year = 2000 AND T2.`Submitted via` != 'Web' | 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 customers with customer ID of 100 and below, how many of them have Thomas as their last name? | customer ID of 100 and below refers to customer_id < 100 | SELECT COUNT(customer_id) FROM customer WHERE last_name = 'Thomas' AND customer_id < 100 | 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 percentage of nations have achieved independence since 1993 and practice parliamentary democracy? Please include any three parliament-based democracies that attained independence after 1993. | Percentage of rivers with lengths greater than 3,000 miles = [(Total number of rivers with lengths greater than 3,000 miles) / (Total number of rivers)] * 100% | SELECT SUM(IIF(government = 'parliamentary democracy', 1, 0)) , CAST(SUM(IIF(government = 'parliamentary democracy', 1, 0)) AS REAL) * 100 / COUNT(*) FROM politics AS t1 WHERE STRFTIME('%Y', independence) >= '1993' | 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 | Among all shipments placed by Sunguard Window Tinting & Truck Accessories in 2017, identify the percentage of shipments whose weight exceeded 10,000 pounds. | "Sunguard Window Tinting & Truck Accessories" is the cust_name; weight exceed 10,000 pounds refers to weight > = 10000; in 2017 refers to Cast(ship_date AS DATE) = 2017; percentage = Divide (Sum(weight > = 10000), Sum(weight)) * 100 | SELECT CAST(SUM(CASE WHEN T1.weight >= 10000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.cust_name = 'Sunguard Window Tinting & Truck Accessories' AND STRFTIME('%Y', T1.ship_date) = '2017' | 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 review length of user 11021 to business with business ID 3? | review length refers to review_length; user 11021 refers to user_id = 11021; business ID 3 refers to business_id = 3 | SELECT review_length FROM Reviews WHERE user_id = 11021 AND business_id = 3 | 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 | How many clients with the last name Alvarado are from Maryland? | The abbreviation of Maryland is 'MD'; | SELECT COUNT(T2.client_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T1.state_abbrev = T3.StateCode WHERE T2.last = 'Alvarado' AND T2.state = 'MD' | 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 have a rental rate of 0.99? | null | SELECT COUNT(film_id) FROM film WHERE rental_rate = 0.99 | 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 volcano mountain in the province of Ecuador. | null | SELECT T1.Name FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province WHERE T3.Name = 'Ecuador' AND T1.Type = 'volcano' | 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 | In how many businesses with the ambience_trendy attribute? | ambience_trendy attribute refers to attribute_name = 'ambience_trendy' AND attribute_value = 'false' | SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name = 'ambience_trendy' AND T2.attribute_value IN ('none', 'no', 'false') | 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 the title and author's name of papers published in the 2007 Neoplasia journal. | published in the 2007 refers to Year = 2007; Neoplasia journal refers to FullName = 'Neoplasia' | SELECT T1.Title, T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T3.FullName = 'Neoplasia' AND T1.Year = 2007 | 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 full address of the customers who, having received a timely response from the company, have dispute about that response? | full address = address_1, address_2; received a timely response refers to Timely response? = 'Yes'; have dispute refers to "Consumer disputed?" = 'Yes'; | SELECT T1.address_1, T1.address_2 FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'Yes' AND T2.`Consumer disputed?` = 'Yes' | 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 | Provide the full names and emails of customers whose payments were greater than 70% of the average. | full name refers to first_name, last_name; average payment refers to AVG(amount); payments were greater than 70% of the average refers to amount > (AVG(amount) MULTIPLY 0.7) | SELECT DISTINCT T2.first_name, T2.last_name, T2.email FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T2.address_id = T3.address_id WHERE T1.amount > ( SELECT AVG(amount) FROM payment ) * 0.7 | 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 kind of mountain is Ampato? Which province and nation does this mountain belong to? | Nation refers to country | SELECT T1.Type, T3.Name, T4.Name FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN country AS T4 ON T3.Country = T4.Code WHERE T1.Name = 'Ampato' | 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 whose polulation is larger than 50000 pounds have shipment in 2017? | population is larger than 50000 refers to population > 50000 | SELECT COUNT(*) FROM city AS T1 INNER JOIN shipment AS T2 ON T1.city_id = T2.city_id WHERE T1.population > 50000 AND STRFTIME('%Y', T2.ship_date) = '2017' | 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 active business ID and its stars of the businesses fall under the category of Food. | active business ID refers to active = 'true'; category of Food refers to category_name = 'Food' | SELECT DISTINCT T1.business_id, 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' 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 | Write the titles of papers published by Adam Jones and the journal name in which it was published from 2005 to 2010. | published from 2005 to 2010 refers to Year BETWEEN 2005 AND 2010; published by Adam Jones refers to Name = 'Adam Jones' | SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T2.Name = 'Adam Jones' AND T1.Year BETWEEN 2005 AND 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, -- ... |
movie_3 | Calculate the total payment amount by Diane Collins. | 'Diane Collins' is a full name of a customer; full name refers to first_name, last_name | SELECT SUM(T2.amount) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Diane' AND T1.last_name = 'Collins' | 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 constitutional monarchy nations saw the greatest growth in the number of organizations after 1907? | Nation refers to country; Information of growth appears in the column Established | SELECT T1.Name FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country INNER JOIN politics AS T3 ON T3.Country = T2.Country WHERE STRFTIME('%Y', T2.Established) > '1907' AND T3.Government = 'constitutional monarchy' GROUP BY T1.Name ORDER BY COUNT(DISTINCT T2.Name) 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 | What is the brand of truck used in shipment id 1011? | shipment id 1011 refers to ship_id = 1011; brand of truck refers to make | SELECT T1.make FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = '1011' | 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... |
retail_complains | On which day was the most verbose complaint received? | day received refers to "Date received"; most verbose complaint refers to MAX(ser_time); | SELECT `Date received` FROM callcenterlogs WHERE ser_time = ( SELECT MAX(ser_time) FROM callcenterlogs ) | 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 | Provide any 5 customers' full names who have rented from Mike Hillyer. | full name refers to first_name, last_name; 'Mike Hillyer' is a full name of a staff; | SELECT T3.first_name, T3.last_name FROM staff AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.first_name = 'Mike' AND T1.last_name = 'Hillyer' 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 sea does the Baltic Sea converge with, and how deep is the Baltic Sea? | Coverage refers to mergesWith | SELECT T2.Sea2, T1.Depth FROM sea AS T1 INNER JOIN mergesWith AS T2 ON T1.Name = T2.Sea1 WHERE T1.Name = 'Baltic Sea' | 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 did Holger Nohr transport to North Las Vegas overall? | "North Las Vegas" is the city_name | SELECT COUNT(*) FROM driver AS T1 INNER JOIN shipment AS T2 ON T1.driver_id = T2.driver_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id WHERE T1.first_name = 'Holger' AND T1.last_name = 'Nohr' AND T3.city_name = 'North Las Vegas' | 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 | Give the title and author's name of the papers published between 2000 and 2005 that include the topic optical properties. | published between 2000 and 2005 refers to Year BETWEEN 2000 AND 2005; include the topic optical properties refers to Keyword LIKE '%optical properties%' | SELECT T1.Title, T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Keyword LIKE '%optical properties%' AND T1.Year BETWEEN 2000 AND 2005 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, -- ... |
book_publishing_company | Of the titles, which title is about the Carefully researched study of the effects of strong emotions on the body, which state-based publisher published this book, and what is the year-to-date sale? | year to date sales refers to ytd_sales; about the title refers to notes | SELECT T1.title, T2.pub_name, T1.ytd_sales FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Carefully researched study of the effects of strong emotions on the body. Metabolic charts included.' | 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 | Provide the email, address, city, and country of the customer Lillie Kim. | 'Lillie Kim' is the full name of a customer; full name refers to first_name, last_name | SELECT T1.email, T2.address, T3.city, T4.country FROM customer AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id INNER JOIN city AS T3 ON T2.city_id = T3.city_id INNER JOIN country AS T4 ON T3.country_id = T4.country_id WHERE T1.first_name = 'Lillie' AND T1.last_name = 'Kim' | 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 desert in Kazakhstan is the largest? | null | SELECT T1.Name FROM desert AS T1 INNER JOIN geo_desert AS T2 ON T1.Name = T2.Desert INNER JOIN country AS T3 ON T3.Code = T2.Country WHERE T3.Name = 'Kazakstan' ORDER BY T1.Area 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 | List out the state of driver who transported the shipment id 1055. | shipment id 1055 refers to ship_id = 1055 | SELECT T2.state FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.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 | In users yelping since 2009 to 2011, how many of them have low count of fans? | users in yelping since 2009 to 2011 refers to user_yelping_since_year BETWEEN 2009 AND 2011; low count of fans refers to user_fans = 'Low' | SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year >= 2009 AND user_yelping_since_year < 2012 AND user_fans = '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 | Give the Title and author's name of the books that were preprint in 1997. | in 1997 refers to Year = 1997; books that were preprint refers to ConferenceId = 0 AND JournalId = 0 | SELECT DISTINCT T2.Name, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.ConferenceId = 0 AND T1.JournalId = 0 AND T1.Year = 1997 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 | How many complaints from customers with a gmail.com email were received by the company in February 2017? | gmail.com email refers to email like '%gmail.com'; in February 2017 refers to "Date received" BETWEEN '2017-01-02' AND '2017-02-28'; | SELECT COUNT(T1.email) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE (T2.`Date received` LIKE '2017-02%' OR T2.`Date received` LIKE '2017-01%') AND T1.email 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 much percentage of the film did Mary Keitel perform more than Angela Witherspoon? | 'Mary Keitel' AND 'Angela Witherspoon' are full name of actors; full name refers to FirstName, LastName; calculation = DIVIDE(SUBTRACT(SUM('Mary Keitel'), SUM('Angela Witherspoon')), SUM('Angela Witherspoon')) * 100 | SELECT CAST((SUM(IIF(T1.first_name = 'ANGELA' AND T1.last_name = 'WITHERSPOON', 1, 0)) - SUM(IIF(T1.first_name = 'MARY' AND T1.last_name = 'KEITEL', 1, 0))) AS REAL) * 100 / SUM(IIF(T1.first_name = 'MARY' AND T1.last_name = 'KEITEL', 1, 0)) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_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 | Which nations have a boundary with the Kalahari Desert? | Nation refers to country | SELECT T3.Name FROM desert AS T1 INNER JOIN geo_desert AS T2 ON T1.Name = T2.Desert INNER JOIN country AS T3 ON T3.Code = T2.Country WHERE T1.Name = 'Kalahari' | 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 authors drafted the paper "Subcellular localization of nuclease in barley aleurone"? | 'Subcellular localization of nuclease in barley aleurone' is the title of paper | SELECT COUNT(DISTINCT T2.Name) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Subcellular localization of nuclease in barley aleurone' | 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 | Which complaint is more urgent, complaint ID CR2400594 or ID CR2405641? | more urgent refers to MAX(priority); | SELECT CASE WHEN SUM(CASE WHEN `Complaint ID` = 'CR2400594' THEN priority END) > SUM(CASE WHEN `Complaint ID` = 'CR2405641' THEN priority END) THEN 'CR2400594' ELSE 'CR2405641' END FROM callcenterlogs | 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 how many percent of customers were located in India. | 'India' is a country; calculation = DIVIDE(SUM(country = 'India'), COUNT(customer_id)) * 100 | SELECT CAST(SUM(IIF(T1.country = 'India', 1, 0)) AS REAL) * 100 / COUNT(T4.customer_id) FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id INNER JOIN address AS T3 ON T2.city_id = T3.city_id INNER JOIN customer AS T4 ON T3.address_id = T4.address_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 | Which company falls under the category of an associated member? Please provide the organization's full name. | null | SELECT NAME FROM organization WHERE country IN ( SELECT country FROM politics WHERE dependent != '' ) | 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 model year of the truck used in shipment id 1003? | shipment id 1003 refers to ship_id = 1003 | SELECT T1.model_year FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = '1003' | 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 | In businesses with a category of food, how many of them have a star rating below 3? | category of food refers to category_name = 'Food'; star rating below 3 refers to stars < 3 | SELECT COUNT(DISTINCT T1.business_id) 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' AND T1.stars < 3 | 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 | Find the names of papers which are published in the year 1996. | null | SELECT Title FROM Paper WHERE year = 1996 | 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 percentage of clients who sent their complaints by postal mail are age 50 and older? | percentage = MULTIPLY(DIVIDE(SUM("Submitted via" = 'Postal mail'), COUNT(client_id)), 1.0); sent their complaints by refers to "Submitted via"; age > 50; | SELECT CAST(SUM(CASE WHEN T1.age > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Submitted via`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Postal mail' | 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 | Describe the full names and cities of the customers who rented "DREAM PICKUP". | full name refers to first_name, last_name; 'DREAM PICKUP' is a title of film | SELECT T4.first_name, T4.last_name, T6.city 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 INNER JOIN customer AS T4 ON T3.customer_id = T4.customer_id INNER JOIN address AS T5 ON T4.address_id = T5.address_id INNER JOIN city AS T6 ON T... | 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 name any three sovereign nations that have been governed by the republic since 1991. | Nation refers to country | SELECT country FROM politics WHERE government = 'republic' AND STRFTIME('%Y', independence) >= '1991' AND country IN ( SELECT country FROM country ) ORDER BY independence 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 | Give the full name of driver who transported the items on 3/2/2016. | on 3/2/2016 refers to ship_date = '2016-02-03'; full name refers to first_name, last_name | SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_date = '2016-03-02' | 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 category of the business with short review length and highest review stars within business ID from 7 to 14? | category of the business refers to category_name; short review length refers to review_length = 'Short'; the highest star rating refers to MAX(stars); business ID from 7 to 14 refers to business_id BETWEEN 7 AND 14 | SELECT DISTINCT T3.category_name FROM Reviews 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 T2.business_id >= 7 AND T2.business_id < 15 AND T1.review_length = 'Short' AND T1.review_stars = ( SELECT MAX(review_stars) FRO... | 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 | List all the complaints narratives made by the customer named Brenda and last name Mayer. | complaints narratives refers to "Consumer complaint narrative"; | SELECT T2.`Consumer complaint narrative` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Brenda' AND T1.last = 'Mayer' | 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 rental IDs belong to Eleanor Hunt? | 'Eleanor Hunt' is the full name of a customer; full name refers to first_name, last_name | SELECT COUNT(T1.rental_id) FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Eleanor' AND T2.last_name = 'Hunt' | 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 are the most recent three independent nations? | Larger date of indepedence refers to more recent indepdence; Nation refers to country | SELECT T1.Name FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country ORDER BY T2.Independence 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 | What is the first name of the driver who transported shipment id 1028? | shipment id 1028 refers to ship_id = 1028 | SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_id = 1028 | 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 in Tempe, list the attribute of the business with a medium review count. | Tempe is a city; high review count refers to review_count = 'High' | SELECT DISTINCT T3.attribute_name 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.city = 'Tempe' AND T1.review_count = 'Medium' | 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 under the conference "Mathematics of Program Construction
"? | 'Mathematics of Program Construction' is the FullName of conference | SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'Mathematics of Program Construction' | 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 | Which state has the highest number of clients who gave a 5-star review? | highest number of clients refers to MAX(COUNT(client_id)); 5-star review refers to stars = 5; | SELECT T2.state_abbrev FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Stars = 5 GROUP BY T2.state_abbrev ORDER BY COUNT(T2.state_abbrev) 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 | Among the films rented by Natalie Meyer, describe the titles and categories of the films which were rented in February 2006. | category refers to name; rented in February 2006 refers to year(rental_date) = 2006 and month (rental_rate) = 2 | SELECT T3.title, T2.name FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id INNER JOIN inventory AS T4 ON T3.film_id = T4.film_id INNER JOIN customer AS T5 ON T4.store_id = T5.store_id INNER JOIN rental AS T6 ON T4.inventory_id = T6.inv... | 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 United States province is home to the greatest number of corporations' corporate headquarters? | Organization refers to corporation | SELECT T1.Province FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'United States' GROUP BY T1.Province ORDER BY COUNT(T1.Name) 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: `... |
authors | How many authors is affiliated to the organization "Otterbein University"? | Otterbein University is an Affiliation | SELECT COUNT(Name) FROM Author WHERE Affiliation = 'Otterbein University' | 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 who live in Kansas City provided a 1-star review? | 1-star review refers stars = 1; | SELECT COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Kansas City' AND T1.Stars = 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 | Write down the inventories' IDs and actors' names of "STREETCAR INTENTIONS". | "STREETCAR INTENTIONS" is the title of film; actor's names refers to first_name, last_name | SELECT T4.inventory_id, T1.first_name, T1.last_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 inventory AS T4 ON T2.film_id = T4.film_id WHERE T3.title = 'STREETCAR INTENTIONS' | 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 big is Africa, and how many nations make up the continent? | Area can measure the size of countries; Country and nation share the same meaning | SELECT T1.Area, COUNT(T3.Name) FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country WHERE T1.Name = 'Asia' GROUP BY T1.Name, T1.Area | 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 | State the address of drivers who transported the shipment with weight greater than 50000 pounds. | shipment with weight greater than 50000 pounds refers to Sum(weight) > 50000 | SELECT T2.address 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) > 50000 | 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 category and attributes of businesses with highest star rating? | category of the business refers to category_name; attributes of the business refers to attribute_name; the highest star rating refers to MAX(stars) | SELECT DISTINCT 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 T2.business_id = T4.business_id INNER JOIN Attributes AS T5 ON T4.attribu... | 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 full name of the conference in which the paper titled "Extended Fuzzy Regression Models" was published? | 'Extended Fuzzy Regression Models' is the title of paper; full name of the conference refers to FullName | SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Extended Fuzzy Regression Models' | 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 long was Kendall Allen's complaint about her credit card? | how long refers to ser_time; credit card refers to Product = 'Credit Card'; | SELECT T3.ser_time FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id INNER JOIN callcenterlogs AS T3 ON T1.`Complaint ID` = T3.`Complaint ID` WHERE T2.first = 'Kendall' AND T2.last = 'Allen' AND T2.sex = 'Female' AND T1.Product = 'Credit card' | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.