text
stringlengths 310
1.28k
|
|---|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_14098_1" (
"country_or_territory_with_flag" text,
"area_km_per_sqmi" text,
"population_july_2009_est" real,
"population_density_per_km" text,
"capital" text
);
Question: What country'c capital is santiago?
<|assistant|>
SELECT "country_or_territory_with_flag" FROM "table1_14098_1" WHERE "capital"='Santiago';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cast" (
"character_name" text,
"voice_actor_japanese" text,
"voice_actor_english_1997_saban" text,
"voice_actor_english_1998_pioneer" text,
"voice_actor_english_2006_fu_nimation" text
);
Question: who is the the voice actor (englbeingh 1998 / pioneer) with voice actor (englbeingh 1997 / saban) being alec willows and voice actor (englbeingh 2006 / funimation) being andy mcavin
<|assistant|>
SELECT "voice_actor_english_1998_pioneer" FROM "cast" WHERE "voice_actor_english_1997_saban"='Alec Willows' AND "voice_actor_english_2006_fu_nimation"='Andy McAvin';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cast" (
"character_name" text,
"voice_actor_japanese" text,
"voice_actor_english_1997_saban" text,
"voice_actor_english_1998_pioneer" text,
"voice_actor_english_2006_fu_nimation" text
);
Question: what's the character name with voice actor (englbeingh 1997 / saban) being ian james corlett
<|assistant|>
SELECT "character_name" FROM "cast" WHERE "voice_actor_english_1997_saban"='Ian James Corlett';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cast" (
"character_name" text,
"voice_actor_japanese" text,
"voice_actor_english_1997_saban" text,
"voice_actor_english_1998_pioneer" text,
"voice_actor_english_2006_fu_nimation" text
);
Question: what's the character name with voice actor (englbeingh 1998 / pioneer) being paul dobson
<|assistant|>
SELECT "character_name" FROM "cast" WHERE "voice_actor_english_1998_pioneer"='Paul Dobson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cast" (
"character_name" text,
"voice_actor_japanese" text,
"voice_actor_english_1997_saban" text,
"voice_actor_english_1998_pioneer" text,
"voice_actor_english_2006_fu_nimation" text
);
Question: how many voice actor (englbeingh 1998 / pioneer) with voice actor (japanese) being shinobu satouchi
<|assistant|>
SELECT COUNT("voice_actor_english_1998_pioneer") FROM "cast" WHERE "voice_actor_japanese"='Shinobu Satouchi';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "cast" (
"character_name" text,
"voice_actor_japanese" text,
"voice_actor_english_1997_saban" text,
"voice_actor_english_1998_pioneer" text,
"voice_actor_english_2006_fu_nimation" text
);
Question: who is the the voice actor (japanese) with character name being goku
<|assistant|>
SELECT "voice_actor_japanese" FROM "cast" WHERE "character_name"='Goku';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "college_sports" (
"school" text,
"mascot" text,
"conference" text,
"national_titles" real,
"founded" real
);
Question: how many big wins does peru state college have
<|assistant|>
SELECT COUNT("national_titles") FROM "college_sports" WHERE "school"='Peru State College';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "college_sports" (
"school" text,
"mascot" text,
"conference" text,
"national_titles" real,
"founded" real
);
Question: which school has 14 large championships
<|assistant|>
SELECT "school" FROM "college_sports" WHERE "national_titles"=14;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "college_sports" (
"school" text,
"mascot" text,
"conference" text,
"national_titles" real,
"founded" real
);
Question: how many overall championships does concordia university have
<|assistant|>
SELECT MIN("national_titles") FROM "college_sports" WHERE "school"='Concordia University';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
Question: what's the duration with mission being sts-87
<|assistant|>
SELECT "duration" FROM "use" WHERE "mission"='STS-87';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
Question: what's the edo flight with duration being 17 days, 15 hours, 53 minutes, 18 seconds
<|assistant|>
SELECT "edo_flight" FROM "use" WHERE "duration"='17 days, 15 hours, 53 minutes, 18 seconds';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
Question: what's the primary payload(s) with launch date being july 8, 1994
<|assistant|>
SELECT "primary_payload_s" FROM "use" WHERE "launch_date"='July 8, 1994';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
Question: what's the mission with primary payload(s) being spacelab life sciences-2
<|assistant|>
SELECT "mission" FROM "use" WHERE "primary_payload_s"='Spacelab Life Sciences-2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
Question: what's the shuttle with primary payload(s) being united states microgravity laboratory-1
<|assistant|>
SELECT "shuttle" FROM "use" WHERE "primary_payload_s"='United States Microgravity Laboratory-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "use" (
"edo_flight" real,
"shuttle" text,
"mission" text,
"launch_date" text,
"duration" text,
"primary_payload_s" text
);
Question: how many primary payload(s) with shuttle being columbia and duration being 13 days, 19 hours, 30 minutes, 4 seconds
<|assistant|>
SELECT COUNT("primary_payload_s") FROM "use" WHERE "shuttle"='Columbia' AND "duration"='13 days, 19 hours, 30 minutes, 4 seconds';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
Question: what's the pts with team being kopron team scot
<|assistant|>
SELECT "pts" FROM "by_seasons_and_teams" WHERE "team"='Kopron Team Scot';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
Question: what's the pts with position being nc
<|assistant|>
SELECT "pts" FROM "by_seasons_and_teams" WHERE "position"='NC';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
Question: what's the pts with poles being smaller than 1.0 and motorcycle being aprilia and class being 250cc
<|assistant|>
SELECT "pts" FROM "by_seasons_and_teams" WHERE "poles"<1.0 AND "motorcycle"='Aprilia' AND "class"='250cc';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
Question: what's the poles with pts being 81
<|assistant|>
SELECT "poles" FROM "by_seasons_and_teams" WHERE "pts"='81';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
Question: how many class with poles being bigger than 1.0
<|assistant|>
SELECT COUNT("class") FROM "by_seasons_and_teams" WHERE "poles">1.0;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "by_seasons_and_teams" (
"season" real,
"class" text,
"team" text,
"motorcycle" text,
"type" text,
"races" real,
"wins" real,
"podiums" real,
"poles" real,
"fastest_laps" real,
"pts" text,
"position" text
);
Question: what's the position with team being skilled racing team
<|assistant|>
SELECT "position" FROM "by_seasons_and_teams" WHERE "team"='Skilled Racing Team';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
Question: Who was the defensive award winner in February when the rookie award was given to Rhys Duch?
<|assistant|>
SELECT "defensive" FROM "weekly_awards" WHERE "month"='February' AND "rookie"='Rhys Duch';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
Question: Who was the offensive award winner the week when Bob Watson was given the overall award?
<|assistant|>
SELECT "offensive" FROM "weekly_awards" WHERE "overall"='Bob Watson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
Question: Who was the defensive award winner when the rookie award was given to Daryl Veltman and the offensive award was given to Mark Steenhuis?
<|assistant|>
SELECT "defensive" FROM "weekly_awards" WHERE "rookie"='Daryl Veltman' AND "offensive"='Mark Steenhuis';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "weekly_awards" (
"month" text,
"week" real,
"overall" text,
"offensive" text,
"defensive" text,
"transition" text,
"rookie" text
);
Question: Who won the rookie award the week the transition award was given to Brodie Merrill and the offensive award was given to Pat Maddalena?
<|assistant|>
SELECT "rookie" FROM "weekly_awards" WHERE "transition"='Brodie Merrill' AND "offensive"='Pat Maddalena';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "high_schools_grades_9_12" (
"high_school" text,
"type" text,
"established" real,
"enrollment" real,
"mascot" text,
"wiaa_classification" text,
"notes" text
);
Question: What is the lowest enrollment value out of the enrollment values I'd the schools with a 3A WIAA clarification?
<|assistant|>
SELECT MIN("enrollment") FROM "high_schools_grades_9_12" WHERE "wiaa_classification"='3A';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "high_schools_grades_9_12" (
"high_school" text,
"type" text,
"established" real,
"enrollment" real,
"mascot" text,
"wiaa_classification" text,
"notes" text
);
Question: What is the WIAA classification of Oakland Alternative High School?
<|assistant|>
SELECT "wiaa_classification" FROM "high_schools_grades_9_12" WHERE "high_school"='Oakland Alternative';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "high_schools_grades_9_12" (
"high_school" text,
"type" text,
"established" real,
"enrollment" real,
"mascot" text,
"wiaa_classification" text,
"notes" text
);
Question: When was Mount Tahoma established?
<|assistant|>
SELECT MAX("established") FROM "high_schools_grades_9_12" WHERE "high_school"='Mount Tahoma';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "high_schools_grades_9_12" (
"high_school" text,
"type" text,
"established" real,
"enrollment" real,
"mascot" text,
"wiaa_classification" text,
"notes" text
);
Question: What's the note about the school established in the year of 1973?
<|assistant|>
SELECT "notes" FROM "high_schools_grades_9_12" WHERE "established"=1973;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "supervisors" (
"year" real,
"1st_district" text,
"2nd_district" text,
"3rd_district" text,
"4th_district" text,
"5th_district" text
);
Question: Who was in the 4th district in 1924?
<|assistant|>
SELECT "4th_district" FROM "supervisors" WHERE "year"=1924;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "supervisors" (
"year" real,
"1st_district" text,
"2nd_district" text,
"3rd_district" text,
"4th_district" text,
"5th_district" text
);
Question: List all the years with Cecil M. Featherly in the 1st district and David L. Baker in the 2nd district?
<|assistant|>
SELECT "year" FROM "supervisors" WHERE "2nd_district"='David L. Baker' AND "1st_district"='Cecil M. Featherly';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "supervisors" (
"year" real,
"1st_district" text,
"2nd_district" text,
"3rd_district" text,
"4th_district" text,
"5th_district" text
);
Question: What is the last year that Howard A. Wassum was in the 5th district?
<|assistant|>
SELECT MAX("year") FROM "supervisors" WHERE "5th_district"='Howard A. Wassum';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schools" (
"school_name" text,
"city" text,
"students" real,
"fte_teachers" text,
"pupil_teacher_ratio" text,
"school_level" text,
"low_grade" text,
"high_grade" text
);
Question: List all FTE middle school teachers in Sunnyvale.
<|assistant|>
SELECT "fte_teachers" FROM "schools" WHERE "school_level"='Middle' AND "city"='Sunnyvale';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schools" (
"school_name" text,
"city" text,
"students" real,
"fte_teachers" text,
"pupil_teacher_ratio" text,
"school_level" text,
"low_grade" text,
"high_grade" text
);
Question: What is the highest number of students with a teacher:student ratio of 20.8?
<|assistant|>
SELECT MAX("students") FROM "schools" WHERE "pupil_teacher_ratio"='20.8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "schools" (
"school_name" text,
"city" text,
"students" real,
"fte_teachers" text,
"pupil_teacher_ratio" text,
"school_level" text,
"low_grade" text,
"high_grade" text
);
Question: How many FTE teachers are there when the student:teacher ration is 19?
<|assistant|>
SELECT "fte_teachers" FROM "schools" WHERE "pupil_teacher_ratio"='19';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_14158567_1" (
"member_elect" text,
"party" text,
"district" text,
"election_date" text,
"congress" text,
"reason_for_non_seating" text
);
Question: What edition of congress for member-elect richard p. giles?
<|assistant|>
SELECT "congress" FROM "table1_14158567_1" WHERE "member_elect"='Richard P. Giles';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1416612_1" (
"state" text,
"highest_point" text,
"highest_elevation" text,
"lowest_point" text,
"lowest_elevation" text,
"mean_elevation" text
);
Question: how many mean elevation with lowest point being gulf of mexico and state being texas
<|assistant|>
SELECT COUNT("mean_elevation") FROM "table1_1416612_1" WHERE "lowest_point"='Gulf of Mexico' AND "state"='Texas';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1416612_1" (
"state" text,
"highest_point" text,
"highest_elevation" text,
"lowest_point" text,
"lowest_elevation" text,
"mean_elevation" text
);
Question: what's the highest point with lowest point being belle fourche river at south dakota border
<|assistant|>
SELECT "highest_point" FROM "table1_1416612_1" WHERE "lowest_point"='Belle Fourche River at South Dakota border';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1416612_1" (
"state" text,
"highest_point" text,
"highest_elevation" text,
"lowest_point" text,
"lowest_elevation" text,
"mean_elevation" text
);
Question: what's the lowest elevation with highest point being charles mound
<|assistant|>
SELECT "lowest_elevation" FROM "table1_1416612_1" WHERE "highest_point"='Charles Mound';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1416612_1" (
"state" text,
"highest_point" text,
"highest_elevation" text,
"lowest_point" text,
"lowest_elevation" text,
"mean_elevation" text
);
Question: what's the lowest point with highest point being mount greylock
<|assistant|>
SELECT "lowest_point" FROM "table1_1416612_1" WHERE "highest_point"='Mount Greylock';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1416612_1" (
"state" text,
"highest_point" text,
"highest_elevation" text,
"lowest_point" text,
"lowest_elevation" text,
"mean_elevation" text
);
Question: what's the state with highest point being mount katahdin
<|assistant|>
SELECT "state" FROM "table1_1416612_1" WHERE "highest_point"='Mount Katahdin';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_version" (
"song_title" text,
"artist" text,
"language" text,
"decade" text,
"genre" text,
"exportable" text,
"family_friendly" text
);
Question: What language for the glam genre?
<|assistant|>
SELECT "language" FROM "european_version" WHERE "genre"='Glam';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_version" (
"song_title" text,
"artist" text,
"language" text,
"decade" text,
"genre" text,
"exportable" text,
"family_friendly" text
);
Question: What game allow the 1980s to be exportable?
<|assistant|>
SELECT "exportable" FROM "european_version" WHERE "decade"='1980s';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "european_version" (
"song_title" text,
"artist" text,
"language" text,
"decade" text,
"genre" text,
"exportable" text,
"family_friendly" text
);
Question: How many family friendly games are in the 1990s?
<|assistant|>
SELECT COUNT("family_friendly") FROM "european_version" WHERE "decade"='1990s';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
Question: When 0-1 is the aggregate what are the home (1st leg)?
<|assistant|>
SELECT "home_1st_leg" FROM "losers_knockout" WHERE "aggregate"='0-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
Question: When 2-0 is the 1st leg what are the home (2nd leg)?
<|assistant|>
SELECT "home_2nd_leg" FROM "losers_knockout" WHERE "1st_leg"='2-0';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
Question: When belgrano is the home (1st leg) what is the home (2nd leg)?
<|assistant|>
SELECT "home_2nd_leg" FROM "losers_knockout" WHERE "home_1st_leg"='Belgrano';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
Question: When platense is the home (2nd leg) what is the 2nd leg?
<|assistant|>
SELECT "2nd_leg" FROM "losers_knockout" WHERE "home_2nd_leg"='Platense';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
Question: When altos hornos zapla is the home (1st leg) what is overall amount of 1st leg?
<|assistant|>
SELECT COUNT("1st_leg") FROM "losers_knockout" WHERE "home_1st_leg"='Altos Hornos Zapla';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "losers_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
Question: When temperley is the home (2nd leg) what is the home (1st leg)?
<|assistant|>
SELECT "home_1st_leg" FROM "losers_knockout" WHERE "home_2nd_leg"='Temperley';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
Question: How many 2nd legs had an aggregate of 2-4?
<|assistant|>
SELECT COUNT("2nd_leg") FROM "winners_knockout" WHERE "aggregate"='2-4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
Question: How many home (2nd leg) had a 1st leg 1-1?
<|assistant|>
SELECT COUNT("home_2nd_leg") FROM "winners_knockout" WHERE "1st_leg"='1-1';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
Question: How many 2nd legs are there where home (1st leg) is Independiente?
<|assistant|>
SELECT "2nd_leg" FROM "winners_knockout" WHERE "home_1st_leg"='Independiente';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
Question: Who was in home (2nd leg) when Talleres was in home (1st leg)
<|assistant|>
SELECT "home_2nd_leg" FROM "winners_knockout" WHERE "home_1st_leg"='Talleres';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "winners_knockout" (
"home_1st_leg" text,
"home_2nd_leg" text,
"1st_leg" text,
"2nd_leg" text,
"aggregate" text
);
Question: Who was in 2nd leg when Boca Juniors was in home (1st leg)?
<|assistant|>
SELECT "2nd_leg" FROM "winners_knockout" WHERE "home_1st_leg"='Boca Juniors';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
Question: Name the 1968 bbc for 1957 bbc anneke wills
<|assistant|>
SELECT "1968_bbc" FROM "2000_version" WHERE "1957_bbc"='Anneke Wills';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
Question: Name the 2000 carlton television for 1951 bbc john stuart
<|assistant|>
SELECT "2000_carlton_television" FROM "2000_version" WHERE "1951_bbc"='John Stuart';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
Question: Name the cast for 1957 bcc for jean anderson
<|assistant|>
SELECT "cast" FROM "2000_version" WHERE "1957_bbc"='Jean Anderson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
Question: Name the 1970 film when 1951 bbc is michael croudson
<|assistant|>
SELECT "1970_film" FROM "2000_version" WHERE "1951_bbc"='Michael Croudson';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
Question: Name the cast for 1951 bbc being carole lorimer
<|assistant|>
SELECT "cast" FROM "2000_version" WHERE "1951_bbc"='Carole Lorimer';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "2000_version" (
"cast" text,
"1951_bbc" text,
"1957_bbc" text,
"1968_bbc" text,
"1970_film" text,
"2000_carlton_television" text
);
Question: Name the 1970 film for when 1968 being neil mcdermott
<|assistant|>
SELECT "1970_film" FROM "2000_version" WHERE "1968_bbc"='Neil McDermott';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "year_by_year" (
"year" real,
"division" real,
"league" text,
"regular_season" text,
"playoffs" text,
"open_cup" text,
"avg_attendance" real
);
Question: Name the playoffs for 2nd round open cup
<|assistant|>
SELECT "playoffs" FROM "year_by_year" WHERE "open_cup"='2nd Round';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "year_by_year" (
"year" real,
"league" text,
"reg_season" text,
"playoffs" text,
"us_open_cup" text,
"avg_attendance" real
);
Question: What was the regular season standings for the year when the playoffs reached the conference semifinals and the team did not qualify for the US Open Cup?
<|assistant|>
SELECT "reg_season" FROM "year_by_year" WHERE "playoffs"='Conference Semifinals' AND "us_open_cup"='Did not qualify';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "administrative_division" (
"s_car_plate_starting_1937" text,
"voivodeship_or_city" text,
"capital" text,
"area_1930_in_1_000skm_2" text,
"population_1931_in_1_000s" text
);
Question: Name the population in 1931 for lubelskie
<|assistant|>
SELECT "population_1931_in_1_000s" FROM "administrative_division" WHERE "voivodeship_or_city"='lubelskie';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "administrative_division" (
"s_car_plate_starting_1937" text,
"voivodeship_or_city" text,
"capital" text,
"area_1930_in_1_000skm_2" text,
"population_1931_in_1_000s" text
);
Question: Name the s car starting 1937 when area 1930 is 16.5
<|assistant|>
SELECT "s_car_plate_starting_1937" FROM "administrative_division" WHERE "area_1930_in_1_000skm_2"='16.5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "administrative_division" (
"s_car_plate_starting_1937" text,
"voivodeship_or_city" text,
"capital" text,
"area_1930_in_1_000skm_2" text,
"population_1931_in_1_000s" text
);
Question: Name the population when the capital is tarnopol
<|assistant|>
SELECT "population_1931_in_1_000s" FROM "administrative_division" WHERE "capital"='Tarnopol';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "administrative_division" (
"s_car_plate_starting_1937" text,
"voivodeship_or_city" text,
"capital" text,
"area_1930_in_1_000skm_2" text,
"population_1931_in_1_000s" text
);
Question: Name the s car plate starting 1937 for area 1930 being 22.2
<|assistant|>
SELECT "s_car_plate_starting_1937" FROM "administrative_division" WHERE "area_1930_in_1_000skm_2"='22.2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_14249278_1" (
"bit_15" real,
"bits_14_12" real,
"bits_11_0" text,
"mnemonic" text,
"description" text
);
Question: Name the most bits 14-12 for output from accumulator to character bus
<|assistant|>
SELECT MIN("bits_14_12") FROM "table1_14249278_1" WHERE "description"='Output from accumulator to character bus';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1425948_1" (
"chassis_manufacturer" text,
"chassis_model" text,
"body_model" text,
"number_in_fleet" real,
"fleet_numbers" text
);
Question: what is smallest number in fleet for chassis manufacturer Scania and fleet numbers is 3230?
<|assistant|>
SELECT MIN("number_in_fleet") FROM "table1_1425948_1" WHERE "chassis_manufacturer"='Scania' AND "fleet_numbers"='3230';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1425948_1" (
"chassis_manufacturer" text,
"chassis_model" text,
"body_model" text,
"number_in_fleet" real,
"fleet_numbers" text
);
Question: Which chassis manufacturer is for fleet numbers range 2530-2558
<|assistant|>
SELECT "chassis_manufacturer" FROM "table1_1425948_1" WHERE "fleet_numbers"='2530-2558';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_1425948_1" (
"chassis_manufacturer" text,
"chassis_model" text,
"body_model" text,
"number_in_fleet" real,
"fleet_numbers" text
);
Question: Chassis model Scania K360ua has what minimum number in fleet?
<|assistant|>
SELECT MIN("number_in_fleet") FROM "table1_1425948_1" WHERE "chassis_model"='Scania K360UA';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
Question: Name the channels when designation is pc700
<|assistant|>
SELECT "channels" FROM "module_specifications" WHERE "designation"='PC700';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
Question: Name the maximum clock rate mhz
<|assistant|>
SELECT MAX("clock_rate_m_hz") FROM "module_specifications";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
Question: Name the bus width bits when bandwidth mb/s is 3200
<|assistant|>
SELECT "bus_width_bits" FROM "module_specifications" WHERE "bandwidth_mb_s"=3200;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
Question: Name the least clock rate mhz
<|assistant|>
SELECT MIN("clock_rate_m_hz") FROM "module_specifications";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
Question: Name the least clock rate mhz when designation is rimm 4200
<|assistant|>
SELECT MIN("clock_rate_m_hz") FROM "module_specifications" WHERE "designation"='RIMM 4200';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "module_specifications" (
"designation" text,
"bus_width_bits" real,
"channels" text,
"clock_rate_m_hz" real,
"bandwidth_mb_s" real
);
Question: Name the number of clock rate mhz when bandwidth mb/s is 2400
<|assistant|>
SELECT COUNT("clock_rate_m_hz") FROM "module_specifications" WHERE "bandwidth_mb_s"=2400;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "elementary_schools_grades_k_6" (
"elementary_schools" text,
"mascot" text,
"address" text,
"principal_2013_2014" text,
"assistant_principal_2013_2014" text
);
Question: Which elementary schools list Cort Monroe as the principal from 2013 to 2014?
<|assistant|>
SELECT "elementary_schools" FROM "elementary_schools_grades_k_6" WHERE "principal_2013_2014"='Cort Monroe';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "elementary_schools_grades_k_6" (
"elementary_schools" text,
"mascot" text,
"address" text,
"principal_2013_2014" text,
"assistant_principal_2013_2014" text
);
Question: Who are all the assistant principals that served from 2013-2014 under the principal Cort Monroe?
<|assistant|>
SELECT "assistant_principal_2013_2014" FROM "elementary_schools_grades_k_6" WHERE "principal_2013_2014"='Cort Monroe';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "table1_14263158_3" (
"competition" text,
"stage" text,
"result" text,
"opponent" text,
"position" text,
"scorers" text
);
Question: Who played in the series that resulted in matches with the following scores: 0–3 0–8 0–1 0–2 0–3 1–4 0–9 0–5?
<|assistant|>
SELECT "opponent" FROM "table1_14263158_3" WHERE "result"='0–3 0–8 0–1 0–2 0–3 1–4 0–9 0–5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
Question: Where was there a change of 6.5%?
<|assistant|>
SELECT "name" FROM "references" WHERE "pct_change"='6.5';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
Question: When the change is 8.8%, what is the density (pop/km²)?
<|assistant|>
SELECT "density_pop_km" FROM "references" WHERE "pct_change"='8.8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
Question: How many locations had a density (pop/km²) of 91.8 in the 2011 census?
<|assistant|>
SELECT COUNT("2011_census") FROM "references" WHERE "density_pop_km"='91.8';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
Question: When the 2006 census had a population of 422204, what was the density (pop/km²) ?
<|assistant|>
SELECT COUNT("density_pop_km") FROM "references" WHERE "2006_census"=422204;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
Question: When the % change is 8.4, what is the population rank?
<|assistant|>
SELECT MIN("population_rank") FROM "references" WHERE "pct_change"='8.4';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "references" (
"name" text,
"2011_census" real,
"2006_census" real,
"pct_change" text,
"land_area_km" text,
"density_pop_km" text,
"population_rank" real
);
Question: When the population rank is 34, what the is % change?
<|assistant|>
SELECT "pct_change" FROM "references" WHERE "population_rank"=34;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "all_time_results_record" (
"team" text,
"first_played" real,
"played" real,
"win" real,
"draw" real,
"loss" real,
"points_for" real,
"ponts_against" real,
"last_meeting" real
);
Question: How many teams scored exactly 38 points
<|assistant|>
SELECT COUNT("team") FROM "all_time_results_record" WHERE "points_for"=38;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "all_time_results_record" (
"team" text,
"first_played" real,
"played" real,
"win" real,
"draw" real,
"loss" real,
"points_for" real,
"ponts_against" real,
"last_meeting" real
);
Question: In what year did Italy begin playing?
<|assistant|>
SELECT MIN("first_played") FROM "all_time_results_record" WHERE "team"='Italy';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "all_time_results_record" (
"team" text,
"first_played" real,
"played" real,
"win" real,
"draw" real,
"loss" real,
"points_for" real,
"ponts_against" real,
"last_meeting" real
);
Question: For teams that played 5 games, what was the smallest number of wins?
<|assistant|>
SELECT MIN("win") FROM "all_time_results_record" WHERE "played"=5;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "all_time_results_record" (
"team" text,
"first_played" real,
"played" real,
"win" real,
"draw" real,
"loss" real,
"points_for" real,
"ponts_against" real,
"last_meeting" real
);
Question: How many games did the team that began in 2011 and scored 36 points play?
<|assistant|>
SELECT COUNT("played") FROM "all_time_results_record" WHERE "first_played"=2011 AND "points_for"=36;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "serial_details_by_episode" (
"episode" text,
"broadcast_date" text,
"run_time" text,
"viewers_in_millions" text,
"archive" text
);
Question: What are all the run times with 8.2 million viewers?
<|assistant|>
SELECT "run_time" FROM "serial_details_by_episode" WHERE "viewers_in_millions"='8.2';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "serial_details_by_episode" (
"episode" text,
"broadcast_date" text,
"run_time" text,
"viewers_in_millions" text,
"archive" text
);
Question: What are all the episodes with an episode run time of 24:01?
<|assistant|>
SELECT "episode" FROM "serial_details_by_episode" WHERE "run_time"='24:01';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "serial_details_by_episode" (
"episode" text,
"broadcast_date" text,
"run_time" text,
"viewers_in_millions" text,
"archive" text
);
Question: How many episodes had a broadcast date and run time of 24:43?
<|assistant|>
SELECT COUNT("broadcast_date") FROM "serial_details_by_episode" WHERE "run_time"='24:43';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "members" (
"institution" text,
"location" text,
"established" real,
"gained_university_status" real,
"vice_chancellor" text,
"total_number_of_students" real,
"research_funding_000" real
);
Question: How many members gained university status in 1900?
<|assistant|>
SELECT COUNT("research_funding_000") FROM "members" WHERE "gained_university_status"=1900;<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "members" (
"institution" text,
"location" text,
"established" real,
"gained_university_status" real,
"vice_chancellor" text,
"total_number_of_students" real,
"research_funding_000" real
);
Question: What is the largest number of students?
<|assistant|>
SELECT MAX("total_number_of_students") FROM "members";<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "members" (
"institution" text,
"location" text,
"established" real,
"gained_university_status" real,
"vice_chancellor" text,
"total_number_of_students" real,
"research_funding_000" real
);
Question: How many members have professor edward acton as vice-chancellor?
<|assistant|>
SELECT COUNT("total_number_of_students") FROM "members" WHERE "vice_chancellor"='Professor Edward Acton';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "members" (
"institution" text,
"location" text,
"established" real,
"gained_university_status" real,
"vice_chancellor" text,
"total_number_of_students" real,
"research_funding_000" real
);
Question: What is the year leicester was established?
<|assistant|>
SELECT MAX("established") FROM "members" WHERE "location"='Leicester';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "replaced_pageants" (
"country_territory" text,
"former_pageant" text,
"last_competed" real,
"new_pageant" text,
"franchise_since" real
);
Question: which country has miss universe Hungary as former pageant?
<|assistant|>
SELECT "country_territory" FROM "replaced_pageants" WHERE "former_pageant"='Miss Universe Hungary';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "replaced_pageants" (
"country_territory" text,
"former_pageant" text,
"last_competed" real,
"new_pageant" text,
"franchise_since" real
);
Question: which is the former pageant in the country where the new pageant is miss bahamas?
<|assistant|>
SELECT "former_pageant" FROM "replaced_pageants" WHERE "new_pageant"='Miss Bahamas';<|endoftext|>
|
<|system|>
You are an expert SQL query generator. Only output valid SQL.
<|user|>
### Database Schema
CREATE TABLE "replaced_pageants" (
"country_territory" text,
"former_pageant" text,
"last_competed" real,
"new_pageant" text,
"franchise_since" real
);
Question: when did new zealand last compete?
<|assistant|>
SELECT MAX("last_competed") FROM "replaced_pageants" WHERE "country_territory"='New Zealand';<|endoftext|>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.