text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"mascot" text,
"location" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"county" text
);
Question: What county is Whiteland Community School in?
<|assistant|>
SELECT "county" FROM "indiana_high_school_athletics_conference" WHERE "school"='whiteland community';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"mascot" text,
"location" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"county" text
);
Question: What county has a football team in IHSAA class AAAAA and a school macot of the Grizzly Cubs?
<|assistant|>
SELECT "county" FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_football_class"='aaaaa' AND "mascot"='grizzly cubs';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"mascot" text,
"location" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"county" text
);
Question: What county has a school mascot of the Pioneers?
<|assistant|>
SELECT "county" FROM "indiana_high_school_athletics_conference" WHERE "mascot"='pioneers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"mascot" text,
"location" text,
"enrollment" real,
"ihsaa_class" text,
"ihsaa_football_class" text,
"county" text
);
Question: What are the IHSAA classes of the Indianapolis schools?
<|assistant|>
SELECT "ihsaa_class" FROM "indiana_high_school_athletics_conference" WHERE "location"='indianapolis';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semi_final_2_7_february_2009" (
"draw" real,
"artist" text,
"song" text,
"points" real,
"place" real
);
Question: Which Song has Points smaller than 53, and a Place larger than 8, and a Draw larger than 1?
<|assistant|>
SELECT "song" FROM "semi_final_2_7_february_2009" WHERE "points"<53 AND "place">8 AND "draw">1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "116_seats_needed_for_a_majority" (
"date_released" text,
"polling_institute" text,
"social_democratic" text,
"socialist" text,
"green_communist" text,
"people_s_party" text,
"left_bloc" text,
"lead" text
);
Question: What is the result for the Green-Communist party when the Left Bloc has 3.6%?
<|assistant|>
SELECT "green_communist" FROM "116_seats_needed_for_a_majority" WHERE "left_bloc"='3.6%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "116_seats_needed_for_a_majority" (
"date_released" text,
"polling_institute" text,
"social_democratic" text,
"socialist" text,
"green_communist" text,
"people_s_party" text,
"left_bloc" text,
"lead" text
);
Question: What is the result for the Green-Communist party when the Left Bloc has 3.0%?
<|assistant|>
SELECT "green_communist" FROM "116_seats_needed_for_a_majority" WHERE "left_bloc"='3.0%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "116_seats_needed_for_a_majority" (
"date_released" text,
"polling_institute" text,
"social_democratic" text,
"socialist" text,
"green_communist" text,
"people_s_party" text,
"left_bloc" text,
"lead" text
);
Question: What is the result for the Socialist party when the People's Party has 6.8%?
<|assistant|>
SELECT "socialist" FROM "116_seats_needed_for_a_majority" WHERE "people_s_party"='6.8%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "116_seats_needed_for_a_majority" (
"date_released" text,
"polling_institute" text,
"social_democratic" text,
"socialist" text,
"green_communist" text,
"people_s_party" text,
"left_bloc" text,
"lead" text
);
Question: What is the date released when the Left Bloc had 3.2%?
<|assistant|>
SELECT "date_released" FROM "116_seats_needed_for_a_majority" WHERE "left_bloc"='3.2%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cardinal_electors" (
"elector" text,
"nationality" text,
"cardinalatial_order_and_title" text,
"elevated" text,
"elevator" text
);
Question: What is the cardinalatial order of the elector elevated circa 1116?
<|assistant|>
SELECT "cardinalatial_order_and_title" FROM "cardinal_electors" WHERE "elevated"='circa 1116';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cardinal_electors" (
"elector" text,
"nationality" text,
"cardinalatial_order_and_title" text,
"elevated" text,
"elevator" text
);
Question: When was the elector from pisa elevated?
<|assistant|>
SELECT "elevated" FROM "cardinal_electors" WHERE "nationality"='pisa';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cardinal_electors" (
"elector" text,
"nationality" text,
"cardinalatial_order_and_title" text,
"elevated" text,
"elevator" text
);
Question: What is the cardinalatial order and title of bosone?
<|assistant|>
SELECT "cardinalatial_order_and_title" FROM "cardinal_electors" WHERE "elector"='bosone';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cardinal_electors" (
"elector" text,
"nationality" text,
"cardinalatial_order_and_title" text,
"elevated" text,
"elevator" text
);
Question: Who is the elevator from crema?
<|assistant|>
SELECT "elevator" FROM "cardinal_electors" WHERE "nationality"='crema';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the name of the swimmer from Australia in lane 4 with a heat larger than 4?
<|assistant|>
SELECT "name" FROM "heats" WHERE "heat">4 AND "lane"=4 AND "nationality"='australia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the lowest heat number for a swimmer with a time of 2:34.94?
<|assistant|>
SELECT MIN("heat") FROM "heats" WHERE "time"='2:34.94';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_7" (
"rank" real,
"lane" real,
"athlete" text,
"nationality" text,
"time" real,
"react" real
);
Question: What is the rank of the player from Ukraine with react less than 0.26?
<|assistant|>
SELECT COUNT("rank") FROM "heat_7" WHERE "nationality"='ukraine' AND "react"<0.26;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schedule" (
"week" real,
"date" text,
"opponent" text,
"result" text,
"attendance" real
);
Question: What was the highest week with a w 21-17 result, and more than 45,254 in attendance?
<|assistant|>
SELECT MAX("week") FROM "schedule" WHERE "result"='w 21-17' AND "attendance">'45,254';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "germanic_origins" (
"proto_germanic" text,
"west_germanic" text,
"old_english" text,
"german" text,
"dutch" text
);
Question: What's the Proto-Germanic when the Old English is /d/?
<|assistant|>
SELECT "proto_germanic" FROM "germanic_origins" WHERE "old_english"='/d/';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "germanic_origins" (
"proto_germanic" text,
"west_germanic" text,
"old_english" text,
"german" text,
"dutch" text
);
Question: What's the Proto Germanic when then German is /s/ or /ts/?
<|assistant|>
SELECT "proto_germanic" FROM "germanic_origins" WHERE "german"='/s/ or /ts/';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "germanic_origins" (
"proto_germanic" text,
"west_germanic" text,
"old_english" text,
"german" text,
"dutch" text
);
Question: What's the Dutch when then Old English is /d/?
<|assistant|>
SELECT "dutch" FROM "germanic_origins" WHERE "old_english"='/d/';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "germanic_origins" (
"proto_germanic" text,
"west_germanic" text,
"old_english" text,
"german" text,
"dutch" text
);
Question: What's the West Germanic when the German is /s/ or /ts/?
<|assistant|>
SELECT "west_germanic" FROM "germanic_origins" WHERE "german"='/s/ or /ts/';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "germanic_origins" (
"proto_germanic" text,
"west_germanic" text,
"old_english" text,
"german" text,
"dutch" text
);
Question: What's the Proto-Germanic when the German is /t/?
<|assistant|>
SELECT "proto_germanic" FROM "germanic_origins" WHERE "german"='/t/';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
Question: What is the to par for japan
<|assistant|>
SELECT "to_par" FROM "final_round" WHERE "country"='japan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
Question: what player has $187,500 and score 66-75-71-69=281
<|assistant|>
SELECT "player" FROM "final_round" WHERE "money"='187,500' AND "score"='66-75-71-69=281';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
Question: what place has score 66-74-68-73=281
<|assistant|>
SELECT "place" FROM "final_round" WHERE "score"='66-74-68-73=281';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
Question: what player has place t10
<|assistant|>
SELECT "player" FROM "final_round" WHERE "place"='t10';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "final_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text,
"money" text
);
Question: what is the to par for $242,813 with score 68-72-74-66=280
<|assistant|>
SELECT "to_par" FROM "final_round" WHERE "money"='242,813' AND "score"='68-72-74-66=280';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"size" real,
"ihsaa_class" text,
"county" text
);
Question: Which School has a Size larger than 408, and a Mascot of pacers?
<|assistant|>
SELECT "school" FROM "indiana_high_school_athletics_conference" WHERE "size">408 AND "mascot"='pacers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"size" real,
"ihsaa_class" text,
"county" text
);
Question: Which Size has an IHSAA Class of aa, and a Location of milan?
<|assistant|>
SELECT SUM("size") FROM "indiana_high_school_athletics_conference" WHERE "ihsaa_class"='aa' AND "location"='milan';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"size" real,
"ihsaa_class" text,
"county" text
);
Question: Which County has a Mascot of pacers?
<|assistant|>
SELECT "county" FROM "indiana_high_school_athletics_conference" WHERE "mascot"='pacers';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "indiana_high_school_athletics_conference" (
"school" text,
"location" text,
"mascot" text,
"size" real,
"ihsaa_class" text,
"county" text
);
Question: Which Mascot has a County of 69 ripley, and an IHSAA Class of aa, and a School of south ripley?
<|assistant|>
SELECT "mascot" FROM "indiana_high_school_athletics_conference" WHERE "county"='69 ripley' AND "ihsaa_class"='aa' AND "school"='south ripley';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: Who was in Lane 5 and had a heat of 7?
<|assistant|>
SELECT "name" FROM "heats" WHERE "heat"=7 AND "lane"=5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What lane number was Hungary and had a heat of 4?
<|assistant|>
SELECT COUNT("lane") FROM "heats" WHERE "heat"=4 AND "nationality"='hungary';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_record_progression" (
"score" text,
"shooter" text,
"date" text,
"comp" text,
"place" text
);
Question: What's the date when the score was 690.3?
<|assistant|>
SELECT "date" FROM "world_record_progression" WHERE "score"='690.3';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_record_progression" (
"score" text,
"shooter" text,
"date" text,
"comp" text,
"place" text
);
Question: What's the place of 1989 with a comp of ECH?
<|assistant|>
SELECT "place" FROM "world_record_progression" WHERE "comp"='ech' AND "date"='1989';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "world_record_progression" (
"score" text,
"shooter" text,
"date" text,
"comp" text,
"place" text
);
Question: Who was the shooter with a score of 686.4?
<|assistant|>
SELECT "shooter" FROM "world_record_progression" WHERE "score"='686.4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "games_tm" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: what is the year for borderlands 2?
<|assistant|>
SELECT "year" FROM "games_tm" WHERE "game"='borderlands 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "games_tm" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: what is the year for the game dead space 2?
<|assistant|>
SELECT "year" FROM "games_tm" WHERE "game"='dead space 2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "games_tm" (
"year" real,
"game" text,
"genre" text,
"platform_s" text,
"developer_s" text
);
Question: who is the developers for demon's souls?
<|assistant|>
SELECT "developer_s" FROM "games_tm" WHERE "game"='demon''s souls';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "arcade_awards_electronic_gaming_awards" (
"year" text,
"arcade" text,
"standalone" text,
"console" text,
"computer" text
);
Question: In what year is Zaxxon the Standalone?
<|assistant|>
SELECT "year" FROM "arcade_awards_electronic_gaming_awards" WHERE "standalone"='zaxxon';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "arcade_awards_electronic_gaming_awards" (
"year" text,
"arcade" text,
"standalone" text,
"console" text,
"computer" text
);
Question: What is the Standalone in the year when Space Invaders is the Console?
<|assistant|>
SELECT "standalone" FROM "arcade_awards_electronic_gaming_awards" WHERE "console"='space invaders';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "arcade_awards_electronic_gaming_awards" (
"year" text,
"arcade" text,
"standalone" text,
"console" text,
"computer" text
);
Question: What is the Standalone when Tron is the Arcade?
<|assistant|>
SELECT "standalone" FROM "arcade_awards_electronic_gaming_awards" WHERE "arcade"='tron';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "arcade_awards_electronic_gaming_awards" (
"year" text,
"arcade" text,
"standalone" text,
"console" text,
"computer" text
);
Question: What is the Console when Space Invaders is the Arcade?
<|assistant|>
SELECT "console" FROM "arcade_awards_electronic_gaming_awards" WHERE "arcade"='space invaders';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "supplemental_first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"school" text
);
Question: What position does the player from the Arizona Diamondbacks play?
<|assistant|>
SELECT "position" FROM "supplemental_first_round_selections" WHERE "team"='arizona diamondbacks';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "supplemental_first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"school" text
);
Question: What school did P Jay Gehrke of the Kansas City Royals attend?
<|assistant|>
SELECT "school" FROM "supplemental_first_round_selections" WHERE "position"='p' AND "team"='kansas city royals' AND "player"='jay gehrke';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heat_1" (
"rank" real,
"athletes" text,
"country" text,
"time" text,
"notes" text
);
Question: What country does Adam van Koeverden play for?
<|assistant|>
SELECT "country" FROM "heat_1" WHERE "athletes"='adam van koeverden';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"school" text
);
Question: what is the pick when the school is jasper hs (jasper, texas)?
<|assistant|>
SELECT "pick" FROM "first_round_selections" WHERE "school"='jasper hs (jasper, texas)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"school" text
);
Question: who is the player when the position is p and the team is oakland athletics?
<|assistant|>
SELECT "player" FROM "first_round_selections" WHERE "position"='p' AND "team"='oakland athletics';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"school" text
);
Question: what is the school when the team is new york yankees?
<|assistant|>
SELECT "school" FROM "first_round_selections" WHERE "team"='new york yankees';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "first_round_selections" (
"pick" real,
"player" text,
"team" text,
"position" text,
"school" text
);
Question: who is the player when the school is spring hs (spring, texas)?
<|assistant|>
SELECT "player" FROM "first_round_selections" WHERE "school"='spring hs (spring, texas)';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tests_conducted_by_aqsiq" (
"producer" text,
"product" text,
"samples_taken" real,
"samples_failed" real,
"melamine_content_mg_kg" real
);
Question: What's the melamine content of 英雄牌嬰幼兒配方乳粉 having more than 1 samples failed?
<|assistant|>
SELECT "melamine_content_mg_kg" FROM "tests_conducted_by_aqsiq" WHERE "samples_failed">1 AND "product"='英雄牌嬰幼兒配方乳粉';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tests_conducted_by_aqsiq" (
"producer" text,
"product" text,
"samples_taken" real,
"samples_failed" real,
"melamine_content_mg_kg" real
);
Question: What's the most melamine content that has more than 1 samples failed and produced by Guangzhou Jinding Dairy Products Factory?
<|assistant|>
SELECT MAX("melamine_content_mg_kg") FROM "tests_conducted_by_aqsiq" WHERE "producer"='guangzhou jinding dairy products factory' AND "samples_failed">1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tests_conducted_by_aqsiq" (
"producer" text,
"product" text,
"samples_taken" real,
"samples_failed" real,
"melamine_content_mg_kg" real
);
Question: What's the product that has less than 98.6 melamine content, more than 1 sample failed and took less than 3 samples?
<|assistant|>
SELECT "product" FROM "tests_conducted_by_aqsiq" WHERE "melamine_content_mg_kg"<98.6 AND "samples_failed">1 AND "samples_taken"<3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tests_conducted_by_aqsiq" (
"producer" text,
"product" text,
"samples_taken" real,
"samples_failed" real,
"melamine_content_mg_kg" real
);
Question: What the most samples failed for 可淇牌嬰幼兒配方乳粉 and had less than 1 samples taken?
<|assistant|>
SELECT MAX("samples_failed") FROM "tests_conducted_by_aqsiq" WHERE "product"='可淇牌嬰幼兒配方乳粉' AND "samples_taken"<1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "tests_conducted_by_aqsiq" (
"producer" text,
"product" text,
"samples_taken" real,
"samples_failed" real,
"melamine_content_mg_kg" real
);
Question: How many samples taken from producer Qingdao Suncare Nutritional Technology with a melamine content less than 53.4?
<|assistant|>
SELECT SUM("samples_taken") FROM "tests_conducted_by_aqsiq" WHERE "melamine_content_mg_kg"<53.4 AND "producer"='qingdao suncare nutritional technology';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "third_round" (
"place" text,
"player" text,
"country" text,
"score" text,
"to_par" text
);
Question: What did the golfer from Australia score?
<|assistant|>
SELECT "score" FROM "third_round" WHERE "country"='australia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "europe_usage_share_data_from_at_internet" (
"date" text,
"internet_explorer" text,
"firefox" text,
"opera" text,
"safari" text,
"source" text
);
Question: Which date has an Opera usage percentage of 5.1% and Internet Explorer usage of 59.5%?
<|assistant|>
SELECT "date" FROM "europe_usage_share_data_from_at_internet" WHERE "opera"='5.1%' AND "internet_explorer"='59.5%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "europe_usage_share_data_from_at_internet" (
"date" text,
"internet_explorer" text,
"firefox" text,
"opera" text,
"safari" text,
"source" text
);
Question: Which source has a date of June 2008?
<|assistant|>
SELECT "source" FROM "europe_usage_share_data_from_at_internet" WHERE "date"='june 2008';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "europe_usage_share_data_from_at_internet" (
"date" text,
"internet_explorer" text,
"firefox" text,
"opera" text,
"safari" text,
"source" text
);
Question: Which source date has an Internet Explorer usage of 60.2%?
<|assistant|>
SELECT "source" FROM "europe_usage_share_data_from_at_internet" WHERE "internet_explorer"='60.2%';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_or_demolished_stadiums" (
"stadium" text,
"capacity" real,
"city" text,
"country" text,
"home_team_s" text,
"closed_as_a_rl_stadium" real
);
Question: What city has the home team of the brisbane broncos?
<|assistant|>
SELECT "city" FROM "former_or_demolished_stadiums" WHERE "home_team_s"='brisbane broncos';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "former_or_demolished_stadiums" (
"stadium" text,
"capacity" real,
"city" text,
"country" text,
"home_team_s" text,
"closed_as_a_rl_stadium" real
);
Question: What is the earliest closed year in the country of france?
<|assistant|>
SELECT MIN("closed_as_a_rl_stadium") FROM "former_or_demolished_stadiums" WHERE "country"='france';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: What is the result for the event that lasted 2:20?
<|assistant|>
SELECT "res" FROM "mixed_martial_arts_record" WHERE "time"='2:20';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: Who was the fight against when loss was the result at the Gladiator Challenge 87: Collision Course event?
<|assistant|>
SELECT "opponent" FROM "mixed_martial_arts_record" WHERE "res"='loss' AND "event"='gladiator challenge 87: collision course';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "mixed_martial_arts_record" (
"res" text,
"record" text,
"opponent" text,
"method" text,
"event" text,
"round" real,
"time" text,
"location" text
);
Question: For the Cage Combat Fighting Championships: Mayhem, what was the record?
<|assistant|>
SELECT "record" FROM "mixed_martial_arts_record" WHERE "event"='cage combat fighting championships: mayhem';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "volleyball_at_the_2008_summer_olympics_m" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2008_club" text
);
Question: What is the Name of the Gabeca Montichiari Club?
<|assistant|>
SELECT "name" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='gabeca montichiari';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "volleyball_at_the_2008_summer_olympics_m" (
"name" text,
"height" text,
"weight" text,
"spike" text,
"2008_club" text
);
Question: What is the Height of the Player from the 2008 Club of RPA Perugia?
<|assistant|>
SELECT "height" FROM "volleyball_at_the_2008_summer_olympics_m" WHERE "2008_club"='rpa perugia';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_1" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
Question: Who was the designer for The Grapefruit Moon?
<|assistant|>
SELECT "designer" FROM "season_1" WHERE "restaurant_name"='the grapefruit moon';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_1" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
Question: Who is the chef at Lakes Bar and Grill?
<|assistant|>
SELECT "chef" FROM "season_1" WHERE "restaurant_name"='lakes bar and grill';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_1" (
"restaurant_name" text,
"original_name" text,
"location" text,
"chef" text,
"designer" text,
"still_open" text
);
Question: What is the name of the Cobourg, ON restaurant that had Robin de Groot as designer?
<|assistant|>
SELECT "restaurant_name" FROM "season_1" WHERE "designer"='robin de groot' AND "location"='cobourg, on';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "season_by_season" (
"season" text,
"tier" real,
"league" text,
"pos" real,
"turkish_cup" text,
"european_competitions" text
);
Question: What European competitions have a tier of 2 and a position of 3?
<|assistant|>
SELECT "european_competitions" FROM "season_by_season" WHERE "tier"=2 AND "pos"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "all_time_medal_table_women_s_1984_2012" (
"rank" text,
"nation" text,
"gold" real,
"silver" real,
"bronze" real,
"total" real
);
Question: Which Nation won 5 Silver, and more than 4 Gold?
<|assistant|>
SELECT "nation" FROM "all_time_medal_table_women_s_1984_2012" WHERE "silver"=5 AND "gold">4;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: What is the sum of heat for christophe lebon when lane is less than 4?
<|assistant|>
SELECT COUNT("heat") FROM "heats" WHERE "lane"<4 AND "name"='christophe lebon';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: Who is from the united states, has a rank less than 9, and heat more than 5?
<|assistant|>
SELECT "name" FROM "heats" WHERE "rank"<9 AND "heat">5 AND "nationality"='united states';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: Serbia has a heat less than 2 and what sum of rank?
<|assistant|>
SELECT COUNT("rank") FROM "heats" WHERE "nationality"='serbia' AND "heat"<2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "heats" (
"rank" real,
"heat" real,
"lane" real,
"name" text,
"nationality" text,
"time" text
);
Question: When rank is 33, what is the smallest lane?
<|assistant|>
SELECT MIN("lane") FROM "heats" WHERE "rank"=33;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s_390_computers" (
"model" text,
"year_introduced" real,
"number_of_cp_us" text,
"performance_mips" text,
"memory_gb" text
);
Question: Which Model has a Number of CPUs of 1–10, and a Performance (MIPS) of 49–447?
<|assistant|>
SELECT "model" FROM "s_390_computers" WHERE "number_of_cp_us"='1–10' AND "performance_mips"='49–447';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s_390_computers" (
"model" text,
"year_introduced" real,
"number_of_cp_us" text,
"performance_mips" text,
"memory_gb" text
);
Question: Which Year Introduced has a Memory (GB) of 0.125–2?
<|assistant|>
SELECT MAX("year_introduced") FROM "s_390_computers" WHERE "memory_gb"='0.125–2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s_390_computers" (
"model" text,
"year_introduced" real,
"number_of_cp_us" text,
"performance_mips" text,
"memory_gb" text
);
Question: Which Number of CPUs has a Memory (GB) of 0.5–16?
<|assistant|>
SELECT "number_of_cp_us" FROM "s_390_computers" WHERE "memory_gb"='0.5–16';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "s_390_computers" (
"model" text,
"year_introduced" real,
"number_of_cp_us" text,
"performance_mips" text,
"memory_gb" text
);
Question: Which Memory (GB) has a Number of CPUs of 1–6?
<|assistant|>
SELECT "memory_gb" FROM "s_390_computers" WHERE "number_of_cp_us"='1–6';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "see_also" (
"manufacturer" text,
"model" text,
"transmission" text,
"engine_capacity" text,
"fuel_type" text,
"l_100km_urban_cold" real,
"l_100km_extra_urban" real,
"l_100km_combined" real,
"mpg_uk_urban_cold" real,
"mpg_uk_extra_urban" real,
"mpg_uk_combined" real,
"mpg_us_urban" real,
"mpg_us_extra_urban" real,
"mpg_us_combined" real,
"co_2_g_km" real,
"green_rating" text
);
Question: Which Fuel Type that has a mpg-US Extra-Urban larger than 53.5, and a mpg-US Combined larger than 50 from renault?
<|assistant|>
SELECT "fuel_type" FROM "see_also" WHERE "mpg_us_extra_urban">53.5 AND "mpg_us_combined">50 AND "manufacturer"='renault';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_a_b_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the Country of the Rowers with a Rank larger than 4 and Time of 5:59.56?
<|assistant|>
SELECT "country" FROM "semifinal_a_b_1" WHERE "rank">4 AND "time"='5:59.56';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_a_b_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the Time of the Belarus Player with a Rank larger than 2 and Notes of FB?
<|assistant|>
SELECT "time" FROM "semifinal_a_b_1" WHERE "rank">2 AND "notes"='fb' AND "country"='belarus';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_a_b_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: What is the Time of the Player with a Rank of 1 or 2 and Notes of FA?
<|assistant|>
SELECT "time" FROM "semifinal_a_b_1" WHERE "notes"='fa' AND "rank"<2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_a_b_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: Who are the Rowers from Poland?
<|assistant|>
SELECT "rowers" FROM "semifinal_a_b_1" WHERE "country"='poland';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "semifinal_a_b_1" (
"rank" real,
"rowers" text,
"country" text,
"time" text,
"notes" text
);
Question: Who are the Rowers with a Time of 5:56.38?
<|assistant|>
SELECT "rowers" FROM "semifinal_a_b_1" WHERE "time"='5:56.38';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1954" (
"title" text,
"series" text,
"director" text,
"production_number" real,
"release_date" text,
"reissue" text
);
Question: What's the release date for Claws For Alarm who has a director of Charles M. Jones, no reissue, and a production number less than 1323?
<|assistant|>
SELECT "release_date" FROM "1954" WHERE "production_number"<1323 AND "reissue"='no' AND "director"='charles m. jones' AND "title"='claws for alarm';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1954" (
"title" text,
"series" text,
"director" text,
"production_number" real,
"release_date" text,
"reissue" text
);
Question: What's the title of the film with the release date of 1954-12-18?
<|assistant|>
SELECT "title" FROM "1954" WHERE "release_date"='1954-12-18';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1954" (
"title" text,
"series" text,
"director" text,
"production_number" real,
"release_date" text,
"reissue" text
);
Question: Was there a reissue with a release date of 1954-09-04 having a production number more than 1289 and a director of Robert McKimson?
<|assistant|>
SELECT "reissue" FROM "1954" WHERE "director"='robert mckimson' AND "production_number">1289 AND "release_date"='1954-09-04';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "1954" (
"title" text,
"series" text,
"director" text,
"production_number" real,
"release_date" text,
"reissue" text
);
Question: What is the production number for Bell Hoppy in the MM Series?
<|assistant|>
SELECT COUNT("production_number") FROM "1954" WHERE "series"='mm' AND "title"='bell hoppy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "torneo_clausura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
Question: How much Scored has Losses smaller than 0?
<|assistant|>
SELECT SUM("scored") FROM "torneo_clausura" WHERE "losses"<0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "torneo_clausura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
Question: Which Wins have Losses smaller than 6, and a Position of 4, and Played larger than 9?
<|assistant|>
SELECT MIN("wins") FROM "torneo_clausura" WHERE "losses"<6 AND "position"=4 AND "played">9;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "torneo_clausura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
Question: How much Conceded has Wins smaller than 3, and Points larger than 11?
<|assistant|>
SELECT COUNT("conceded") FROM "torneo_clausura" WHERE "wins"<3 AND "points">11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "torneo_clausura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
Question: Which Draws has Points smaller than 15, and a Conceded larger than 10, and a Position larger than 8, and Wins of 1?
<|assistant|>
SELECT MIN("draws") FROM "torneo_clausura" WHERE "points"<15 AND "conceded">10 AND "position">8 AND "wins"=1;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "torneo_clausura" (
"position" real,
"team" text,
"played" real,
"wins" real,
"draws" real,
"losses" real,
"scored" real,
"conceded" real,
"points" real
);
Question: How many losses have 11 points?
<|assistant|>
SELECT COUNT("losses") FROM "torneo_clausura" WHERE "points"=11;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "song_list" (
"number" real,
"song_title" text,
"lyricist" text,
"singer_s" text,
"length" text
);
Question: What is the song title sung by Sonu Nigam with lyricists of Dev Kohli/Biddu, and number over 8?
<|assistant|>
SELECT "song_title" FROM "song_list" WHERE "singer_s"='sonu nigam' AND "lyricist"='dev kohli/biddu' AND "number">8;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "song_list" (
"number" real,
"song_title" text,
"lyricist" text,
"singer_s" text,
"length" text
);
Question: Who was the singer for the song numbered 3, with lyricist Dev Kohli?
<|assistant|>
SELECT "singer_s" FROM "song_list" WHERE "lyricist"='dev kohli' AND "number"=3;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "song_list" (
"number" real,
"song_title" text,
"lyricist" text,
"singer_s" text,
"length" text
);
Question: What is the average number for the song "O Sudha"?
<|assistant|>
SELECT AVG("number") FROM "song_list" WHERE "song_title"='o sudha';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "song_list" (
"number" real,
"song_title" text,
"lyricist" text,
"singer_s" text,
"length" text
);
Question: What is the average length for the song "Ma Ke Jaisi"?
<|assistant|>
SELECT "length" FROM "song_list" WHERE "song_title"='ma ke jaisi';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" real,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
Question: Who had fa cup goals of 0, league cup goals less than 2, and total goals of 2?
<|assistant|>
SELECT "name" FROM "appearances_and_goals" WHERE "fa_cup_goals"=0 AND "league_cup_goals"<2 AND "total_goals"=2;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "appearances_and_goals" (
"name" text,
"position" text,
"league_apps" text,
"league_goals" real,
"fa_cup_apps" real,
"fa_cup_goals" real,
"league_cup_apps" text,
"league_cup_goals" real,
"total_apps" text,
"total_goals" real
);
Question: what is the fa cup goals when total apps is 10 (4)?
<|assistant|>
SELECT SUM("fa_cup_goals") FROM "appearances_and_goals" WHERE "total_apps"='10 (4)';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.