chat_prompt stringlengths 438 1.53k |
|---|
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"kansas\" (\n \"call_sign\" text,\n \"frequency_m_hz\" real,\n \"city_of_license\" text,\n \"erp_w\" real,\n \"class\" text,\n \"fcc_info\" text\n);\n\nQuestion: What class is assigned to frequencies larger than 89.3 with an ERP W of 250?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"kansas\" WHERE \"frequency_m_hz\">89.3 AND \"erp_w\"=250;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"march\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: What did st. louis score at home?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"march\" WHERE \"home\"='st. louis';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the result of the game on week 1?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"week\"=1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What is the result of the game on October 25, 1959 with more than 26,198 fans in attendance?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"schedule\" WHERE \"attendance\">'26,198' AND \"date\"='october 25, 1959';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"time_et\" text,\n \"game_site\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is the record of the game on week 13?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"schedule\" WHERE \"week\"=13;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"crime\" (\n \"crime\" text,\n \"reported_offenses\" real,\n \"killeen_rate\" real,\n \"texas_rate\" real,\n \"u_s_rate\" real\n);\n\nQuestion: Texas Rate smaller than 32.9, and a U.S. Rate larger than 5.6 is what highest killeen rate?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"killeen_rate\") FROM \"crime\" WHERE \"texas_rate\"<32.9 AND \"u_s_rate\">5.6;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"crime\" (\n \"crime\" text,\n \"reported_offenses\" real,\n \"killeen_rate\" real,\n \"texas_rate\" real,\n \"u_s_rate\" real\n);\n\nQuestion: Reported Offenses larger than 216, and a U.S. Rate smaller than 3274, and a Texas Rate smaller than 2688.9, and a Crime of violent crime has what killeen rate?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"killeen_rate\") FROM \"crime\" WHERE \"reported_offenses\">216 AND \"u_s_rate\"<3274 AND \"texas_rate\"<2688.9 AND \"crime\"='violent crime';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"crime\" (\n \"crime\" text,\n \"reported_offenses\" real,\n \"killeen_rate\" real,\n \"texas_rate\" real,\n \"u_s_rate\" real\n);\n\nQuestion: Killeen Rate of 511.6, and a Texas Rate smaller than 314.4 is the lowest reported offenses?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"reported_offenses\") FROM \"crime\" WHERE \"killeen_rate\"=511.6 AND \"texas_rate\"<314.4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"common_w3_c_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: Tell me the type for category of mouse and attribute of ondblclick"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"common_w3_c_events\" WHERE \"category\"='mouse' AND \"attribute\"='ondblclick';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"common_w3_c_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: Name the type with cancelable of no and attribute of ondragend"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"common_w3_c_events\" WHERE \"cancelable\"='no' AND \"attribute\"='ondragend';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"common_w3_c_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: Name the cancelable for onmouseover"
},
{
"role": "assistant",
"content": "SELECT \"cancelable\" FROM \"common_w3_c_events\" WHERE \"attribute\"='onmouseover';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"common_w3_c_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: Name the bubbles for onscroll"
},
{
"role": "assistant",
"content": "SELECT \"bubbles\" FROM \"common_w3_c_events\" WHERE \"attribute\"='onscroll';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"common_w3_c_events\" (\n \"category\" text,\n \"type\" text,\n \"attribute\" text,\n \"bubbles\" text,\n \"cancelable\" text\n);\n\nQuestion: Name the attribute for mutation and domcharacterdatamodified"
},
{
"role": "assistant",
"content": "SELECT \"attribute\" FROM \"common_w3_c_events\" WHERE \"category\"='mutation' AND \"type\"='domcharacterdatamodified';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: Who had high rebounds on May 1?"
},
{
"role": "assistant",
"content": "SELECT \"high_rebounds\" FROM \"game_log\" WHERE \"date\"='may 1';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"game_log\" (\n \"game\" real,\n \"date\" text,\n \"team\" text,\n \"score\" text,\n \"high_points\" text,\n \"high_rebounds\" text,\n \"high_assists\" text,\n \"location_attendance\" text,\n \"series\" text\n);\n\nQuestion: What location attendance had a score of l 92\u2013116?"
},
{
"role": "assistant",
"content": "SELECT \"location_attendance\" FROM \"game_log\" WHERE \"score\"='l 92\u2013116';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oslo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_nt_points\" text,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Which name has a distance for 1st as 117.5?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"oslo\" WHERE \"1st_m\"=117.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oslo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_nt_points\" text,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: What is the distance for Tom Hilde for 2nd when the 1st distance is more than 117.5?"
},
{
"role": "assistant",
"content": "SELECT \"2nd_m\" FROM \"oslo\" WHERE \"1st_m\">117.5 AND \"name\"='tom hilde';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oslo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_nt_points\" text,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: What are the most points for Thomas Morgenstern with a distance less than 123.5 in 2nd and rank over 4?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"oslo\" WHERE \"2nd_m\"<123.5 AND \"name\"='thomas morgenstern' AND \"rank\">4;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oslo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_nt_points\" text,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: What is the sum of the distances in 2nd for ranks higher than 4 and distance for 1st less than 111.5?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"2nd_m\") FROM \"oslo\" WHERE \"rank\">4 AND \"1st_m\"<111.5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"oslo\" (\n \"rank\" real,\n \"name\" text,\n \"nationality\" text,\n \"1st_m\" real,\n \"2nd_m\" real,\n \"points\" real,\n \"overall_nt_points\" text,\n \"overall_wc_points_rank\" text\n);\n\nQuestion: Who had more than 247.1 points and less than 125 meter distance for 1st?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"oslo\" WHERE \"points\">247.1 AND \"1st_m\"<125;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"medals_table\" (\n \"rank\" text,\n \"nation\" text,\n \"gold\" real,\n \"silver\" real,\n \"bronze\" real,\n \"total\" real\n);\n\nQuestion: What is the gold medal count that has a silver medal count less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"gold\") FROM \"medals_table\" WHERE \"silver\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schools\" (\n \"school_name\" text,\n \"city\" text,\n \"students\" real,\n \"fte_teachers\" real,\n \"pupil_teacher_ratio\" real\n);\n\nQuestion: What is the average number of students for schools with a pupil to teacher ratio of 25.1?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"students\") FROM \"schools\" WHERE \"pupil_teacher_ratio\"=25.1;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schools\" (\n \"school_name\" text,\n \"city\" text,\n \"students\" real,\n \"fte_teachers\" real,\n \"pupil_teacher_ratio\" real\n);\n\nQuestion: What is the lowest pupil to teacher ratio for Saratoga schools with smaller than 1213 students?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pupil_teacher_ratio\") FROM \"schools\" WHERE \"city\"='saratoga' AND \"students\"<1213;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schools\" (\n \"school_name\" text,\n \"city\" text,\n \"students\" real,\n \"fte_teachers\" real,\n \"pupil_teacher_ratio\" real\n);\n\nQuestion: What is the highest number of students for schools in Campbell with pupil to teacher ratios over 25?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"students\") FROM \"schools\" WHERE \"city\"='campbell' AND \"pupil_teacher_ratio\">25;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_per_country\" (\n \"rank\" real,\n \"country\" text,\n \"wins_outdoor\" real,\n \"wins_indoor\" real,\n \"wins_total\" real\n);\n\nQuestion: Name the most rank for wins outdoor larger than 1 and wins indoor less than 0"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"wins_per_country\" WHERE \"wins_outdoor\">1 AND \"wins_indoor\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_per_country\" (\n \"rank\" real,\n \"country\" text,\n \"wins_outdoor\" real,\n \"wins_indoor\" real,\n \"wins_total\" real\n);\n\nQuestion: Name the most rank for uk and wins more than 5"
},
{
"role": "assistant",
"content": "SELECT MAX(\"rank\") FROM \"wins_per_country\" WHERE \"country\"='uk' AND \"wins_indoor\">5;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_per_country\" (\n \"rank\" real,\n \"country\" text,\n \"wins_outdoor\" real,\n \"wins_indoor\" real,\n \"wins_total\" real\n);\n\nQuestion: Name the average wins outdoor with rank more than 4 and wins less than 3 with outdoor wins more than 0"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins_outdoor\") FROM \"wins_per_country\" WHERE \"rank\">4 AND \"wins_total\"<3 AND \"wins_indoor\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"wins_per_country\" (\n \"rank\" real,\n \"country\" text,\n \"wins_outdoor\" real,\n \"wins_indoor\" real,\n \"wins_total\" real\n);\n\nQuestion: Name the most wins total with wins indoor of 0 and wins outdoor of 1 with rank less than 7"
},
{
"role": "assistant",
"content": "SELECT MAX(\"wins_total\") FROM \"wins_per_country\" WHERE \"wins_indoor\"=0 AND \"wins_outdoor\"=1 AND \"rank\"<7;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"portfolio\" (\n \"print_name\" text,\n \"nickname\" text,\n \"number_of_colors\" text,\n \"framed_size\" text,\n \"date_completed\" text\n);\n\nQuestion: What was the frame size in 08/87?"
},
{
"role": "assistant",
"content": "SELECT \"framed_size\" FROM \"portfolio\" WHERE \"date_completed\"='08/87';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"portfolio\" (\n \"print_name\" text,\n \"nickname\" text,\n \"number_of_colors\" text,\n \"framed_size\" text,\n \"date_completed\" text\n);\n\nQuestion: What was the print name in 07/87?"
},
{
"role": "assistant",
"content": "SELECT \"print_name\" FROM \"portfolio\" WHERE \"date_completed\"='07/87';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"portfolio\" (\n \"print_name\" text,\n \"nickname\" text,\n \"number_of_colors\" text,\n \"framed_size\" text,\n \"date_completed\" text\n);\n\nQuestion: What is the frame size that was nicknamed Grand Central?"
},
{
"role": "assistant",
"content": "SELECT \"framed_size\" FROM \"portfolio\" WHERE \"nickname\"='grand central';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"portfolio\" (\n \"print_name\" text,\n \"nickname\" text,\n \"number_of_colors\" text,\n \"framed_size\" text,\n \"date_completed\" text\n);\n\nQuestion: When was the Little Tavern completed?"
},
{
"role": "assistant",
"content": "SELECT \"date_completed\" FROM \"portfolio\" WHERE \"nickname\"='little tavern';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1988_89\" text,\n \"1989_90\" text,\n \"1990_1991\" real\n);\n\nQuestion: How much Average has a Team of san lorenzo, and a 1990-1991 smaller than 45?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"average\") FROM \"relegation\" WHERE \"team\"='san lorenzo' AND \"1990_1991\"<45;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1988_89\" text,\n \"1989_90\" text,\n \"1990_1991\" real\n);\n\nQuestion: Which Played is the lowest one that has a 1989-90 of 39, and a Team of gimnasia de la plata, and Points larger than 108?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"played\") FROM \"relegation\" WHERE \"1989_90\"='39' AND \"team\"='gimnasia de la plata' AND \"points\">108;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"relegation\" (\n \"team\" text,\n \"average\" real,\n \"points\" real,\n \"played\" real,\n \"1988_89\" text,\n \"1989_90\" text,\n \"1990_1991\" real\n);\n\nQuestion: Which 1990-1991 is the average one that has Played of 38, and Points of 40?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"1990_1991\") FROM \"relegation\" WHERE \"played\"=38 AND \"points\"=40;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which College/Junior/Club Team has a Nationality of Canada and Jeff brown?"
},
{
"role": "assistant",
"content": "SELECT \"college_junior_club_team_league\" FROM \"draft_picks\" WHERE \"nationality\"='canada' AND \"player\"='jeff brown';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: Which Player has a Hc Cska Moscow (Russia)?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"draft_picks\" WHERE \"college_junior_club_team_league\"='hc cska moscow (russia)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"draft_picks\" (\n \"round\" real,\n \"player\" text,\n \"position\" text,\n \"nationality\" text,\n \"college_junior_club_team_league\" text\n);\n\nQuestion: What is Nationality of daniel goneau?"
},
{
"role": "assistant",
"content": "SELECT \"nationality\" FROM \"draft_picks\" WHERE \"player\"='daniel goneau';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What points have 500cc as a class, and nsr500 as a machine?"
},
{
"role": "assistant",
"content": "SELECT \"points\" FROM \"motorcycle_grand_prix_results\" WHERE \"class\"='500cc' AND \"machine\"='nsr500';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: How many years have 78 for points?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"points\"=78;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What class has nsr250 as the machine, with points greater than 97?"
},
{
"role": "assistant",
"content": "SELECT \"class\" FROM \"motorcycle_grand_prix_results\" WHERE \"machine\"='nsr250' AND \"points\">97;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What is the lowest year that have wins greater than 0?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"motorcycle_grand_prix_results\" WHERE \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"motorcycle_grand_prix_results\" (\n \"year\" real,\n \"class\" text,\n \"team\" text,\n \"machine\" text,\n \"points\" real,\n \"rank\" text,\n \"wins\" real\n);\n\nQuestion: What are the highest points that have a year less than 1992, with wins less than 0?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"points\") FROM \"motorcycle_grand_prix_results\" WHERE \"year\"<1992 AND \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"record\" text,\n \"game_site\" text,\n \"attendance\" real\n);\n\nQuestion: What was the lowest attendance at a game against the St. Louis Cardinals?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"attendance\") FROM \"schedule\" WHERE \"opponent\"='st. louis cardinals';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: What district is the parish Milburn in?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"name\"='milburn';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: What is the name of the parish that has a population larger than 2,156, a former local authority of Dalton in furness urban district, and a status of a civil parish?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"status\"='civil parish' AND \"population\">'2,156' AND \"former_local_authority\"='dalton in furness urban district';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: What is the population of the Parish, Plumbland, that had a former local authority of Cockermouth Rural District?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"population\") FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"former_local_authority\"='cockermouth rural district' AND \"name\"='plumbland';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: What is the district for the parish, Brough?"
},
{
"role": "assistant",
"content": "SELECT \"district\" FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"name\"='brough';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"list_of_civil_parishes_and_unparished_ar\" (\n \"name\" text,\n \"status\" text,\n \"population\" real,\n \"district\" text,\n \"former_local_authority\" text\n);\n\nQuestion: Who were the former local authority for the civil parish, Ennerdale and Kinniside in the copeland district, with less than 1,280 in population?"
},
{
"role": "assistant",
"content": "SELECT \"former_local_authority\" FROM \"list_of_civil_parishes_and_unparished_ar\" WHERE \"status\"='civil parish' AND \"district\"='copeland' AND \"population\"<'1,280' AND \"name\"='ennerdale and kinniside';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_international_formula_3000_resu\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What year featured lola motorsport as an entrant with over 0 points?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"year\") FROM \"complete_international_formula_3000_resu\" WHERE \"entrant\"='lola motorsport' AND \"points\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_international_formula_3000_resu\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: When is the earliest year that there's a judd engine?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"year\") FROM \"complete_international_formula_3000_resu\" WHERE \"engine\"='judd';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"complete_international_formula_3000_resu\" (\n \"year\" real,\n \"entrant\" text,\n \"chassis\" text,\n \"engine\" text,\n \"points\" real\n);\n\nQuestion: What chassis is used in 1989 with a cosworth engine?"
},
{
"role": "assistant",
"content": "SELECT \"chassis\" FROM \"complete_international_formula_3000_resu\" WHERE \"year\"=1989 AND \"engine\"='cosworth';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_4_early_o_s_n_monopoly_boats\" (\n \"name\" text,\n \"type\" text,\n \"year_built\" real,\n \"where_built\" text,\n \"initial_owners\" text\n);\n\nQuestion: Where was something built earlier than 1858?"
},
{
"role": "assistant",
"content": "SELECT \"where_built\" FROM \"table_4_early_o_s_n_monopoly_boats\" WHERE \"year_built\"<1858;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_4_early_o_s_n_monopoly_boats\" (\n \"name\" text,\n \"type\" text,\n \"year_built\" real,\n \"where_built\" text,\n \"initial_owners\" text\n);\n\nQuestion: What was built in 1857?"
},
{
"role": "assistant",
"content": "SELECT \"name\" FROM \"table_4_early_o_s_n_monopoly_boats\" WHERE \"year_built\"=1857;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_4_early_o_s_n_monopoly_boats\" (\n \"name\" text,\n \"type\" text,\n \"year_built\" real,\n \"where_built\" text,\n \"initial_owners\" text\n);\n\nQuestion: Who were the initial owners of Wasco in 1858?"
},
{
"role": "assistant",
"content": "SELECT \"initial_owners\" FROM \"table_4_early_o_s_n_monopoly_boats\" WHERE \"year_built\"=1858 AND \"name\"='wasco';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"table_4_early_o_s_n_monopoly_boats\" (\n \"name\" text,\n \"type\" text,\n \"year_built\" real,\n \"where_built\" text,\n \"initial_owners\" text\n);\n\nQuestion: What was the type of boat built in Port Blakeley"
},
{
"role": "assistant",
"content": "SELECT \"type\" FROM \"table_4_early_o_s_n_monopoly_boats\" WHERE \"where_built\"='port blakeley';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: What is the date of the game at Arrowhead Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"schedule\" WHERE \"location\"='arrowhead stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"location\" text,\n \"time_et\" text,\n \"result\" text,\n \"record\" text\n);\n\nQuestion: Who is the opponent of the game after week 4 on Sun. Nov. 17?"
},
{
"role": "assistant",
"content": "SELECT \"opponent\" FROM \"schedule\" WHERE \"week\">4 AND \"date\"='sun. nov. 17';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_mexico_counties_ranked_by_per_capita\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What's the median family income with a household income of $25,583?"
},
{
"role": "assistant",
"content": "SELECT \"median_family_income\" FROM \"new_mexico_counties_ranked_by_per_capita\" WHERE \"median_household_income\"='$25,583';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"new_mexico_counties_ranked_by_per_capita\" (\n \"county\" text,\n \"per_capita_income\" text,\n \"median_household_income\" text,\n \"median_family_income\" text,\n \"population\" real,\n \"number_of_households\" real\n);\n\nQuestion: What's the $51,914 median household income per capita?"
},
{
"role": "assistant",
"content": "SELECT \"per_capita_income\" FROM \"new_mexico_counties_ranked_by_per_capita\" WHERE \"median_household_income\"='$51,914';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score when Steve Stricker was runner-up?"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"pga_tour_wins_5\" WHERE \"runner_s_up\"='steve stricker';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the margin of victory when the winning score was \u221214 (63-67-73-67=270)?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_5\" WHERE \"winning_score\"='\u221214 (63-67-73-67=270)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: Who was the runnerup when the margin of victory was 1 stroke on jan 30, 2000?"
},
{
"role": "assistant",
"content": "SELECT \"runner_s_up\" FROM \"pga_tour_wins_5\" WHERE \"margin_of_victory\"='1 stroke' AND \"date\"='jan 30, 2000';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the margin of victory when the winning score was \u221212 (66-67-64-71=268)?"
},
{
"role": "assistant",
"content": "SELECT \"margin_of_victory\" FROM \"pga_tour_wins_5\" WHERE \"winning_score\"='\u221212 (66-67-64-71=268)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What day was the margin of victory 1 stroke when the tournament was colonial national invitation?"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"pga_tour_wins_5\" WHERE \"margin_of_victory\"='1 stroke' AND \"tournament\"='colonial national invitation';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"pga_tour_wins_5\" (\n \"date\" text,\n \"tournament\" text,\n \"winning_score\" text,\n \"margin_of_victory\" text,\n \"runner_s_up\" text\n);\n\nQuestion: What was the winning score for runnerup Greg Norman"
},
{
"role": "assistant",
"content": "SELECT \"winning_score\" FROM \"pga_tour_wins_5\" WHERE \"runner_s_up\"='greg norman';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_series\" (\n \"name\" text,\n \"pennant_number\" text,\n \"ordered\" real,\n \"builder\" text,\n \"commissioned\" text\n);\n\nQuestion: Which Builder has a Pennant number of Q149?"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"first_series\" WHERE \"pennant_number\"='q149';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_series\" (\n \"name\" text,\n \"pennant_number\" text,\n \"ordered\" real,\n \"builder\" text,\n \"commissioned\" text\n);\n\nQuestion: On what date was the ship with a Pennant number of Q144 commissioned?"
},
{
"role": "assistant",
"content": "SELECT \"commissioned\" FROM \"first_series\" WHERE \"pennant_number\"='q144';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_series\" (\n \"name\" text,\n \"pennant_number\" text,\n \"ordered\" real,\n \"builder\" text,\n \"commissioned\" text\n);\n\nQuestion: How many ships are named Monge?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"ordered\") FROM \"first_series\" WHERE \"name\"='monge';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"spacecraft\" text,\n \"destination\" text,\n \"launched\" text,\n \"closest_approach\" text,\n \"time_elapsed\" text\n);\n\nQuestion: What launched has mariner 4 as the spacecraft?"
},
{
"role": "assistant",
"content": "SELECT \"launched\" FROM \"1960s\" WHERE \"spacecraft\"='mariner 4';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"1960s\" (\n \"spacecraft\" text,\n \"destination\" text,\n \"launched\" text,\n \"closest_approach\" text,\n \"time_elapsed\" text\n);\n\nQuestion: What launched has 158 days (5 months, 8 days) as the time elapsed?"
},
{
"role": "assistant",
"content": "SELECT \"launched\" FROM \"1960s\" WHERE \"time_elapsed\"='158 days (5 months, 8 days)';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"see_also\" (\n \"volume_issue\" text,\n \"issue_date_s\" text,\n \"weeks_on_top\" real,\n \"song\" text,\n \"artist\" text\n);\n\nQuestion: When was the song by Andy Gibb issued?"
},
{
"role": "assistant",
"content": "SELECT \"issue_date_s\" FROM \"see_also\" WHERE \"artist\"='andy gibb';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Round has a College of stanford, and an Overall smaller than 8?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"round\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='stanford' AND \"overall\"<8;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: How many Picks have a College of tennessee, and an Overall smaller than 270?"
},
{
"role": "assistant",
"content": "SELECT SUM(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='tennessee' AND \"overall\"<270;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"atlanta_falcons_draft_history\" (\n \"round\" real,\n \"pick_num\" real,\n \"overall\" real,\n \"name\" text,\n \"position\" text,\n \"college\" text\n);\n\nQuestion: Which Pick # is the lowest one that has a College of troy state, and a Name of reggie dwight, and an Overall smaller than 217?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"pick_num\") FROM \"atlanta_falcons_draft_history\" WHERE \"college\"='troy state' AND \"name\"='reggie dwight' AND \"overall\"<217;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What's the smallest amount of earnings when the wins are less than 72 and the rank is more than 3?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"earnings\") FROM \"leaders\" WHERE \"wins\"<72 AND \"rank\">3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What's the least amount of wins with earnings that are more than $2,556,043, and where Lee Trevino is a player?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"wins\") FROM \"leaders\" WHERE \"earnings\">'2,556,043' AND \"player\"='lee trevino';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"leaders\" (\n \"rank\" real,\n \"player\" text,\n \"country\" text,\n \"earnings\" real,\n \"wins\" real\n);\n\nQuestion: What's the smallest amount of earnings when there are more than 18 wins and the rank is 2?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"earnings\") FROM \"leaders\" WHERE \"wins\">18 AND \"rank\"=2;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"great_britain\" (\n \"season\" text,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: What is the lowest number of losses for a team with more than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"losses\") FROM \"great_britain\" WHERE \"wins\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"great_britain\" (\n \"season\" text,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: What is the average number of losses for teams with fewer than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"losses\") FROM \"great_britain\" WHERE \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"great_britain\" (\n \"season\" text,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: What is the average number of wins for Runcorn Highfield with more than 0 draws?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"wins\") FROM \"great_britain\" WHERE \"team\"='runcorn highfield' AND \"draws\">0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"great_britain\" (\n \"season\" text,\n \"team\" text,\n \"wins\" real,\n \"losses\" real,\n \"draws\" real\n);\n\nQuestion: What is the lowest number of losses for Nottingham City with fewer than 0 wins?"
},
{
"role": "assistant",
"content": "SELECT MIN(\"losses\") FROM \"great_britain\" WHERE \"team\"='nottingham city' AND \"wins\"<0;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: What is the weight of the player from the Philadelphia 76ers?"
},
{
"role": "assistant",
"content": "SELECT COUNT(\"weight\") FROM \"contestants\" WHERE \"team\"='philadelphia 76ers';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"contestants\" (\n \"pos\" text,\n \"player\" text,\n \"team\" text,\n \"height\" text,\n \"weight\" real\n);\n\nQuestion: What is the height of the player, Larry Hughes?"
},
{
"role": "assistant",
"content": "SELECT \"height\" FROM \"contestants\" WHERE \"player\"='larry hughes';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_team\" (\n \"start_date\" text,\n \"end_date\" text,\n \"pos\" text,\n \"player\" text,\n \"to_club\" text\n);\n\nQuestion: What player was moved to Blackpool?"
},
{
"role": "assistant",
"content": "SELECT \"player\" FROM \"first_team\" WHERE \"to_club\"='blackpool';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"first_team\" (\n \"start_date\" text,\n \"end_date\" text,\n \"pos\" text,\n \"player\" text,\n \"to_club\" text\n);\n\nQuestion: A player was moved to celtic had an end of what date?"
},
{
"role": "assistant",
"content": "SELECT \"end_date\" FROM \"first_team\" WHERE \"to_club\"='celtic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"game\" real,\n \"february\" real,\n \"opponent\" text,\n \"score\" text,\n \"record\" text,\n \"points\" real\n);\n\nQuestion: Which Game is the average one that has a February larger than 20, and a Record of 41\u201317\u20134, and Points smaller than 86?"
},
{
"role": "assistant",
"content": "SELECT AVG(\"game\") FROM \"regular_season\" WHERE \"february\">20 AND \"record\"='41\u201317\u20134' AND \"points\"<86;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"third_round\" (\n \"place\" text,\n \"player\" text,\n \"country\" text,\n \"score\" text,\n \"to_par\" text\n);\n\nQuestion: what country hosted david toms"
},
{
"role": "assistant",
"content": "SELECT \"country\" FROM \"third_round\" WHERE \"player\"='david toms';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule_and_results\" (\n \"game\" real,\n \"date\" real,\n \"opponent\" text,\n \"score\" text,\n \"location_attendance\" text,\n \"record\" text\n);\n\nQuestion: What was the score for game 18?"
},
{
"role": "assistant",
"content": "SELECT \"score\" FROM \"schedule_and_results\" WHERE \"game\"=18;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"kickoff_et\" text,\n \"nfl_recap\" text,\n \"record\" text\n);\n\nQuestion: What is the kickoff time for the game that was at Ralph Wilson Stadium?"
},
{
"role": "assistant",
"content": "SELECT \"kickoff_et\" FROM \"regular_season\" WHERE \"game_site\"='ralph wilson stadium';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"kickoff_et\" text,\n \"nfl_recap\" text,\n \"record\" text\n);\n\nQuestion: What is the record for the game against the New England Patriots with a recap?"
},
{
"role": "assistant",
"content": "SELECT \"record\" FROM \"regular_season\" WHERE \"nfl_recap\"='recap' AND \"opponent\"='new england patriots';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"regular_season\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"game_site\" text,\n \"kickoff_et\" text,\n \"nfl_recap\" text,\n \"record\" text\n);\n\nQuestion: What is the result of the game on week 11?"
},
{
"role": "assistant",
"content": "SELECT \"result\" FROM \"regular_season\" WHERE \"week\"=11;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"october\" (\n \"date\" text,\n \"visitor\" text,\n \"score\" text,\n \"home\" text,\n \"record\" text\n);\n\nQuestion: Who was the visitor that led to a 3-0-2 record?"
},
{
"role": "assistant",
"content": "SELECT \"visitor\" FROM \"october\" WHERE \"record\"='3-0-2';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"submissions\" (\n \"year_ceremony\" text,\n \"film_title_used_in_nomination\" text,\n \"original_title\" text,\n \"language_s\" text,\n \"result\" text\n);\n\nQuestion: What is the original title of the Gypsy Magic film title used in nomination?"
},
{
"role": "assistant",
"content": "SELECT \"original_title\" FROM \"submissions\" WHERE \"film_title_used_in_nomination\"='gypsy magic';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" real,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" real\n);\n\nQuestion: Name the builder for number 3"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"locomotives\" WHERE \"number\"=3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" real,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" real\n);\n\nQuestion: Name the date with works number less than 1673 and number less than 3"
},
{
"role": "assistant",
"content": "SELECT \"date\" FROM \"locomotives\" WHERE \"works_number\"<1673 AND \"number\"<3;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"locomotives\" (\n \"number\" real,\n \"builder\" text,\n \"type\" text,\n \"date\" text,\n \"works_number\" real\n);\n\nQuestion: Name the builder for 4/1906 and works number more than 199"
},
{
"role": "assistant",
"content": "SELECT \"builder\" FROM \"locomotives\" WHERE \"works_number\">199 AND \"date\"='4/1906';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"schedule\" (\n \"week\" real,\n \"date\" text,\n \"opponent\" text,\n \"result\" text,\n \"attendance\" real\n);\n\nQuestion: What was the largest number of people in attendance of the game with a W 14-3 result after week 10?"
},
{
"role": "assistant",
"content": "SELECT MAX(\"attendance\") FROM \"schedule\" WHERE \"result\"='w 14-3' AND \"week\">10;"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"de_sus\" text,\n \"zares\" text,\n \"nlpd\" text\n);\n\nQuestion: What is the percentage for Zares on May 21\u201322?"
},
{
"role": "assistant",
"content": "SELECT \"zares\" FROM \"opinion_polls\" WHERE \"date\"='may 21\u201322';"
}
] |
[
{
"role": "system",
"content": "You are an expert SQL query generator. Only output valid SQL."
},
{
"role": "user",
"content": "### Database Schema\nCREATE TABLE \"opinion_polls\" (\n \"source\" text,\n \"date\" text,\n \"de_sus\" text,\n \"zares\" text,\n \"nlpd\" text\n);\n\nQuestion: What is the source for 7% DeSUS?"
},
{
"role": "assistant",
"content": "SELECT \"source\" FROM \"opinion_polls\" WHERE \"de_sus\"='7%';"
}
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.