idx string | query string | utterances list | query_type string |
|---|---|---|---|
cosql-0 | SELECT Count(*) , T2.FullName , T2.id FROM MODEL_LIST AS T1 JOIN CAR_MAKERS AS T2 ON T1.Maker = T2.Id GROUP BY T2.id; | [
"Can you list the total number of models for each car manufacturer, including their names and IDs?",
"Provide a count of models for each car maker, showing their names and IDs.",
"How many models does each car maker have, along with their names and IDs?"
] | aggregate |
cosql-1 | SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id | [
"Can you provide a count of concerts for each singer, along with their names?",
"How many concerts has each singer performed in, along with their names?",
"List the names of singers and the total number of concerts they have performed.",
"List singer names and number of concerts for each singer."
] | aggregate |
cosql-2 | SELECT template_id FROM Documents GROUP BY template_id HAVING count(*) > 1 | [
"Show me the template IDs that are associated with more than one document.",
"Show me the template IDs used in more than one document.",
"Which template IDs are used in more than one document?",
"Show ids for all templates that are used by more than one document."
] | aggregate |
cosql-3 | SELECT T1.first_name FROM Students AS T1 JOIN Addresses AS T2 ON T1.permanent_address_id = T2.address_id WHERE T2.country = 'Haiti' UNION SELECT first_name FROM Students WHERE cell_mobile_number = '09700166582' | [
"Fetch the first names of students who have a permanent address in Haiti or those with the mobile number '09700166582'.",
"Show me the first names of students who live in Haiti or those with the mobile number '09700166582'.",
"Show me the first names of students living in Haiti or those with the cell phone numb... | simple |
cosql-4 | SELECT name FROM stadium EXCEPT SELECT T2.name FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year = 2014 | [
"Can you list stadiums where no concerts were hosted in the year 2014?",
"Find the names of stadiums that had no concerts in 2014.",
"Can you list stadiums where no concerts were held in the year 2014?",
"Show names for all stadiums except for stadiums having a concert in year 2014."
] | simple |
cosql-5 | SELECT count(*) FROM Dogs WHERE dog_id NOT IN ( SELECT dog_id FROM Treatments ) | [
"What's the number of dogs that haven't received any treatments?",
"How many dogs have never received any treatments?",
"What's the number of dogs that have not been given any treatments?",
"How many dogs have not gone through any treatment?"
] | nested |
cosql-6 | SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name | [
"Can you list each teacher along with the number of courses they are teaching?",
"Can you list each teacher along with the number of courses they are assigned to?",
"Show me the number of courses assigned to each teacher.",
"Show names of teachers and the number of courses they teach."
] | aggregate |
cosql-7 | SELECT name FROM battle WHERE bulgarian_commander = 'Kaloyan' AND latin_commander = 'Baldwin I' | [
"Can you list the battles where Kaloyan commanded the Bulgarian forces and Baldwin I commanded the Latin forces?",
"Which battles were led by Kaloyan for the Bulgarians and Baldwin I for the Latins?",
"Which battles had Kaloyan leading the Bulgarian forces and Baldwin I leading the Latin forces?",
"What are t... | simple |
cosql-8 | SELECT package_option FROM TV_Channel WHERE id NOT IN (SELECT channel FROM cartoon WHERE directed_by = 'Ben Jones') | [
"Find the TV channel package options that do not include any cartoons directed by Ben Jones.",
"Which TV channel package options do not include any cartoons directed by Ben Jones?",
"Which TV channel package options do not have any cartoons directed by Ben Jones?",
"find the package option of the tv channel t... | nested |
cosql-9 | SELECT Weight FROM CARS_DATA WHERE Cylinders = 4 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1; | [
"Can you find the lightest 4-cylinder car from the year 1974?",
"Can you find the least heavy 4-cylinder car from the year 1974?",
"What is the weight of the lightest car with 4 cylinders made in 1974?"
] | simple |
cosql-10 | SELECT manager_name , district FROM shop ORDER BY number_products DESC LIMIT 1 | [
"Which shop has the most products, and who is the manager and what is the district there?",
"Find the district and manager of the store that has the most products.",
"Find the district and manager of the shop that has the most products.",
"Find the manager name and district of the shop whose number of product... | simple |
cosql-11 | SELECT count(*) , District FROM city WHERE Population > (SELECT avg(Population) FROM city) GROUP BY District | [
"Show me the number of cities per district that have populations exceeding the average population of the cities.",
"How many cities are there in each district where the population is above the average city population?",
"How many cities are there in each district where the population is above the average?",
"... | nested |
cosql-12 | SELECT avg(GNP) , sum(population) FROM country WHERE GovernmentForm = "US Territory" | [
"Show me the average Gross National Product and total population for countries that are US Territories.",
"Can you provide the average GNP and the sum of the population for nations classified as US Territories?",
"Can you provide the average Gross National Product and the sum of the population for nations class... | aggregate |
cosql-13 | SELECT sum(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe" | [
"Can you calculate the combined surface area of all countries in Asia and Europe?",
"What is the total surface area of countries located in Asia or Europe?",
"Find the total surface area of countries that are in either Asia or Europe.",
"What is the total surface area of the continents Asia and Europe?"
] | aggregate |
cosql-14 | SELECT count(*) , t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t2.name | [
"List the number of hires grouped by each shop.",
"Can you provide the count of employees for each shop?",
"How many employees are there in each shop?",
"Find the number of employees hired in each shop; show the shop name as well."
] | aggregate |
cosql-15 | SELECT T2.name , count(*) FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id GROUP BY T2.singer_id | [
"Show the name of each singer and the count of concerts they have participated in.",
"List each singer along with the number of concerts they have performed.",
"List all singers along with the number of concerts they have performed.",
"List singer names and number of concerts for each singer."
] | aggregate |
cosql-16 | SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId; | [
"Show me the continent IDs and names along with the count of countries in each.",
"Could you list the number of countries per continent, along with the continent IDs?",
"How many countries are there per continent, including the continent ID?",
"How many countries does each continent have? List the continent i... | aggregate |
cosql-17 | SELECT DISTINCT T1.model FROM MODEL_LIST AS T1 JOIN CAR_NAMES AS T2 ON T1.Model = T2.Model JOIN CARS_DATA AS T3 ON T2.MakeId = T3.Id JOIN CAR_MAKERS AS T4 ON T1.Maker = T4.Id WHERE T3.weight < 3500 AND T4.FullName != 'Ford Motor Company'; | [
"Show me the distinct car models with a weight less than 3500 that are not from Ford Motor Company.",
"What are the distinct car models that weigh under 3500 pounds and are not made by Ford Motor Company?",
"Show me the unique car models with a weight less than 3500 that are not from Ford Motor Company.",
"Wh... | simple |
cosql-18 | 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 | [
"List the spoken languages that are unique to a single Republic.",
"List the languages that are unique to a single Republic.",
"Can you find the languages that are spoken in exactly one Republic?",
"Which languages are spoken by only one country in republic governments?"
] | aggregate |
cosql-19 | SELECT count(*) FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T2.Airline = T1.uid WHERE T1.Airline = "United Airlines" AND T2.SourceAirport = "AHD" | [
"How many flights operated by United Airlines depart from AHD Airport?",
"Show the total number of United Airlines flights with AHD as their departure airport.",
"Count the number of flights by United Airlines that depart from AHD Airport.",
"How many 'United Airlines' flights depart from Airport 'AHD'?"
] | aggregate |
cosql-20 | SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000 | [
"List the singers who have songs with sales greater than 300,000.",
"Which singers have songs that have exceeded 300,000 in sales?",
"Show me the names of singers whose songs have sold more than 300,000 copies.",
"Show distinct names of singers that have songs with sales more than 300000."
] | simple |
cosql-21 | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline ORDER BY count(*) DESC LIMIT 1 | [
"Find the airline with the greatest number of flights.",
"Can you tell me the airline that operates the highest number of flights?",
"Which airline has the most flights?",
"Which airline has most number of flights?"
] | aggregate |
cosql-22 | SELECT T1.course_name FROM Courses AS T1 JOIN Student_Enrolment_Courses AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_name ORDER BY count(*) DESC LIMIT 1 | [
"Find the course that the most students have signed up for.",
"Find the course that has the most student sign-ups.",
"What is the most popular course based on student enrollments?",
"What's the name of the course with most number of enrollments?"
] | aggregate |
cosql-23 | SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id | [
"List the number of concerts held at each stadium along with the stadium names.",
"List the number of concerts held at each stadium along with their names.",
"Can you provide the names of the stadiums and the count of concerts held at each?",
"Show the stadium name and the number of concerts in each stadium."... | aggregate |
cosql-24 | SELECT cost_of_treatment FROM Treatments ORDER BY date_of_treatment DESC LIMIT 1 | [
"What is the cost of the most recent treatment?",
"Can you tell me the cost of the latest treatment?",
"Find the cost of the treatment that was conducted most recently.",
"How much does the most recent treatment cost?"
] | simple |
cosql-25 | SELECT T1.Airline FROM AIRLINES AS T1 JOIN FLIGHTS AS T2 ON T1.uid = T2.Airline GROUP BY T1.Airline HAVING count(*) < 200 | [
"List the airlines that operate under 200 flights.",
"List the airlines that operate fewer than 200 flights.",
"Show me the airlines with less than 200 scheduled flights.",
"Find all airlines that have fewer than 200 flights."
] | aggregate |
cosql-26 | SELECT Nationality FROM people GROUP BY Nationality HAVING COUNT(*) >= 2 | [
"Show nationalities that have a count of two or more people.",
"What are the nationalities represented by at least two people?",
"List all nationalities that occur at least twice.",
"What are the nationalities that are shared by at least two people?"
] | aggregate |
cosql-27 | SELECT avg(loser_age) , avg(winner_age) FROM matches | [
"Find the average ages of both losers and winners from the matches.",
"What is the average age of both losing and winning participants from all matches?",
"What is the average age of both losing and winning participants in matches?",
"Find the average age of losers and winners of all matches."
] | aggregate |
cosql-28 | SELECT count(*) FROM Flights AS T1 JOIN Airports AS T2 ON T1.DestAirport = T2.AirportCode WHERE T2.city = "Aberdeen" OR T2.city = "Abilene" | [
"What is the count of flights that have destinations in Aberdeen or Abilene?",
"What is the count of flights that have destinations in the cities of Aberdeen or Abilene?",
"Can you give me the total number of flights arriving in Aberdeen or Abilene?",
"Find the number of flights landing in the city of Aberdee... | aggregate |
cosql-29 | SELECT t2.Museum_ID , t1.name FROM museum AS t1 JOIN visit AS t2 ON t1.Museum_ID = t2.Museum_ID GROUP BY t2.Museum_ID ORDER BY count(*) DESC LIMIT 1 | [
"Show me the name and ID of the museum with the most visits.",
"Provide the name and ID of the museum with the most visits.",
"Which museum has received the highest number of visits, and what is its name?",
"What are the id and name of the museum visited most times?"
] | aggregate |
cosql-30 | SELECT Title FROM Cartoon WHERE Directed_by = "Ben Jones" OR Directed_by = "Brandon Vietti"; | [
"What are the titles of cartoons directed by Ben Jones or Brandon Vietti?",
"Find the titles of cartoons which have been directed by Ben Jones or Brandon Vietti.",
"Can you show me the cartoon titles that were directed by either Ben Jones or Brandon Vietti?",
"List the title of all cartoon directed by \"Ben J... | simple |
cosql-31 | SELECT document_name , template_id FROM Documents WHERE Document_Description LIKE "%w%" | [
"Show me the names and template IDs of documents that include the letter 'w' in their descriptions.",
"Show me the document names and template IDs for documents that include the letter 'w' in their descriptions.",
"List the document names and template IDs where the document description contains the letter 'w'."... | simple |
cosql-32 | SELECT avg(loser_age) , avg(winner_age) FROM matches | [
"What is the average age of losers and winners in the matches?",
"Find the average age of losing players and winning players in matches.",
"Can you show me the average ages of the losers and winners in the matches?",
"Find the average age of losers and winners of all matches."
] | aggregate |
cosql-33 | SELECT T1.name , T2.date_of_treatment FROM Dogs AS T1 JOIN Treatments AS T2 ON T1.dog_id = T2.dog_id WHERE T1.breed_code = ( SELECT breed_code FROM Dogs GROUP BY breed_code ORDER BY count(*) ASC LIMIT 1 ) | [
"Show the names and treatment dates of dogs from the rarest breed.",
"Which dogs from the least common breed have been treated, and on what dates?",
"Find the names and treatment dates of dogs belonging to the least common breed.",
"List the names of the dogs of the rarest breed and the treatment dates of the... | nested |
cosql-34 | SELECT stuid FROM student EXCEPT SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat' | [
"Find the IDs of students who do not own a cat.",
"Which students do not have a cat based on their IDs?",
"List the student IDs for those who don't have a cat.",
"Find the id of students who do not have a cat pet."
] | simple |
cosql-35 | SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year < 2009 INTERSECT SELECT t1.name FROM visitor AS t1 JOIN visit AS t2 ON t1.id = t2.visitor_id JOIN museum AS t3 ON t3.Museum_ID = t2.Museum_ID WHERE t3.open_year > 2... | [
"Show me the names of visitors who have been to museums with opening years both before 2009 and after 2011.",
"List the names of visitors who have visited museums that opened before 2009 and also after 2011.",
"Which visitors have visited museums that opened before 2009 and also after 2011?",
"What is the nam... | simple |
cosql-36 | SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRLINES AS T2 ON T2.uid = T1.Airline WHERE T2.Airline = "United Airlines" | [
"Which flight numbers are for flights by United Airlines?",
"Which flight numbers correspond to flights from United Airlines?",
"Show the flight numbers for flights operated by United Airlines.",
"What are flight numbers of Airline \"United Airlines\"?"
] | simple |
cosql-37 | SELECT first_name , last_name FROM players WHERE hand = 'L' ORDER BY birth_date | [
"List the names of left-handed players sorted by their birth dates.",
"Show me the first and last names of players who are left-handed, ordered by their birth dates.",
"Show me the first and last names of players who are left-handed, sorted by their birth dates.",
"List the first and last name of all players ... | simple |
cosql-38 | SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRLINES AS T3 ON T3.uid = T1.Airline WHERE T2.City = "Aberdeen" AND T3.Airline = "United Airlines" | [
"How many flights operated by United Airlines are destined for Aberdeen?",
"Show me the total number of flights that United Airlines has headed for Aberdeen.",
"Could you tell me the count of United Airlines flights destined for Aberdeen?",
"How many United Airlines flights go to City 'Aberdeen'?"
] | aggregate |
cosql-39 | SELECT T3.Name FROM course_arrange AS T1 JOIN course AS T2 ON T1.Course_ID = T2.Course_ID JOIN teacher AS T3 ON T1.Teacher_ID = T3.Teacher_ID WHERE T2.Course = "Math" | [
"Can you tell me the name of the teacher for the Math course?",
"Can you provide the name of the teacher for the Math course?",
"Who teaches the Math course?",
"Show the name of the teacher for the math course."
] | simple |
cosql-40 | 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?",
"Can you find the birth date of the poker player who has made the least money?",
"Can you find the birth date of the poker player with the least earnings?",
"What is the birth date of the poker player with the lowest earnings?"
] | simple |
cosql-41 | SELECT avg(T2.Earnings) FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Height > 200 | [
"What is the average earnings of poker players who are taller than 200 cm?",
"Provide the average earnings for poker players with a height greater than 200 centimeters.",
"Provide the average earnings for poker players with a height more than 200 centimeters.",
"What is the average earnings of poker players w... | aggregate |
cosql-42 | SELECT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'dog' AND T1.stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = '... | [
"List the students with dogs but no cats, including their first name and age.",
"List the students with dogs and no cats, including their first name and age.",
"Show me the names and ages of students who have dogs but not cats.",
"Find the first name and age of students who have a dog but do not have a cat as... | nested |
cosql-43 | SELECT DISTINCT T2.Name FROM country AS T1 JOIN city AS T2 ON T2.CountryCode = T1.Code WHERE T1.Continent = 'Europe' AND T1.Name NOT IN (SELECT T3.Name FROM country AS T3 JOIN countrylanguage AS T4 ON T3.Code = T4.CountryCode WHERE T4.IsOfficial = 'T' AND T4.Language = 'English') | [
"Can you provide the names of cities from European countries that do not have English as an official language?",
"Can you provide cities from European countries that do not have English as an official language?",
"List the cities in European countries where English is not an official language.",
"Which cities... | nested |
cosql-44 | SELECT id FROM tv_channel GROUP BY country HAVING count(*) > 2 | [
"List the IDs of TV channels in countries with more than two channels.",
"Show me the IDs of TV channels from countries that have more than two channels.",
"Which countries have more than two TV channels?",
"find id of the tv channels that from the countries where have more than two tv channels."
] | aggregate |
cosql-45 | SELECT avg(age) FROM Dogs WHERE dog_id IN ( SELECT dog_id FROM Treatments ) | [
"Show me the average age of the dogs who have been treated.",
"What is the average age of dogs that have received treatments?",
"Show me the average age of the dogs who have undergone treatments.",
"What is the average age of the dogs who have gone through any treatments?"
] | nested |
cosql-46 | SELECT sum(Population) FROM country WHERE Name NOT IN (SELECT T1.Name FROM country AS T1 JOIN countrylanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = "English") | [
"Show me the total population of countries that do not have English as a language.",
"What is the combined population of all countries where English is not spoken?",
"Find the sum of the population for countries where English is not an official language.",
"What is the total number of people living in the nat... | nested |
cosql-47 | SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Cylinders = 4 ORDER BY T2.horsepower DESC LIMIT 1; | [
"Show me the model of the car that has 4 cylinders and the greatest horsepower.",
"Show me the name of the car model that has 4 cylinders and the greatest horsepower.",
"What is the model of the 4-cylinder car with the highest horsepower?",
"For the cars with 4 cylinders, which model has the largest horsepowe... | simple |
cosql-48 | SELECT Weight FROM CARS_DATA WHERE Cylinders = 4 AND YEAR = 1974 ORDER BY Weight ASC LIMIT 1; | [
"What is the weight of the lightest car with 4 cylinders made in 1974?",
"What is the weight of the lightest car with 4 cylinders made in 1974 that is currently available?",
"Find the lightest car produced in 1974 that has 4 cylinders.",
"What is the smallest weight of the car produced with 8 cylinders on 197... | simple |
cosql-49 | SELECT t2.name FROM hiring AS t1 JOIN shop AS t2 ON t1.shop_id = t2.shop_id GROUP BY t1.shop_id ORDER BY count(*) DESC LIMIT 1 | [
"Find the name of the shop with the most hires.",
"Find the name of the shop with the highest number of hires.",
"Which shop has hired the most employees?",
"What is the name of the shop that is hiring the largest number of employees?"
] | aggregate |
cosql-50 | SELECT DISTINCT T1.Name FROM singer AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID WHERE T2.Sales > 300000 | [
"Which singers have songs that have surpassed 300,000 in sales?",
"Which singers' songs have surpassed 300,000 in sales?",
"Can you list the names of singers who have songs with sales over 300,000?",
"Show distinct names of singers that have songs with sales more than 300000."
] | simple |
cosql-51 | SELECT contestant_name FROM contestants WHERE contestant_name LIKE "%Al%" | [
"Which contestants have 'Al' in their names?",
"Show me the names of contestants that contain 'Al'.",
"Find all contestants whose names include 'Al'.",
"Return the names the contestants whose names contain the substring 'Al'."
] | simple |
cosql-52 | SELECT count(*) FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.DestAirport = T2.AirportCode JOIN AIRPORTS AS T3 ON T1.SourceAirport = T3.AirportCode WHERE T2.City = "Ashley" AND T3.City = "Aberdeen" | [
"What is the number of flights available from Aberdeen to Ashley?",
"How many flights go from Aberdeen to Ashley?",
"Can you count the total flights that travel between Aberdeen and Ashley?",
"How many flights depart from City 'Aberdeen' and have destination City 'Ashley'?"
] | aggregate |
cosql-53 | SELECT T1.breed_name FROM Breeds AS T1 JOIN Dogs AS T2 ON T1.breed_code = T2.breed_code GROUP BY T1.breed_name ORDER BY count(*) DESC LIMIT 1 | [
"Can you tell me the breed name of the most frequently occurring dogs?",
"Can you tell me the breed name of the most common dogs?",
"Identify the dog breed with the highest number of entries.",
"What is the name of the breed with the most dogs?"
] | aggregate |
cosql-55 | 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 | [
"Show me the IDs, roles, and first names of professionals who have performed at least two treatments.",
"Which professionals have conducted two or more treatments? Please include their ID, role code, and first name.",
"Which professionals have performed two or more treatments? Please include their ID, role code... | aggregate |
cosql-56 | SELECT Code FROM country WHERE GovernmentForm != "Republic" EXCEPT SELECT CountryCode FROM countrylanguage WHERE LANGUAGE = "English" | [
"Find the codes of countries that are not Republics and do not use English as a language.",
"List the countries where the government is not a Republic and English is not used.",
"Which countries do not have a Republic government type and do not have English as a language?",
"What are the codes of the countrie... | simple |
cosql-57 | SELECT count(*) FROM votes WHERE state = 'NY' OR state = 'CA' | [
"How many votes were cast in either New York or California?",
"Count the votes that come from the states of New York and California.",
"Can you tell me the total number of votes from New York and California?",
"What are the number of votes from state 'NY' or 'CA'?"
] | aggregate |
cosql-58 | SELECT Nationality FROM people GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1 | [
"Which nationality is the most common among the people?",
"Which nationality has the most number of people listed?",
"What is the nationality of the highest number of people listed?",
"What is the most common nationality of people?"
] | aggregate |
cosql-59 | SELECT T1.FullName , T1.Id FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id HAVING count(*) > 3; | [
"Show the names and IDs of car makers that have produced more than three different car models.",
"Find the car makers with more than three models in the model list and display their names and IDs.",
"Find the car makers with more than three models listed in the model list and display their names and IDs.",
"W... | aggregate |
cosql-60 | SELECT COUNT(*) FROM CARS_DATA WHERE Accelerate > ( SELECT Accelerate FROM CARS_DATA ORDER BY Horsepower DESC LIMIT 1 ); | [
"Find the number of cars with higher acceleration than the car with the highest horsepower.",
"Count the number of cars that accelerate faster than the car with the most horsepower.",
"Count the number of cars that accelerate quicker than the car with the most horsepower.",
"How many cars have a larger accele... | nested |
cosql-61 | SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015 | [
"Can you provide the count of concerts that happened in 2014 or 2015?",
"What is the number of concerts held in the years 2014 or 2015?",
"How many concerts took place in 2014 or 2015?",
"How many concerts are there in year 2014 or 2015?"
] | aggregate |
cosql-62 | SELECT tourney_name FROM matches GROUP BY tourney_name HAVING count(*) > 10 | [
"Find the names of tournaments where more than 10 matches have been held.",
"Which tournaments have had more than 10 matches played?",
"List the tournament names that have held more than 10 matches.",
"Find the name of tourney that has more than 10 matches."
] | aggregate |
cosql-63 | SELECT first_name , middle_name , last_name FROM Students ORDER BY date_left ASC LIMIT 1 | [
"Who is the student that left the earliest according to the records?",
"Can you provide the name of the earliest student to leave according to the records?",
"Which student was the earliest to leave according to the date they left?"
] | simple |
cosql-64 | SELECT AirportName FROM Airports WHERE AirportCode NOT IN (SELECT SourceAirport FROM Flights UNION SELECT DestAirport FROM Flights) | [
"Can you list the airports that are not involved in any flights?",
"Can you list the airports that have no flights departing from or arriving at them?",
"Show me the airports that are neither origins nor destinations for any flights.",
"Find the name of airports which do not have any flight in and out."
] | nested |
cosql-65 | SELECT transcript_date , other_details FROM Transcripts ORDER BY transcript_date ASC LIMIT 1 | [
"Find the earliest transcript along with its details.",
"Show me the oldest transcript date and its associated details.",
"What is the earliest transcript date available and its details?",
"When is the first transcript released? List the date and details."
] | simple |
cosql-66 | SELECT DISTINCT winner_name , winner_rank FROM matches ORDER BY winner_age LIMIT 3 | [
"Show me the top 3 distinct winners by age, including their names and ranks.",
"List the top 3 unique winners by age, including their names and ranks.",
"Can you provide the names and ranks of the top 3 distinct winners ordered by their age?"
] | simple |
cosql-67 | SELECT name FROM Highschooler EXCEPT SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id | [
"Show me the names of high school students who have no friends.",
"Show me the names of high school students who aren't listed as friends with anyone.",
"Find the high schoolers who have not been befriended by anyone.",
"Show names of all high school students who do not have any friends."
] | simple |
cosql-68 | SELECT T1.Name FROM people AS T1 JOIN poker_player AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Earnings > 300000 | [
"Who are the poker players with earnings greater than 300,000?",
"List the names of poker players whose earnings exceed 300,000.",
"Can you find the poker players who have made more than 300,000 in earnings?",
"What are the names of poker players whose earnings is higher than 300000?"
] | simple |
cosql-69 | SELECT museum_id , name FROM museum ORDER BY num_of_staff DESC LIMIT 1 | [
"Show me the museum with the most staff members.",
"Find the museum with the maximum number of staff.",
"Which museum has the highest number of staff?",
"Find the id and name of the museum that has the most staff members?"
] | simple |
cosql-70 | SELECT first_name , middle_name , last_name FROM Students ORDER BY date_first_registered ASC LIMIT 1 | [
"Find the student who registered the earliest, including their first, middle, and last names.",
"Who was the earliest registered student? Provide their complete name.",
"Show me the full name of the first student to register.",
"Who is the first student to register? List the first name, middle name and last n... | simple |
cosql-71 | SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith' | [
"Show me the pet IDs for students with the last name 'Smith'.",
"Can you find the pet IDs of the students whose last name is 'Smith'?",
"Retrieve the identifiers for pets owned by students called 'Smith'.",
"Find the id of the pet owned by student whose last name is ‘Smith’."
] | simple |
cosql-72 | SELECT major , age FROM student WHERE stuid NOT IN (SELECT T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T3.petid = T2.petid WHERE T3.pettype = 'cat') | [
"Get the major and age of students who are not cat owners.",
"Show the major and age of students who don't have cats as pets.",
"Find the major and age of students who do not own a cat.",
"Find the major and age of students who do not have a cat pet."
] | nested |
cosql-73 | SELECT count(*) FROM Dogs WHERE age < ( SELECT avg(age) FROM Dogs ) | [
"How many dogs have an age less than the average age?",
"Can you tell me how many dogs have an age less than the average age?",
"How many dogs are younger than the average age?",
"How many dogs have an age below the average?"
] | nested |
cosql-74 | SELECT Name FROM country ORDER BY Population ASC LIMIT 3 | [
"List the three countries with the least populations.",
"Which three countries have the smallest populations?",
"List the top three least populated countries.",
"What are the names of the nations with the 3 lowest populations?"
] | simple |
cosql-75 | SELECT T2.name FROM Friend AS T1 JOIN Highschooler AS T2 ON T1.student_id = T2.id WHERE T2.grade > 5 GROUP BY T1.student_id HAVING count(*) >= 2 | [
"Show the names of students in grades higher than 5 who have at least two friends.",
"List the students from grades greater than 5 who have a minimum of two friends.",
"List the names of students in grades above 5 who have two or more friends.",
"Show the names of students who have a grade higher than 5 and h... | aggregate |
cosql-76 | 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' | [
"Show the names, including first, middle, and last names, of students in Bachelor degree programs.",
"List the full names, including first, middle, and last names, of students enrolled in Bachelor degree programs.",
"List the full names of students enrolled in Bachelor degree programs.",
"Who is enrolled in a... | simple |
cosql-77 | SELECT Model FROM CAR_NAMES GROUP BY Model ORDER BY count(*) DESC LIMIT 1; | [
"What is the most common car model listed?",
"Can you show me the car model that appears the most frequently?",
"Can you show me which car model appears the most?",
"Which model has the most version(make) of cars?"
] | aggregate |
cosql-78 | SELECT T2.Name , COUNT(*) FROM course_arrange AS T1 JOIN teacher AS T2 ON T1.Teacher_ID = T2.Teacher_ID GROUP BY T2.Name | [
"List each teacher's name along with the count of courses they have arranged.",
"List each teacher's name along with the count of courses they arranged.",
"Show the number of courses each teacher has arranged.",
"Show names of teachers and the number of courses they teach."
] | aggregate |
cosql-79 | SELECT max(SHARE) , min(SHARE) FROM performance WHERE TYPE != "Live revised" | [
"Find the max and min share values for performances that are not of type 'Live revised'.",
"Find the highest and lowest share values for performances excluding those of the type 'Live revised'.",
"Can you tell me the maximum and minimum share values for performances that are not 'Live revised'?",
"What are th... | aggregate |
cosql-80 | SELECT country_code FROM players GROUP BY country_code HAVING count(*) > 50 | [
"Show me the country codes for countries with player counts exceeding 50.",
"Show me the countries with more than 50 players.",
"List all countries that have more than 50 players, including their country codes.",
"Find the codes of countries that have more than 50 players."
] | aggregate |
cosql-81 | SELECT Region FROM country AS T1 JOIN city AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = "Kabul" | [
"What region is Kabul located in?",
"Can you provide the region where Kabul is situated?",
"Can you provide the region of the country where Kabul is situated?",
"Which region is the city Kabul located in?"
] | simple |
cosql-82 | SELECT YEAR FROM matches GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1 | [
"Which year had the most matches?",
"What year saw the greatest number of matches played?",
"In which year were the highest number of matches played?",
"Find the year that has the most number of matches."
] | aggregate |
cosql-83 | SELECT T1.FullName , T1.Id , count(*) FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker GROUP BY T1.Id; | [
"Show me the names, IDs, and the number of models for each car maker.",
"Show me the names, IDs, and count of models for each car maker.",
"Can you provide the number of models made by each car manufacturer along with their names and IDs?",
"How many models does each car maker produce? List maker full name, i... | aggregate |
cosql-84 | SELECT LANGUAGE FROM countrylanguage GROUP BY LANGUAGE ORDER BY count(*) DESC LIMIT 1 | [
"Which language is spoken in the most number of countries?",
"What is the most commonly spoken language across all countries?",
"What is the most frequently listed language across all countries?",
"Which language is spoken by the largest number of countries?"
] | aggregate |
cosql-85 | SELECT name , Level_of_membership FROM visitor WHERE Level_of_membership > 4 ORDER BY age DESC | [
"List visitors who have a membership level greater than 4, ordered by age from oldest to youngest.",
"List visitors who have a membership level greater than 4, including their names and levels, ordered by age from oldest to youngest.",
"Show the names and membership levels of visitors with a membership level ab... | simple |
cosql-86 | 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 | [
"Identify the country with the highest number of spoken languages.",
"Find the country that is associated with the greatest number of languages.",
"Find the country that is associated with the greatest number of recorded languages.",
"What is name of the country that speaks the largest number of languages?"
] | aggregate |
cosql-87 | SELECT T1.fname , T1.sex FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid HAVING count(*) > 1 | [
"Show me the names and genders of students with multiple pets.",
"List the names and genders of students who have more than one pet.",
"Show me the first names and genders of students owning multiple pets.",
"Find the first name and gender of student who have more than one pet."
] | aggregate |
cosql-88 | SELECT sum(SurfaceArea) FROM country WHERE Continent = "Asia" OR Continent = "Europe" | [
"Find the combined surface area of all countries in Asia or Europe.",
"Can you calculate the sum of the surface areas of countries in Asia or Europe?",
"Can you calculate the sum of the surface areas of countries located in Asia or Europe?",
"What is the total surface area of the continents Asia and Europe?"
... | aggregate |
cosql-89 | SELECT T2.template_id FROM Ref_template_types AS T1 JOIN Templates AS T2 ON T1.template_type_code = T2.template_type_code WHERE T1.template_type_description = "Presentation" | [
"What are the IDs for templates classified under the 'Presentation' description?",
"What are the IDs for templates with the description 'Presentation'?",
"List all template IDs that have a type description of 'Presentation'.",
"What are the template ids with template type description \"Presentation\"."
] | simple |
cosql-90 | SELECT count(*) , student_course_id FROM Transcript_Contents GROUP BY student_course_id ORDER BY count(*) DESC LIMIT 1 | [
"Can you show me the course ID with the most students enrolled from the transcripts?",
"Which course appears most frequently in the transcripts?",
"Can you show me the course with the most students enrolled from the transcripts?",
"How many times at most can a course enrollment result show in different transc... | aggregate |
cosql-91 | SELECT property_name FROM Properties WHERE property_type_code = "House" UNION SELECT property_name FROM Properties WHERE property_type_code = "Apartment" AND room_count > 1 | [
"Show me the names of properties that are either houses or apartments with more than one room.",
"Can you list the property names for houses and apartments that have more than one room?",
"I need the names of properties that are classified as houses or are apartments with at least two rooms.",
"What are the n... | simple |
cosql-92 | SELECT T1.FlightNo FROM FLIGHTS AS T1 JOIN AIRPORTS AS T2 ON T1.SourceAirport = T2.AirportCode WHERE T2.City = "Aberdeen" | [
"Show me the flight numbers of flights departing from Aberdeen.",
"Provide the flight numbers for flights departing from Aberdeen.",
"Provide the flight numbers for flights that take off from Aberdeen.",
"What are flight numbers of flights departing from City \"Aberdeen \"?"
] | simple |
cosql-93 | SELECT count(*) FROM CAR_MAKERS AS T1 JOIN COUNTRIES AS T2 ON T1.Country = T2.CountryId WHERE T2.CountryName = 'france'; | [
"How many car makers are there in France?",
"Get the total number of car makers based in France.",
"How many car makers are located in France?",
"How many car makers are there in france?"
] | aggregate |
cosql-94 | SELECT first_name , last_name , email_address FROM Owners WHERE state LIKE '%North%' | [
"List the first name, last name, and email of owners from states that include 'North' in their names.",
"Can you give me the names and email addresses of owners from states with 'North' in the name?",
"Show me the first name, last name, and email address of owners whose state includes 'North'.",
"Which owners... | simple |
cosql-95 | SELECT city FROM employee WHERE age < 30 GROUP BY city HAVING count(*) > 1 | [
"Find the cities that have more than one employee aged below 30.",
"Find the cities that have more than one employee aged under 30.",
"Which cities have more than one employee younger than 30?",
"Which cities do more than one employee under age 30 come from?"
] | aggregate |
cosql-96 | SELECT T1.last_name FROM Owners AS T1 JOIN Dogs AS T2 ON T1.owner_id = T2.owner_id WHERE T2.age = ( SELECT max(age) FROM Dogs ) | [
"Which owner's last name currently belongs to the oldest dog?",
"Find the last name of the owner of the dog with the maximum age.",
"Which owner's last name belongs to the oldest dog?"
] | nested |
cosql-97 | SELECT Name FROM singer WHERE Singer_ID NOT IN (SELECT Singer_ID FROM song) | [
"Show the names of singers who don't have songs.",
"Show the names of the singers who don't have any songs.",
"Can you list the singers without any songs?",
"List the name of singers that do not have any song."
] | nested |
cosql-98 | SELECT Name FROM singer WHERE Birth_Year = 1948 OR Birth_Year = 1949 | [
"Show me the names of singers born in 1948 or 1949.",
"Can you list singers born in 1948 or 1949?",
"Can you list singers who were born in either 1948 or 1949?",
"Show the name of singers whose birth year is either 1948 or 1949?"
] | simple |
cosql-99 | SELECT count(*) FROM battle WHERE id NOT IN ( SELECT lost_in_battle FROM ship WHERE tonnage = '225' ); | [
"Can you tell me the number of battles that excluded ships of 225 tons?",
"Can you tell me the number of battles without ships of 225 tons?",
"What is the count of battles where no ships weighing 225 tons were involved?",
"How many battles did not lose any ship with tonnage '225'?"
] | nested |
cosql-100 | SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country GROUP BY T1.countryId HAVING count(*) > 3 UNION SELECT T1.countryId , T1.CountryName FROM Countries AS T1 JOIN CAR_MAKERS AS T2 ON T1.CountryId = T2.Country JOIN MODEL_LIST AS T3 ON T2.Id = T3.Maker WH... | [
"Show me the countries with over three car makers as well as those that manufacture a car model called 'fiat'.",
"Show me the countries that have over three car makers or manufacture a car model called 'fiat'.",
"Which countries either have more than three car manufacturers or produce a car model named 'fiat'?"... | nested |
SQL2Text: a semantic captioning benchmark
Test sets for SQL2Text, the task of describing a SQL query in natural language (semantic captioning, the reverse of Text2SQL). They were introduced in
Ali Al-Lawati, Jason Lucas, Prasenjit Mitra. Semantic Captioning: Benchmark Dataset and Graph-Aware Few-Shot In-Context Learning for SQL2Text. COLING 2025.
A SQL query can be described correctly in many ways, so a single reference question, as found in Text2SQL datasets, is a weak target for the reverse task. Each query here therefore comes with several reference captions: three written by GPT-4o through an iterative generate, review and refine prompt, plus the original human-written question from the source dataset where that question passed validation.
Contents
Three configurations, each with a single test split.
| Configuration | Source dataset | Queries | Generated captions | Original questions | Total references |
|---|---|---|---|---|---|
cosql_s2t |
CoSQL, dev | 290 | 870 | 280 | 1,150 |
sparc_s2t |
SParC, dev | 289 | 867 | 282 | 1,149 |
spider_s2t |
Spider, dev | 274 | 822 | 273 | 1,095 |
| Total | 853 | 2,559 | 835 | 3,394 |
from datasets import load_dataset
ds = load_dataset("aliwister/SQL2Text", "spider_s2t", split="test")
print(ds[0])
# {'idx': 'spider-0',
# 'query': 'SELECT count(*) FROM singer',
# 'utterances': ['How many singers are there?',
# 'Please provide the total number of singers.',
# 'Can you count the total number of singers?',
# 'How many singers do we have?'],
# 'query_type': 'aggregate'}
Fields
| Field | Type | Description |
|---|---|---|
idx |
string | Identifier of the example, for example cosql-17. Identifiers are unique within a configuration and are not contiguous, because some examples were removed during validation. |
query |
string | The SQL query to be captioned. |
utterances |
list of strings | The reference captions. The first three were generated by GPT-4o. When there is a fourth, it is the original question from the source dataset; it is absent where the original question did not pass validation. |
query_type |
string | simple, aggregate or nested, the grouping used for the per-type results in the paper. |
How the data was built
- Source. Query and question pairs from the development sets of the three source datasets: all 293 examples of CoSQL and random samples of 293 examples each from SParC and Spider. For the conversational datasets CoSQL and SParC, the pair is the final query and utterance of each interaction.
- Generation. For every query, GPT-4o followed a three-step prompt: generate three captions, review each one for accuracy, clarity, fluency and relevance to the query, then refine them using that feedback. The three references kept per query were chosen by AlignScore and BERTScore against the original question.
- Validation. Three evaluators with NLP and database experience checked every query together with its original question and generated captions for semantic accuracy, preservation of the SQL logic and technical precision (Fleiss' kappa 0.802). Inconsistent queries, original questions and captions were removed, which left the 853 queries above.
The prompt and the full protocol are in the paper.
Use
The paper evaluates captions produced by a model for each query against the references in utterances, with
BLEU-4, BERTScore and AlignScore. Few-shot demonstrations in the paper are drawn from the training sets of the
source datasets, which are not redistributed here. Code for the experiments, including the graph-aware
demonstration selection (AST-ICL), is at github.com/aliwister/ast-icl.
Source datasets and licence
The queries and original questions come from Spider, SParC and CoSQL, all distributed under CC BY-SA 4.0. This dataset is released under the same licence. Please also cite the source datasets when using it.
Citation
@inproceedings{al-lawati-etal-2025-semantic,
title = "Semantic Captioning: Benchmark Dataset and Graph-Aware Few-Shot In-Context Learning for {SQL}2{T}ext",
author = "Al Lawati, Ali and
Lucas, Jason and
Mitra, Prasenjit",
booktitle = "Proceedings of the 31st International Conference on Computational Linguistics",
month = jan,
year = "2025",
address = "Abu Dhabi, UAE",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2025.coling-main.536/",
pages = "8026--8042"
}
- Downloads last month
- -