db_id
stringclasses
20 values
query
stringlengths
25
323
question
stringlengths
22
144
create_w_keys
stringclasses
20 values
create_wo_keys
stringclasses
20 values
difficulty
stringclasses
4 values
zero_shot_request
stringlengths
527
3.29k
battle_death
SELECT count(*) FROM ship WHERE disposition_of_ship = 'Captured'
How many ships ended up being 'Captured'?
CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost_in_battle" int, "id" int, "name" text, "tonnage" text, "ship_type" text, "location" text, "disposition_of_ship" text, primary key("id"), foreign...
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT); CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT); CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, inj...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost...
battle_death
SELECT name , tonnage FROM ship ORDER BY name DESC
List the name and tonnage ordered by in descending alphaetical order for the names.
CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost_in_battle" int, "id" int, "name" text, "tonnage" text, "ship_type" text, "location" text, "disposition_of_ship" text, primary key("id"), foreign...
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT); CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT); CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, inj...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost...
battle_death
SELECT name , date FROM battle
List the name, date and result of each battle.
CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost_in_battle" int, "id" int, "name" text, "tonnage" text, "ship_type" text, "location" text, "disposition_of_ship" text, primary key("id"), foreign...
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT); CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT); CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, inj...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost...
battle_death
SELECT max(killed) , min(killed) FROM death
What is maximum and minimum death toll caused each time?
CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost_in_battle" int, "id" int, "name" text, "tonnage" text, "ship_type" text, "location" text, "disposition_of_ship" text, primary key("id"), foreign...
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT); CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT); CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, inj...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost...
battle_death
SELECT avg(injured) FROM death
What is the average number of injuries caused each time?
CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost_in_battle" int, "id" int, "name" text, "tonnage" text, "ship_type" text, "location" text, "disposition_of_ship" text, primary key("id"), foreign...
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT); CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT); CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, inj...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost...
battle_death
SELECT T1.id , T1.name FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle JOIN death AS T3 ON T2.id = T3.caused_by_ship_id GROUP BY T1.id HAVING sum(T3.killed) > 10
What are the ids and names of the battles that led to more than 10 people killed in total.
CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost_in_battle" int, "id" int, "name" text, "tonnage" text, "ship_type" text, "location" text, "disposition_of_ship" text, primary key("id"), foreign...
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT); CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT); CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, inj...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost...
battle_death
SELECT T2.id , T2.name FROM death AS T1 JOIN ship AS t2 ON T1.caused_by_ship_id = T2.id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1
What is the ship id and name that caused most total injuries?
CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost_in_battle" int, "id" int, "name" text, "tonnage" text, "ship_type" text, "location" text, "disposition_of_ship" text, primary key("id"), foreign...
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT); CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT); CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, inj...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost...
battle_death
SELECT count(DISTINCT RESULT) FROM battle
How many different results are there for the battles?
CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost_in_battle" int, "id" int, "name" text, "tonnage" text, "ship_type" text, "location" text, "disposition_of_ship" text, primary key("id"), foreign...
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT); CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT); CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, inj...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost...
battle_death
SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' );
How many battles did not lose any ship with tonnage '225'?
CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost_in_battle" int, "id" int, "name" text, "tonnage" text, "ship_type" text, "location" text, "disposition_of_ship" text, primary key("id"), foreign...
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT); CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT); CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, inj...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost...
battle_death
SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'Lettice' INTERSECT SELECT T1.name , T1.date FROM battle AS T1 JOIN ship AS T2 ON T1.id = T2.lost_in_battle WHERE T2.name = 'HMS Atalanta'
List the name and date the battle that has lost the ship named 'Lettice' and the ship named 'HMS Atalanta'
CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost_in_battle" int, "id" int, "name" text, "tonnage" text, "ship_type" text, "location" text, "disposition_of_ship" text, primary key("id"), foreign...
CREATE TABLE battle (id INT, name TEXT, date TEXT, bulgarian_commander TEXT, latin_commander TEXT, result TEXT); CREATE TABLE ship (lost_in_battle INT, id INT, name TEXT, tonnage TEXT, ship_type TEXT, location TEXT, disposition_of_ship TEXT); CREATE TABLE death (caused_by_ship_id INT, id INT, note TEXT, killed INT, inj...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "battle" ( "id" int, "name" text, "date" text, "bulgarian_commander" text, "latin_commander" text, "result" text, primary key("id") ); CREATE TABLE "ship" ( "lost...
student_transcripts_tracking
SELECT line_1 , line_2 FROM addresses
what are all the addresses including line 1 and line 2?
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
student_transcripts_tracking
SELECT count(*) FROM Courses
How many courses in total are listed?
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
student_transcripts_tracking
SELECT course_description FROM Courses WHERE course_name = 'math'
How is the math course described?
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
student_transcripts_tracking
SELECT zip_postcode FROM Addresses WHERE city = 'Port Chelsea'
What is the zip code of the address in the city Port Chelsea?
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
student_transcripts_tracking
SELECT T2.department_name , T1.department_id FROM Degree_Programs AS T1 JOIN Departments AS T2 ON T1.department_id = T2.department_id GROUP BY T1.department_id ORDER BY count(*) DESC LIMIT 1
Which department offers the most number of degrees? List department name and id.
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
student_transcripts_tracking
select t2.department_name , t1.department_id from degree_programs as t1 join departments as t2 on t1.department_id = t2.department_id group by t1.department_id order by count(*) desc limit 1
What is the name and id of the department with the most number of degrees ?
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
student_transcripts_tracking
SELECT count(*) FROM Departments AS T1 JOIN Degree_Programs AS T2 ON T1.department_id = T2.department_id WHERE T1.department_name = 'engineer'
How many degrees does the engineering department offer?
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
student_transcripts_tracking
SELECT section_name , section_description FROM Sections
What are the names and descriptions of all the sections?
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
student_transcripts_tracking
SELECT T1.semester_name , T1.semester_id FROM Semesters AS T1 JOIN Student_Enrolment AS T2 ON T1.semester_id = T2.semester_id GROUP BY T1.semester_id ORDER BY count(*) DESC LIMIT 1
What is the semester which most student registered in? Show both the name and the id.
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
student_transcripts_tracking
SELECT DISTINCT T1.first_name , T1.middle_name , T1.last_name FROM Students AS T1 JOIN Student_Enrolment AS T2 ON T1.student_id = T2.student_id JOIN Degree_Programs AS T3 ON T2.degree_program_id = T3.degree_program_id WHERE T3.degree_summary_name = 'Bachelor'
Who is enrolled in a Bachelor degree program? List the first name, middle name, last name.
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
student_transcripts_tracking
SELECT semester_name FROM Semesters WHERE semester_id NOT IN( SELECT semester_id FROM Student_Enrolment )
Which semesters do not have any student enrolled? List the semester name.
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
student_transcripts_tracking
SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1
How many times at most can a course enrollment result show in different transcripts? Also show the course enrollment id.
CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(20), `state_province_county` VARCHAR(255), `country` VARCHAR(255), `other_address_details` VARCHAR(255) ); CREATE TABLE `Courses` ( `course_id` IN...
CREATE TABLE Addresses (address_id INTEGER, line_1 VARCHAR(255), line_2 VARCHAR(255), line_3 VARCHAR(255), city VARCHAR(255), zip_postcode VARCHAR(20), state_province_county VARCHAR(255), country VARCHAR(255), other_address_details VARCHAR(255)); CREATE TABLE Courses (course_id INTEGER, course_name VARCHAR(255), course...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Addresses` ( `address_id` INTEGER PRIMARY KEY, `line_1` VARCHAR(255), `line_2` VARCHAR(255), `line_3` VARCHAR(255), `city` VARCHAR(255), `zip_postcode` VARCHAR(2...
tvshow
SELECT Title FROM Cartoon ORDER BY title
List the title of all cartoons in alphabetical order.
CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" text, "Pay_per_view_PPV" text, "Package_Option" text, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "TV_series" ( "id" real, "Episode" text, "...
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT); CREATE TABLE TV_series (id REAL, Episode TEXT, Air_Date TEXT, Rating TEXT, Share REAL, 18_49_Rating_Share TEXT, Viewers_m TEX...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" ...
tvshow
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones";
List all cartoon directed by "Ben Jones".
CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" text, "Pay_per_view_PPV" text, "Package_Option" text, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "TV_series" ( "id" real, "Episode" text, "...
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT); CREATE TABLE TV_series (id REAL, Episode TEXT, Air_Date TEXT, Rating TEXT, Share REAL, 18_49_Rating_Share TEXT, Viewers_m TEX...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" ...
tvshow
SELECT count(*) FROM Cartoon WHERE Written_by = "Joseph Kuhr";
How many cartoons were written by "Joseph Kuhr"?
CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" text, "Pay_per_view_PPV" text, "Package_Option" text, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "TV_series" ( "id" real, "Episode" text, "...
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT); CREATE TABLE TV_series (id REAL, Episode TEXT, Air_Date TEXT, Rating TEXT, Share REAL, 18_49_Rating_Share TEXT, Viewers_m TEX...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" ...
tvshow
SELECT title , Directed_by FROM Cartoon ORDER BY Original_air_date
list all cartoon titles and their directors ordered by their air date
CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" text, "Pay_per_view_PPV" text, "Package_Option" text, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "TV_series" ( "id" real, "Episode" text, "...
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT); CREATE TABLE TV_series (id REAL, Episode TEXT, Air_Date TEXT, Rating TEXT, Share REAL, 18_49_Rating_Share TEXT, Viewers_m TEX...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" ...
tvshow
SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti";
List the title of all cartoon directed by "Ben Jones" or "Brandon Vietti".
CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" text, "Pay_per_view_PPV" text, "Package_Option" text, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "TV_series" ( "id" real, "Episode" text, "...
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT); CREATE TABLE TV_series (id REAL, Episode TEXT, Air_Date TEXT, Rating TEXT, Share REAL, 18_49_Rating_Share TEXT, Viewers_m TEX...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" ...
tvshow
SELECT Country , count(*) FROM TV_Channel GROUP BY Country ORDER BY count(*) DESC LIMIT 1;
Which country has the most of TV Channels? List the country and number of TV Channels it has.
CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" text, "Pay_per_view_PPV" text, "Package_Option" text, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "TV_series" ( "id" real, "Episode" text, "...
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT); CREATE TABLE TV_series (id REAL, Episode TEXT, Air_Date TEXT, Rating TEXT, Share REAL, 18_49_Rating_Share TEXT, Viewers_m TEX...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" ...
tvshow
SELECT count(DISTINCT series_name) , count(DISTINCT content) FROM TV_Channel;
List the number of different series names and contents in the TV Channel table.
CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" text, "Pay_per_view_PPV" text, "Package_Option" text, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "TV_series" ( "id" real, "Episode" text, "...
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT); CREATE TABLE TV_series (id REAL, Episode TEXT, Air_Date TEXT, Rating TEXT, Share REAL, 18_49_Rating_Share TEXT, Viewers_m TEX...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" ...
tvshow
SELECT LANGUAGE , count(*) FROM TV_Channel GROUP BY LANGUAGE ORDER BY count(*) ASC LIMIT 1;
List the language used least number of TV Channel. List language and number of TV Channel.
CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" text, "Pay_per_view_PPV" text, "Package_Option" text, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "TV_series" ( "id" real, "Episode" text, "...
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT); CREATE TABLE TV_series (id REAL, Episode TEXT, Air_Date TEXT, Rating TEXT, Share REAL, 18_49_Rating_Share TEXT, Viewers_m TEX...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" ...
tvshow
SELECT country FROM TV_Channel EXCEPT SELECT T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.written_by = 'Todd Casey'
which countries' tv channels are not playing any cartoon written by Todd Casey?
CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" text, "Pay_per_view_PPV" text, "Package_Option" text, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "TV_series" ( "id" real, "Episode" text, "...
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT); CREATE TABLE TV_series (id REAL, Episode TEXT, Air_Date TEXT, Rating TEXT, Share REAL, 18_49_Rating_Share TEXT, Viewers_m TEX...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" ...
tvshow
SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Michael Chang' INTERSECT SELECT T1.series_name , T1.country FROM TV_Channel AS T1 JOIN cartoon AS T2 ON T1.id = T2.Channel WHERE T2.directed_by = 'Ben Jones'
Find the series name and country of the tv channel that is playing some cartoons directed by Ben Jones and Michael Chang?
CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" text, "Pay_per_view_PPV" text, "Package_Option" text, PRIMARY KEY ("id") ); CREATE TABLE IF NOT EXISTS "TV_series" ( "id" real, "Episode" text, "...
CREATE TABLE TV_Channel (id TEXT, series_name TEXT, Country TEXT, Language TEXT, Content TEXT, Pixel_aspect_ratio_PAR TEXT, Hight_definition_TV TEXT, Pay_per_view_PPV TEXT, Package_Option TEXT); CREATE TABLE TV_series (id REAL, Episode TEXT, Air_Date TEXT, Rating TEXT, Share REAL, 18_49_Rating_Share TEXT, Viewers_m TEX...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE IF NOT EXISTS "TV_Channel" ( "id" text, "series_name" text, "Country" text, "Language" text, "Content" text, "Pixel_aspect_ratio_PAR" text, "Hight_definition_TV" ...
poker_player
SELECT count(*) FROM poker_player
How many poker players are there?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Player_ID"), FOREIGN KEY ("People_ID") REFERENCES `people`("People_ID") ); CREATE TABLE "people" ( "People_ID" int, "Nationality" text, "Name" text, ...
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Play...
poker_player
SELECT Earnings FROM poker_player ORDER BY Earnings DESC
List the earnings of poker players in descending order.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Player_ID"), FOREIGN KEY ("People_ID") REFERENCES `people`("People_ID") ); CREATE TABLE "people" ( "People_ID" int, "Nationality" text, "Name" text, ...
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Play...
poker_player
SELECT Final_Table_Made , Best_Finish FROM poker_player
List the final tables made and the best finishes of poker players.
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Player_ID"), FOREIGN KEY ("People_ID") REFERENCES `people`("People_ID") ); CREATE TABLE "people" ( "People_ID" int, "Nationality" text, "Name" text, ...
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Play...
poker_player
SELECT avg(Earnings) FROM poker_player
What is the average earnings of poker players?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Player_ID"), FOREIGN KEY ("People_ID") REFERENCES `people`("People_ID") ); CREATE TABLE "people" ( "People_ID" int, "Nationality" text, "Name" text, ...
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Play...
poker_player
SELECT Money_Rank FROM poker_player ORDER BY Earnings DESC LIMIT 1
What is the money rank of the poker player with the highest earnings?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Player_ID"), FOREIGN KEY ("People_ID") REFERENCES `people`("People_ID") ); CREATE TABLE "people" ( "People_ID" int, "Nationality" text, "Name" text, ...
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Play...
poker_player
SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000
What are the names of poker players whose earnings is higher than 300000?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Player_ID"), FOREIGN KEY ("People_ID") REFERENCES `people`("People_ID") ); CREATE TABLE "people" ( "People_ID" int, "Nationality" text, "Name" text, ...
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Play...
poker_player
SELECT T1.Birth_Date FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T2.Earnings ASC LIMIT 1
What is the birth date of the poker player with the lowest earnings?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Player_ID"), FOREIGN KEY ("People_ID") REFERENCES `people`("People_ID") ); CREATE TABLE "people" ( "People_ID" int, "Nationality" text, "Name" text, ...
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Play...
poker_player
SELECT T2.Money_Rank FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Height DESC LIMIT 1
What is the money rank of the tallest poker player?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Player_ID"), FOREIGN KEY ("People_ID") REFERENCES `people`("People_ID") ); CREATE TABLE "people" ( "People_ID" int, "Nationality" text, "Name" text, ...
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Play...
poker_player
SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1
What is the most common nationality of people?
CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Player_ID"), FOREIGN KEY ("People_ID") REFERENCES `people`("People_ID") ); CREATE TABLE "people" ( "People_ID" int, "Nationality" text, "Name" text, ...
CREATE TABLE poker_player (Poker_Player_ID INT, People_ID INT, Final_Table_Made REAL, Best_Finish REAL, Money_Rank REAL, Earnings REAL); CREATE TABLE people (People_ID INT, Nationality TEXT, Name TEXT, Birth_Date TEXT, Height REAL);
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "poker_player" ( "Poker_Player_ID" int, "People_ID" int, "Final_Table_Made" real, "Best_Finish" real, "Money_Rank" real, "Earnings" real, PRIMARY KEY ("Poker_Play...
voter_1
SELECT count(*) FROM area_code_state
How many states are there?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "con...
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name...
voter_1
SELECT contestant_number , contestant_name FROM contestants ORDER BY contestant_name DESC
List the contestant numbers and names, ordered by contestant name descending.
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "con...
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name...
voter_1
SELECT vote_id , phone_number , state FROM votes
List the vote ids, phone numbers and states of all votes.
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "con...
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name...
voter_1
SELECT max(area_code) , min(area_code) FROM area_code_state
What are the maximum and minimum values of area codes?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "con...
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name...
voter_1
SELECT max(created) FROM votes WHERE state = 'CA'
What is last date created of votes from the state 'CA'?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "con...
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name...
voter_1
SELECT contestant_name FROM contestants WHERE contestant_name != 'Jessie Alloway'
What are the names of the contestants whose names are not 'Jessie Alloway'
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "con...
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name...
voter_1
SELECT T1.contestant_number , T1.contestant_name FROM contestants AS T1 JOIN votes AS T2 ON T1.contestant_number = T2.contestant_number GROUP BY T1.contestant_number ORDER BY count(*) ASC LIMIT 1
Of all the contestants who got voted, what is the contestant number and name of the contestant who got least votes?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "con...
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name...
voter_1
SELECT count(*) FROM contestants WHERE contestant_number NOT IN ( SELECT contestant_number FROM votes )
How many contestants did not get voted?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "con...
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name...
voter_1
SELECT T1.area_code FROM area_code_state AS T1 JOIN votes AS T2 ON T1.state = T2.state GROUP BY T1.area_code ORDER BY count(*) DESC LIMIT 1
What is the area code in which the most voters voted?
CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name" varchar(50) PRIMARY KEY ("contestant_number"), ); CREATE TABLE "VOTES" ( "vote_id" INTEGER, "phone_number" INTEGER, "state" varchar(2), "con...
CREATE TABLE AREA_CODE_STATE (area_code INTEGER, state varchar(2)); CREATE TABLE CONTESTANTS (contestant_number INTEGER, contestant_name varchar(50)); CREATE TABLE VOTES (vote_id INTEGER, phone_number INTEGER, state varchar(2), contestant_number INTEGER, created timestamp);
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "AREA_CODE_STATE" ( "area_code" INTEGER, "state" varchar(2) PRIMARY KEY ("state"), ); CREATE TABLE "CONTESTANTS" ( "contestant_number" INTEGER, "contestant_name...
world_1
SELECT Name FROM country WHERE IndepYear > 1950
What are the names of all the countries that became independent after 1950?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
world_1
SELECT count(*) FROM country WHERE GovernmentForm = "Republic"
How many countries have a republic as their form of government?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
world_1
SELECT sum(SurfaceArea) FROM country WHERE Region = "Caribbean"
What is the total surface area of the countries in the Caribbean region?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
world_1
SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = "Kabul"
Which region is the city Kabul located in?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
world_1
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = "Aruba" ORDER BY Percentage DESC LIMIT 1
Which language is the most popular in Aruba?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
world_1
SELECT Population , LifeExpectancy FROM country WHERE Name = "Brazil"
What are the population and life expectancies in Brazil?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
world_1
SELECT Population , Region FROM country WHERE Name = "Angola"
What are the region and population of Angola?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
world_1
SELECT Name FROM country WHERE Continent = "Asia" ORDER BY LifeExpectancy LIMIT 1
What is the name of country that has the shortest life expectancy in Asia?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
world_1
SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Name ORDER BY COUNT(*) DESC LIMIT 1
What is name of the country that speaks the largest number of languages?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
world_1
SELECT T1.Continent FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode GROUP BY T1.Continent ORDER BY COUNT(*) DESC LIMIT 1
Which continent has the most diverse languages?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
world_1
SELECT DISTINCT T1.Region FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English" OR T2.Language = "Dutch"
What are the regions that use English or Dutch?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
world_1
SELECT T2.Language FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GovernmentForm = "Republic" GROUP BY T2.Language HAVING COUNT(*) = 1
Which languages are spoken by only one country in republic governments?
CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "LifeExpectancy" float(3,1), "GNP" float(10,2), "GNPOld" float(10,2), "LocalName" char(45), "GovernmentForm" char(45), "HeadOfState" char(60), ...
CREATE TABLE city (ID INTEGER, Name char(35), CountryCode char(3), District char(20), Population INTEGER); CREATE TABLE sqlite_sequence (name , seq ); CREATE TABLE country (Code char(3), Name char(52), Continent TEXT, Region char(26), SurfaceArea float(10,2), IndepYear INTEGER, Population INTEGER, LifeExpectancy float(...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "country" ( "Code" char(3), "Name" char(52), "Continent" TEXT, "Region" char(26), "SurfaceArea" float(10,2), "IndepYear" INTEGER, "Population" INTEGER, "Li...
orchestra
SELECT count(*) FROM conductor
How many conductors are there?
CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orchestra_ID" int, "Orchestra" text, "Conductor_ID" int, "Record_Company" text, "Year_of_Founded" real, "Major_Record_Format" text, PRIMARY KEY ("Orc...
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT); CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded REAL, Major_Record_Format TEXT); CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, ...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orch...
orchestra
SELECT Name FROM conductor ORDER BY Age ASC
List the names of conductors in ascending order of age.
CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orchestra_ID" int, "Orchestra" text, "Conductor_ID" int, "Record_Company" text, "Year_of_Founded" real, "Major_Record_Format" text, PRIMARY KEY ("Orc...
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT); CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded REAL, Major_Record_Format TEXT); CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, ...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orch...
orchestra
SELECT Name FROM conductor WHERE Nationality != 'USA'
What are the names of conductors whose nationalities are not "USA"?
CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orchestra_ID" int, "Orchestra" text, "Conductor_ID" int, "Record_Company" text, "Year_of_Founded" real, "Major_Record_Format" text, PRIMARY KEY ("Orc...
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT); CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded REAL, Major_Record_Format TEXT); CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, ...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orch...
orchestra
SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != "Live final"
What are the maximum and minimum share of performances whose type is not "Live final".
CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orchestra_ID" int, "Orchestra" text, "Conductor_ID" int, "Record_Company" text, "Year_of_Founded" real, "Major_Record_Format" text, PRIMARY KEY ("Orc...
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT); CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded REAL, Major_Record_Format TEXT); CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, ...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orch...
orchestra
SELECT Name FROM conductor ORDER BY Year_of_Work DESC LIMIT 1
List the name of the conductor with the most years of work.
CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orchestra_ID" int, "Orchestra" text, "Conductor_ID" int, "Record_Company" text, "Year_of_Founded" real, "Major_Record_Format" text, PRIMARY KEY ("Orc...
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT); CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded REAL, Major_Record_Format TEXT); CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, ...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orch...
orchestra
SELECT T1.Name , T2.Orchestra FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID
Show the names of conductors and the orchestras they have conducted.
CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orchestra_ID" int, "Orchestra" text, "Conductor_ID" int, "Record_Company" text, "Year_of_Founded" real, "Major_Record_Format" text, PRIMARY KEY ("Orc...
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT); CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded REAL, Major_Record_Format TEXT); CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, ...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orch...
orchestra
SELECT T1.Name FROM conductor AS T1 JOIN orchestra AS T2 ON T1.Conductor_ID = T2.Conductor_ID GROUP BY T2.Conductor_ID ORDER BY COUNT(*) DESC LIMIT 1
Show the name of the conductor that has conducted the most number of orchestras.
CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orchestra_ID" int, "Orchestra" text, "Conductor_ID" int, "Record_Company" text, "Year_of_Founded" real, "Major_Record_Format" text, PRIMARY KEY ("Orc...
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT); CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded REAL, Major_Record_Format TEXT); CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, ...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orch...
orchestra
SELECT Record_Company FROM orchestra GROUP BY Record_Company ORDER BY COUNT(*) DESC LIMIT 1
List the record company shared by the most number of orchestras.
CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orchestra_ID" int, "Orchestra" text, "Conductor_ID" int, "Record_Company" text, "Year_of_Founded" real, "Major_Record_Format" text, PRIMARY KEY ("Orc...
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT); CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded REAL, Major_Record_Format TEXT); CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, ...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orch...
orchestra
SELECT Orchestra FROM orchestra WHERE Orchestra_ID NOT IN (SELECT Orchestra_ID FROM performance)
List the names of orchestras that have no performance.
CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orchestra_ID" int, "Orchestra" text, "Conductor_ID" int, "Record_Company" text, "Year_of_Founded" real, "Major_Record_Format" text, PRIMARY KEY ("Orc...
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT); CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded REAL, Major_Record_Format TEXT); CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, ...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orch...
orchestra
SELECT Record_Company FROM orchestra WHERE Year_of_Founded < 2003 INTERSECT SELECT Record_Company FROM orchestra WHERE Year_of_Founded > 2003
Show the record companies shared by orchestras founded before 2003 and after 2003.
CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orchestra_ID" int, "Orchestra" text, "Conductor_ID" int, "Record_Company" text, "Year_of_Founded" real, "Major_Record_Format" text, PRIMARY KEY ("Orc...
CREATE TABLE conductor (Conductor_ID INT, Name TEXT, Age INT, Nationality TEXT, Year_of_Work INT); CREATE TABLE orchestra (Orchestra_ID INT, Orchestra TEXT, Conductor_ID INT, Record_Company TEXT, Year_of_Founded REAL, Major_Record_Format TEXT); CREATE TABLE performance (Performance_ID INT, Orchestra_ID INT, Type TEXT, ...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "conductor" ( "Conductor_ID" int, "Name" text, "Age" int, "Nationality" text, "Year_of_Work" int, PRIMARY KEY ("Conductor_ID") ); CREATE TABLE "orchestra" ( "Orch...
network_1
SELECT count(*) FROM Highschooler
How many high schoolers are there?
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
network_1
SELECT name , grade FROM Highschooler
Show the names and grades of each high schooler.
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
network_1
SELECT grade FROM Highschooler
Show all the grades of the high schoolers.
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
network_1
SELECT grade FROM Highschooler WHERE name = "Kyle"
What grade is Kyle in?
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
network_1
SELECT count(*) FROM Highschooler WHERE grade = 9 OR grade = 10
How many high schoolers are there in grade 9 or 10?
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
network_1
SELECT grade , count(*) FROM Highschooler GROUP BY grade
Show the number of high schoolers for each grade.
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
network_1
SELECT grade FROM Highschooler GROUP BY grade ORDER BY count(*) DESC LIMIT 1
Which grade has the most high schoolers?
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
network_1
SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
What is the name of the high schooler who has the greatest number of friends?
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
network_1
SELECT T3.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id JOIN Highschooler AS T3 ON T1.friend_id = T3.id WHERE T2.name = "Kyle"
Show the names of all of the high schooler Kyle's friends.
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
network_1
SELECT id FROM Highschooler EXCEPT SELECT student_id FROM Friend
Show ids of all students who do not have any friends.
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
network_1
SELECT T2.name FROM Likes AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id GROUP BY T1.student_id ORDER BY count(*) DESC LIMIT 1
What is the name of the high schooler who has the greatest number of likes?
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
network_1
SELECT min(grade) FROM Highschooler WHERE id NOT IN (SELECT T1.student_id FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id)
Find the minimum grade of students who have no friends.
create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) references Highschooler(ID) ); create table Likes( student_id int, liked_id int, primary key (student_id, liked_id), foreign key (liked_i...
CREATE TABLE Highschooler (ID INT, name TEXT, grade INT); CREATE TABLE Friend (student_id INT, friend_id INT); CREATE TABLE Likes (student_id INT, liked_id INT);
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: create table Friend( student_id int, friend_id int, primary key (student_id,friend_id), foreign key(student_id) references Highschooler(ID), foreign key (friend_id) refe...
dog_kennels
SELECT state FROM Owners INTERSECT SELECT state FROM Professionals
Which states have both owners and professionals living there?
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
dog_kennels
SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments )
What is the average age of the dogs who have gone through any treatments?
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
dog_kennels
SELECT professional_id , last_name , cell_number FROM Professionals WHERE state = 'Indiana' UNION SELECT T1.professional_id , T1.last_name , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) > 2
Which professionals live in the state of Indiana or have done treatment on more than 2 treatments? List his or her id, last name and cell phone.
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
dog_kennels
select name from dogs where dog_id not in ( select dog_id from treatments group by dog_id having sum(cost_of_treatment) > 1000 )
Which dogs have not cost their owner more than 1000 for treatment ? List the dog names .
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
hard
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
dog_kennels
SELECT professional_id , role_code , email_address FROM Professionals EXCEPT SELECT T1.professional_id , T1.role_code , T1.email_address FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id
Which professional did not operate any treatment on dogs? List the professional's id, role and email.
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
dog_kennels
SELECT T1.owner_id , T2.first_name , T2.last_name FROM Dogs AS T1 JOIN Owners AS T2 ON T1.owner_id = T2.owner_id GROUP BY T1.owner_id ORDER BY count(*) DESC LIMIT 1
Which owner owns the most dogs? List the owner id, first name and last name.
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
extra
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
dog_kennels
SELECT T1.professional_id , T1.role_code , T1.first_name FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2
Which professionals have done at least two treatments? List the professional's id, role, and first name.
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
dog_kennels
SELECT T1.professional_id , T1.cell_number FROM Professionals AS T1 JOIN Treatments AS T2 ON T1.professional_id = T2.professional_id GROUP BY T1.professional_id HAVING count(*) >= 2
Which professionals have done at least two types of treatments? List the professional id and cell phone.
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
dog_kennels
SELECT T1.date_of_treatment , T2.first_name FROM Treatments AS T1 JOIN Professionals AS T2 ON T1.professional_id = T2.professional_id
List the date of each treatment, together with the first name of the professional who operated it.
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
dog_kennels
SELECT count(DISTINCT dog_id) FROM Treatments
How many dogs went through any treatments?
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
dog_kennels
SELECT count(DISTINCT professional_id) FROM Treatments
How many professionals have performed any treatment to dogs?
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
dog_kennels
SELECT avg(age) FROM Dogs
What is the average age of all the dogs?
CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10), `charge_amount` DECIMAL(19,4) ); CREATE TABLE `Sizes` ( `size_code` VARCHAR(10) PRIMARY KEY , `size_description` VARCHAR(80) ); CREATE TABLE `T...
CREATE TABLE Breeds (breed_code VARCHAR(10), breed_name VARCHAR(80)); CREATE TABLE Charges (charge_id INTEGER, charge_type VARCHAR(10), charge_amount DECIMAL(19,4)); CREATE TABLE Sizes (size_code VARCHAR(10), size_description VARCHAR(80)); CREATE TABLE Treatment_Types (treatment_type_code VARCHAR(10), treatment_type_de...
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE `Breeds` ( `breed_code` VARCHAR(10) PRIMARY KEY , `breed_name` VARCHAR(80) ); CREATE TABLE `Charges` ( `charge_id` INTEGER PRIMARY KEY , `charge_type` VARCHAR(10)...
singer
SELECT count(*) FROM singer
How many singers are there?
CREATE TABLE "singer" ( "Singer_ID" int, "Name" text, "Birth_Year" real, "Net_Worth_Millions" real, "Citizenship" text, PRIMARY KEY ("Singer_ID") ); CREATE TABLE "song" ( "Song_ID" int, "Title" text, "Singer_ID" int, "Sales" real, "Highest_Position" real, PRIMARY KEY ("Song_ID"), FOREIGN KEY ("Singer_ID") REFERENCES `s...
CREATE TABLE singer (Singer_ID INT, Name TEXT, Birth_Year REAL, Net_Worth_Millions REAL, Citizenship TEXT); CREATE TABLE song (Song_ID INT, Title TEXT, Singer_ID INT, Sales REAL, Highest_Position REAL);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "singer" ( "Singer_ID" int, "Name" text, "Birth_Year" real, "Net_Worth_Millions" real, "Citizenship" text, PRIMARY KEY ("Singer_ID") ); CREATE TABLE "song" ( "Son...
singer
SELECT Name FROM singer ORDER BY Net_Worth_Millions ASC
List the name of singers in ascending order of net worth.
CREATE TABLE "singer" ( "Singer_ID" int, "Name" text, "Birth_Year" real, "Net_Worth_Millions" real, "Citizenship" text, PRIMARY KEY ("Singer_ID") ); CREATE TABLE "song" ( "Song_ID" int, "Title" text, "Singer_ID" int, "Sales" real, "Highest_Position" real, PRIMARY KEY ("Song_ID"), FOREIGN KEY ("Singer_ID") REFERENCES `s...
CREATE TABLE singer (Singer_ID INT, Name TEXT, Birth_Year REAL, Net_Worth_Millions REAL, Citizenship TEXT); CREATE TABLE song (Song_ID INT, Title TEXT, Singer_ID INT, Sales REAL, Highest_Position REAL);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "singer" ( "Singer_ID" int, "Name" text, "Birth_Year" real, "Net_Worth_Millions" real, "Citizenship" text, PRIMARY KEY ("Singer_ID") ); CREATE TABLE "song" ( "Son...
singer
SELECT Birth_Year , Citizenship FROM singer
What are the birth year and citizenship of singers?
CREATE TABLE "singer" ( "Singer_ID" int, "Name" text, "Birth_Year" real, "Net_Worth_Millions" real, "Citizenship" text, PRIMARY KEY ("Singer_ID") ); CREATE TABLE "song" ( "Song_ID" int, "Title" text, "Singer_ID" int, "Sales" real, "Highest_Position" real, PRIMARY KEY ("Song_ID"), FOREIGN KEY ("Singer_ID") REFERENCES `s...
CREATE TABLE singer (Singer_ID INT, Name TEXT, Birth_Year REAL, Net_Worth_Millions REAL, Citizenship TEXT); CREATE TABLE song (Song_ID INT, Title TEXT, Singer_ID INT, Sales REAL, Highest_Position REAL);
medium
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "singer" ( "Singer_ID" int, "Name" text, "Birth_Year" real, "Net_Worth_Millions" real, "Citizenship" text, PRIMARY KEY ("Singer_ID") ); CREATE TABLE "song" ( "Son...
singer
SELECT Name FROM singer WHERE Citizenship != "France"
List the name of singers whose citizenship is not "France".
CREATE TABLE "singer" ( "Singer_ID" int, "Name" text, "Birth_Year" real, "Net_Worth_Millions" real, "Citizenship" text, PRIMARY KEY ("Singer_ID") ); CREATE TABLE "song" ( "Song_ID" int, "Title" text, "Singer_ID" int, "Sales" real, "Highest_Position" real, PRIMARY KEY ("Song_ID"), FOREIGN KEY ("Singer_ID") REFERENCES `s...
CREATE TABLE singer (Singer_ID INT, Name TEXT, Birth_Year REAL, Net_Worth_Millions REAL, Citizenship TEXT); CREATE TABLE song (Song_ID INT, Title TEXT, Singer_ID INT, Sales REAL, Highest_Position REAL);
easy
Provide the SQL query that answers the QUESTION, with no explanation or special characters. CONTEXT: Relevant SQL tables, with their properties: CREATE TABLE "singer" ( "Singer_ID" int, "Name" text, "Birth_Year" real, "Net_Worth_Millions" real, "Citizenship" text, PRIMARY KEY ("Singer_ID") ); CREATE TABLE "song" ( "Son...