dataset_name stringclasses 1
value | split stringclasses 1
value | prompt_raw stringlengths 897 4.29k | messages listlengths 2 2 | question stringlengths 18 174 | sample_id int64 0 1.03k | db_id stringclasses 20
values | groundtruth_sqls listlengths 1 1 |
|---|---|---|---|---|---|---|---|
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many singers do we have? | 0 | concert_singer | [
"SELECT count(*) FROM singer"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the total number of singers? | 1 | concert_singer | [
"SELECT count(*) FROM singer"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Show name, country, age for all singers ordered by age from the oldest to the youngest. | 2 | concert_singer | [
"SELECT name , country , age FROM singer ORDER BY age DESC"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the names, countries, and ages for every singer in descending order of age? | 3 | concert_singer | [
"SELECT name , country , age FROM singer ORDER BY age DESC"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID: INT PRIMARY KEY - singer id
... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the average, minimum, and maximum age of all singers from France? | 4 | concert_singer | [
"SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the average, minimum, and maximum age for all French singers? | 5 | concert_singer | [
"SELECT avg(age) , min(age) , max(age) FROM singer WHERE country = 'France'"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Show the name and the release year of the song by the youngest singer. | 6 | concert_singer | [
"SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the names and release years for all the songs of the youngest singer? | 7 | concert_singer | [
"SELECT song_name , song_release_year FROM singer ORDER BY age LIMIT 1"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are all distinct countries where singers above age 20 are from? | 8 | concert_singer | [
"SELECT DISTINCT country FROM singer WHERE age > 20"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the different countries with singers above age 20? | 9 | concert_singer | [
"SELECT DISTINCT country FROM singer WHERE age > 20"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Show all countries and the number of singers in each country. | 10 | concert_singer | [
"SELECT country , count(*) FROM singer GROUP BY country"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many singers are from each country? | 11 | concert_singer | [
"SELECT country , count(*) FROM singer GROUP BY country"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | List all song names by singers above the average age. | 12 | concert_singer | [
"SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are all the song names by singers who are older than average? | 13 | concert_singer | [
"SELECT song_name FROM singer WHERE age > (SELECT avg(age) FROM singer)"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Show location and name for all stadiums with a capacity between 5000 and 10000. | 14 | concert_singer | [
"SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the locations and names of all stations with capacity between 5000 and 10000? | 15 | concert_singer | [
"SELECT LOCATION , name FROM stadium WHERE capacity BETWEEN 5000 AND 10000"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the maximum capacity and the average of all stadiums ? | 16 | concert_singer | [
"select max(capacity), average from stadium"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the average and maximum capacities for all stadiums ? | 17 | concert_singer | [
"select avg(capacity) , max(capacity) from stadium"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the name and capacity for the stadium with highest average attendance? | 18 | concert_singer | [
"SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the name and capacity for the stadium with the highest average attendance? | 19 | concert_singer | [
"SELECT name , capacity FROM stadium ORDER BY average DESC LIMIT 1"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many concerts are there in year 2014 or 2015? | 20 | concert_singer | [
"SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many concerts occurred in 2014 or 2015? | 21 | concert_singer | [
"SELECT count(*) FROM concert WHERE YEAR = 2014 OR YEAR = 2015"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Show the stadium name and the number of concerts in each stadium. | 22 | concert_singer | [
"SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | For each stadium, how many concerts play there? | 23 | concert_singer | [
"SELECT T2.name , count(*) FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id GROUP BY T1.stadium_id"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Show the stadium name and capacity with most number of concerts in year 2014 or after. | 24 | concert_singer | [
"SELECT T2.name , T2.capacity FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.year >= 2014 GROUP BY T2.stadium_id ORDER BY count(*) DESC LIMIT 1"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the name and capacity of the stadium with the most concerts after 2013 ? | 25 | concert_singer | [
"select t2.name , t2.capacity from concert as t1 join stadium as t2 on t1.stadium_id = t2.stadium_id where t1.year > 2013 group by t2.stadium_id order by count(*) desc limit 1"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Which year has most number of concerts? | 26 | concert_singer | [
"SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the year that had the most concerts? | 27 | concert_singer | [
"SELECT YEAR FROM concert GROUP BY YEAR ORDER BY count(*) DESC LIMIT 1"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Show the stadium names without any concert. | 28 | concert_singer | [
"SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the names of the stadiums without any concerts? | 29 | concert_singer | [
"SELECT name FROM stadium WHERE stadium_id NOT IN (SELECT stadium_id FROM concert)"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Show countries where a singer above age 40 and a singer below 30 are from. | 30 | concert_singer | [
"SELECT country FROM singer WHERE age > 40 INTERSECT SELECT country FROM singer WHERE age < 30"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Show names for all stadiums except for stadiums having a concert in year 2014. | 31 | concert_singer | [
"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"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the names of all stadiums that did not have a concert in 2014? | 32 | concert_singer | [
"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"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Show the name and theme for all concerts and the number of singers in each concert. | 33 | concert_singer | [
"SELECT T2.concert_name , T2.theme , count(*) FROM singer_in_concert AS T1 JOIN concert AS T2 ON T1.concert_id = T2.concert_id GROUP BY T2.concert_id"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the names , themes , and number of singers for every concert ? | 34 | concert_singer | [
"select t2.concert_name , t2.theme , count(*) from singer_in_concert as t1 join concert as t2 on t1.concert_id = t2.concert_id group by t2.concert_id"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | List singer names and number of concerts for each singer. | 35 | concert_singer | [
"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"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the names of the singers and number of concerts for each person? | 36 | concert_singer | [
"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"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | List all singer names in concerts in year 2014. | 37 | concert_singer | [
"SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the names of the singers who performed in a concert in 2014? | 38 | concert_singer | [
"SELECT T2.name FROM singer_in_concert AS T1 JOIN singer AS T2 ON T1.singer_id = T2.singer_id JOIN concert AS T3 ON T1.concert_id = T3.concert_id WHERE T3.year = 2014"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | what is the name and nation of the singer who have a song having 'Hey' in its name? | 39 | concert_singer | [
"SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the name and country of origin of every singer who has a song with the word 'Hey' in its title? | 40 | concert_singer | [
"SELECT name , country FROM singer WHERE song_name LIKE '%Hey%'"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the name and location of the stadiums which some concerts happened in the years of both 2014 and 2015. | 41 | concert_singer | [
"SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the names and locations of the stadiums that had concerts that occurred in both 2014 and 2015? | 42 | concert_singer | [
"SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2014 INTERSECT SELECT T2.name , T2.location FROM concert AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.stadium_id WHERE T1.Year = 2015"
] |
spider | dev | Database Schema:
Table singer
singer.Country: TEXT - country
Sample values: "Netherlands", "United States", "France"
singer.Name: TEXT - name
Sample values: "Joe Sharp", "Timbaland", "Justin Brown", "Rose White", "John Nizinik"
singer.Is_male: BOOL - is male
Sample values: "F", "T"
singer.Singer_ID... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the number of concerts happened in the stadium with the highest capacity . | 43 | concert_singer | [
"select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)"
] |
spider | dev | Database Schema:
Table singer_in_concert
singer_in_concert.Singer_ID: TEXT PRIMARY KEY - singer id
Sample values: "2", "3", "5", "6", "4"
singer_in_concert.concert_ID: INT PRIMARY KEY - concert id
Sample values: "1", "2", "3", "4", "5"
Table singer
singer.Name: TEXT - name
Sample values: "Joe Sharp"... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the number of concerts that occurred in the stadium with the largest capacity ? | 44 | concert_singer | [
"select count(*) from concert where stadium_id = (select stadium_id from stadium order by capacity desc limit 1)"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the number of pets whose weight is heavier than 10. | 45 | pets_1 | [
"SELECT count(*) FROM pets WHERE weight > 10"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many pets have a greater weight than 10? | 46 | pets_1 | [
"SELECT count(*) FROM pets WHERE weight > 10"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9.3"
P... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the weight of the youngest dog. | 47 | pets_1 | [
"SELECT weight FROM pets ORDER BY pet_age LIMIT 1"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9.3"
P... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How much does the youngest dog weigh? | 48 | pets_1 | [
"SELECT weight FROM pets ORDER BY pet_age LIMIT 1"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the maximum weight for each type of pet. List the maximum weight and pet type. | 49 | pets_1 | [
"SELECT max(weight) , petType FROM pets GROUP BY petType"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | List the maximum weight and type for each type of pet. | 50 | pets_1 | [
"SELECT max(weight) , petType FROM pets GROUP BY petType"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find number of pets owned by students who are older than 20. | 51 | pets_1 | [
"SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many pets are owned by students that have an age greater than 20? | 52 | pets_1 | [
"SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.age > 20"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9.3"
P... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the number of dog pets that are raised by female students (with sex F). | 53 | pets_1 | [
"SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9.3"
P... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many dog pets are raised by female students? | 54 | pets_1 | [
"SELECT count(*) FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid JOIN pets AS T3 ON T2.petid = T3.petid WHERE T1.sex = 'F' AND T3.pettype = 'dog'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the number of distinct type of pets. | 55 | pets_1 | [
"SELECT count(DISTINCT pettype) FROM pets"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many different types of pet are there? | 56 | pets_1 | [
"SELECT count(DISTINCT pettype) FROM pets"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the first name of students who have cat or dog pet. | 57 | pets_1 | [
"SELECT DISTINCT T1.Fname 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' OR T3.pettype = 'dog'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the first names of every student who has a cat or dog as a pet? | 58 | pets_1 | [
"SELECT DISTINCT T1.Fname 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' OR T3.pettype = 'dog'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the first name of students who have both cat and dog pets . | 59 | pets_1 | [
"select t1.fname 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' intersect select t1.fname 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'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the students' first names who have both cats and dogs as pets? | 60 | pets_1 | [
"SELECT T1.Fname 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' INTERSECT SELECT T1.Fname 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'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9.3"
P... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the major and age of students who do not have a cat pet. | 61 | pets_1 | [
"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')"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9.3"
P... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What major is every student who does not own a cat as a pet, and also how old are they? | 62 | pets_1 | [
"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')"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9.3"
P... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the id of students who do not have a cat pet. | 63 | pets_1 | [
"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'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9.3"
P... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the ids of the students who do not own cats as pets? | 64 | pets_1 | [
"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'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the first name and age of students who have a dog but do not have a cat as a pet. | 65 | pets_1 | [
"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 ... |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the first name of every student who has a dog but does not have a cat? | 66 | pets_1 | [
"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 ... |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the type and weight of the youngest pet. | 67 | pets_1 | [
"SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What type of pet is the youngest animal, and how much does it weigh? | 68 | pets_1 | [
"SELECT pettype , weight FROM pets ORDER BY pet_age LIMIT 1"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the id and weight of all pets whose age is older than 1. | 69 | pets_1 | [
"SELECT petid , weight FROM pets WHERE pet_age > 1"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the id and weight of every pet who is older than 1? | 70 | pets_1 | [
"SELECT petid , weight FROM pets WHERE pet_age > 1"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the average and maximum age for each type of pet. | 71 | pets_1 | [
"SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the average and maximum age for each pet type? | 72 | pets_1 | [
"SELECT avg(pet_age) , max(pet_age) , pettype FROM pets GROUP BY pettype"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the average weight for each pet type. | 73 | pets_1 | [
"SELECT avg(weight) , pettype FROM pets GROUP BY pettype"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the average weight for each type of pet? | 74 | pets_1 | [
"SELECT avg(weight) , pettype FROM pets GROUP BY pettype"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the first name and age of students who have a pet. | 75 | pets_1 | [
"SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What are the different first names and ages of the students who do have pets? | 76 | pets_1 | [
"SELECT DISTINCT T1.fname , T1.age FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the id of the pet owned by student whose last name is ‘Smith’. | 77 | pets_1 | [
"SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the id of the pet owned by the student whose last name is 'Smith'? | 78 | pets_1 | [
"SELECT T2.petid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid WHERE T1.Lname = 'Smith'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the number of pets for each student who has any pet and student id. | 79 | pets_1 | [
"SELECT count(*) , T1.stuid FROM student AS T1 JOIN has_pet AS T2 ON T1.stuid = T2.stuid GROUP BY T1.stuid"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | For students who have pets , how many pets does each student have ? list their ids instead of names . | 80 | pets_1 | [
"select count(*) , t1.stuid from student as t1 join has_pet as t2 on t1.stuid = t2.stuid group by t1.stuid"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the first name and gender of student who have more than one pet. | 81 | pets_1 | [
"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"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the first name and gender of the all the students who have more than one pet? | 82 | pets_1 | [
"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"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9.3"
P... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the last name of the student who has a cat that is age 3. | 83 | pets_1 | [
"SELECT T1.lname 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.pet_age = 3 AND T3.pettype = 'cat'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9.3"
P... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the last name of the student who has a cat that is 3 years old? | 84 | pets_1 | [
"SELECT T1.lname 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.pet_age = 3 AND T3.pettype = 'cat'"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the average age of students who do not have any pet . | 85 | pets_1 | [
"select avg(age) from student where stuid not in (select stuid from has_pet)"
] |
spider | dev | Database Schema:
Table Has_Pet
Has_Pet.StuID: INTEGER - student id
Sample values: "1001", "1002"
Has_Pet.PetID: INTEGER - pet id
Sample values: "2001", "2002", "2003"
Table Pets
Pets.PetType: VARCHAR(20) - pet type
Sample values: "cat", "dog"
Pets.weight: REAL
Sample values: "12.0", "13.4", "9... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the average age for all students who do not own any pets ? | 86 | pets_1 | [
"select avg(age) from student where stuid not in (select stuid from has_pet)"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Weight... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many continents are there? | 87 | car_1 | [
"SELECT count(*) FROM CONTINENTS;"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Weight... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the number of continents? | 88 | car_1 | [
"SELECT count(*) FROM CONTINENTS;"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Weight... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many countries does each continent have? List the continent id, continent name and the number of countries. | 89 | car_1 | [
"SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Weight... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | For each continent, list its id, name, and how many countries it has? | 90 | car_1 | [
"SELECT T1.ContId , T1.Continent , count(*) FROM CONTINENTS AS T1 JOIN COUNTRIES AS T2 ON T1.ContId = T2.Continent GROUP BY T1.ContId;"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Weight... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many countries are listed? | 91 | car_1 | [
"SELECT count(*) FROM COUNTRIES;"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Weight... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many countries exist? | 92 | car_1 | [
"SELECT count(*) FROM COUNTRIES;"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Accele... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | How many models does each car maker produce? List maker full name, id and the number. | 93 | car_1 | [
"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;"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Accele... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the full name of each car maker, along with its id and how many models it produces? | 94 | car_1 | [
"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;"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Accele... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Which model of the car has the minimum horsepower? | 95 | car_1 | [
"SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Accele... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the model of the car with the smallest amount of horsepower? | 96 | car_1 | [
"SELECT T1.Model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id ORDER BY T2.horsepower ASC LIMIT 1;"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Accele... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the model of the car whose weight is below the average weight. | 97 | car_1 | [
"SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Accele... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | What is the model for the car with a weight smaller than the average? | 98 | car_1 | [
"SELECT T1.model FROM CAR_NAMES AS T1 JOIN CARS_DATA AS T2 ON T1.MakeId = T2.Id WHERE T2.Weight < (SELECT avg(Weight) FROM CARS_DATA)"
] |
spider | dev | Database Schema:
Table cars_data
cars_data.Horsepower: TEXT - horsepower
Sample values: "130", "165", "150", "140", "198"
cars_data.MPG: TEXT - mpg
Sample values: "18", "15", "16", "17", "14"
cars_data.Edispl: REAL - edispl
Sample values: "307.0", "350.0", "318.0", "304.0", "302.0"
cars_data.Accele... | [
{
"content": "\nYou are a meticulous SQL expert. Generate a single, correct SQL query for the user question and the provided database schema.\nFollow this exact response format:\n\nRules:\n- Output exactly one SQL statement.\n- The SQL must be executable on SQLite.\n- Do not include any explanatory text.\n- Out... | Find the name of the makers that produced some cars in the year of 1970? | 99 | car_1 | [
"SELECT DISTINCT T1.Maker FROM CAR_MAKERS AS T1 JOIN MODEL_LIST AS T2 ON T1.Id = T2.Maker JOIN CAR_NAMES AS T3 ON T2.model = T3.model JOIN CARS_DATA AS T4 ON T3.MakeId = T4.id WHERE T4.year = '1970';"
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.