sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT AVG Goals FROM table WHERE Matches = 205 AND Rank > 9
CREATE TABLE INST, Here is a database schema( table schema);
What is the average number of goals for players ranked above 9 and playing more than 205 matches?.It is not neccessary to use all the tables.
SELECT MIN(wins) FROM table_19001175_1
CREATE TABLE INST, Here is a database schema( table schema);
Name the minimum winsIt is not neccessary to use all the tables.
SELECT surface FROM table_name_60 WHERE score = "akgul amanmuradova chuang chia-jung"
CREATE TABLE INST, Here is a database schema( table schema);
What was the surface of the match when the score was akgul amanmuradova chuang chia-jung?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Visitor = toronto AND Points < 49 AND Record = 18-17-7
CREATE TABLE INST, Here is a database schema( table schema);
What date does visitor team Toronto score less than 49 points and has record of 18-17-7?.It is not neccessary to use all the tables.
SELECT Leading scorer FROM table WHERE Score = 107–97
CREATE TABLE INST, Here is a database schema( table schema);
Who was the leading scorer of the game that had a score of 107–97?.It is not neccessary to use all the tables.
SELECT Current branch opened FROM table WHERE Branch = midland library
CREATE TABLE INST, Here is a database schema( table schema);
What is Current Branch Opened, when Branch is Midland Library?.It is not neccessary to use all the tables.
SELECT Race FROM table WHERE Weight (kg) < 55.5
CREATE TABLE INST, Here is a database schema( table schema);
In which races did the jockey weigh less than 55.5 kg?.It is not neccessary to use all the tables.
SELECT Overall Record FROM table WHERE at Opponents Venue = UF, 1-0
CREATE TABLE INST, Here is a database schema( table schema);
What is the record of wins/losses that were played at opponents venue (uf, 1-0).It is not neccessary to use all the tables.
SELECT color_commentator_s_ FROM table_name_70 WHERE network = "espn"
CREATE TABLE INST, Here is a database schema( table schema);
Who is the color commentator for ESPN from 1990 to 1992?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Competition = friendly AND Venue = rheinpark stadion, vaduz
CREATE TABLE INST, Here is a database schema( table schema);
Name the date that has a friendly competition at rheinpark stadion, vaduz.It is not neccessary to use all the tables.
SELECT Royal house FROM table WHERE Name = polyxenos epiphanes soter
CREATE TABLE INST, Here is a database schema( table schema);
Which royal house corresponds to Polyxenos Epiphanes Soter?.It is not neccessary to use all the tables.
SELECT Home captain FROM table WHERE Venue = sabina park
CREATE TABLE INST, Here is a database schema( table schema);
Who was the home captain at Sabina Park?.It is not neccessary to use all the tables.
SELECT county FROM table_name_53 WHERE opposition = "antrim" AND player = "bernie forde"
CREATE TABLE INST, Here is a database schema( table schema);
What County has an Opposition of Antrim and the Player Bernie Forde?It is not neccessary to use all the tables.
SELECT rr_nos FROM table_name_15 WHERE builder = "hudswell clarke" AND year < 1914
CREATE TABLE INST, Here is a database schema( table schema);
Name the RR numbers of hudswell clarke and years before 1914It is not neccessary to use all the tables.
SELECT Opponent FROM table WHERE Series = tied 1-1 AND Leading Scorer = becky hammon (14)
CREATE TABLE INST, Here is a database schema( table schema);
Who is the opponent of the game with a tied 1-1 series and becky hammon (14) as the leading scorer?.It is not neccessary to use all the tables.
SELECT player FROM table_name_25 WHERE round > 5 AND position = "c"
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the player for round more than 5 and position of cIt is not neccessary to use all the tables.
SELECT Year opened FROM table WHERE Students = na AND Size = 10 acres
CREATE TABLE INST, Here is a database schema( table schema);
What year was the school opened that has a size of 10 acres and students of na?.It is not neccessary to use all the tables.
SELECT Rank FROM table WHERE Scorer = lee sang-cheol
CREATE TABLE INST, Here is a database schema( table schema);
Which Rank has a Scorer of lee sang-cheol?.It is not neccessary to use all the tables.
SELECT MAX Laps FROM table WHERE Grid > 21 AND Time/Retired = +2 laps
CREATE TABLE INST, Here is a database schema( table schema);
What is the high lap total for cards with a grid larger than 21, and a Time/Retired of +2 laps?.It is not neccessary to use all the tables.
SELECT School FROM table WHERE Hometown = winter park, fl
CREATE TABLE INST, Here is a database schema( table schema);
Which school has a hometown of winter park, FL?.It is not neccessary to use all the tables.
SELECT MIN Year FROM table WHERE Opponents in Final = shingo kunieda satoshi saida
CREATE TABLE INST, Here is a database schema( table schema);
What year were the opponents Shingo Kunieda Satoshi Saida?.It is not neccessary to use all the tables.
SELECT AVG Year FROM table WHERE Runners-up = australia AND Venue = victoria golf club
CREATE TABLE INST, Here is a database schema( table schema);
What is the average Year when Australia was the runner-up at victoria golf club?.It is not neccessary to use all the tables.
SELECT Home team score FROM table WHERE Home team = north melbourne
CREATE TABLE INST, Here is a database schema( table schema);
What score did the home team of north melbourne get?.It is not neccessary to use all the tables.
SELECT Written by FROM table WHERE Setting = Winter 1541/February 13, 1542
CREATE TABLE INST, Here is a database schema( table schema);
Who wrote the episode that was set in winter 1541/february 13, 1542?.It is not neccessary to use all the tables.
SELECT MAX(money___) AS $__ FROM table_name_99 WHERE country = "scotland united states"
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest amount of money a play from Scotland United States has?It is not neccessary to use all the tables.
SELECT COUNT QPI speed (GT/s) FROM table WHERE Model = L5506
CREATE TABLE INST, Here is a database schema( table schema);
How many models numbered L5506 have a QPI speed?.It is not neccessary to use all the tables.
SELECT date FROM table_name_62 WHERE week > 13 AND attendance = "41,862"
CREATE TABLE INST, Here is a database schema( table schema);
What is the date of the game later than week 13 and 41862 people attended?It is not neccessary to use all the tables.
SELECT To par FROM table WHERE Country = united states AND Place = t8 AND Player = tommy valentine
CREATE TABLE INST, Here is a database schema( table schema);
What to par has The United States as the country, t8 as the place, and tommy valentine as the player?.It is not neccessary to use all the tables.
SELECT height FROM table_10966926_2 WHERE weight = 320
CREATE TABLE INST, Here is a database schema( table schema);
What is the height of the person that weighs 320 pounds?It is not neccessary to use all the tables.
SELECT COUNT(*) FROM club
CREATE TABLE INST, Here is a database schema( table schema);
How many clubs are there?It is not neccessary to use all the tables.
SELECT Pole Position FROM table WHERE Location = Hockenheimring
CREATE TABLE INST, Here is a database schema( table schema);
what's the pole position with location being hockenheimring.It is not neccessary to use all the tables.
SELECT nationality FROM table_name_36 WHERE lane = 5 AND time = "7:08.04"
CREATE TABLE INST, Here is a database schema( table schema);
Which Nationality has a Lane of 5 and a Time of 7:08.04?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Result = w 27-24 (ot)
CREATE TABLE INST, Here is a database schema( table schema);
When was the game with a result of w 27-24 (ot)?.It is not neccessary to use all the tables.
SELECT MIN Total FROM table WHERE Silver < 18 AND Rank = 14
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest total for those receiving less than 18 but more than 14?.It is not neccessary to use all the tables.
SELECT Crowd FROM table WHERE Away team = richmond
CREATE TABLE INST, Here is a database schema( table schema);
How big was the crowd when Richmond was the away team?.It is not neccessary to use all the tables.
SELECT h_ci__ka_m_ FROM table_2282444_1 WHERE b_r__t_ = "0.6–1.4"
CREATE TABLE INST, Here is a database schema( table schema);
When 0.6–1.4 is the b r (t) what is the h ci (ka/m)?It is not neccessary to use all the tables.
SELECT League Apps FROM table WHERE FLT Apps = 1 AND Total Goals > 0 AND League Goals > 1
CREATE TABLE INST, Here is a database schema( table schema);
What league apps with 1 flt apps, 0 goals, and more than 1 league goals?.It is not neccessary to use all the tables.
SELECT SUM(cup_goals) FROM table_name_78 WHERE league_apps > 5 AND cup_apps = 1 AND league_goals < 4
CREATE TABLE INST, Here is a database schema( table schema);
How many cup goals in the season with more than 5 league apps 1 cup apps and fewer than 4 league goals?It is not neccessary to use all the tables.
SELECT replaced_by FROM table_name_30 WHERE position_in_table = "11th" AND manner_of_departure = "resigned"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the manager that was positioned 11th in table and resigned in departure?It is not neccessary to use all the tables.
SELECT Throws FROM table WHERE Position = 3b/rhp
CREATE TABLE INST, Here is a database schema( table schema);
Which Throws have a Position of 3b/rhp?.It is not neccessary to use all the tables.
SELECT Name, Age FROM artist
CREATE TABLE INST, Here is a database schema( table schema);
Show all artist names and ages in a histogram.It is not neccessary to use all the tables.
SELECT channels FROM table_142573_1 WHERE designation = "PC700"
CREATE TABLE INST, Here is a database schema( table schema);
Name the channels when designation is pc700It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Visitor = hartford whalers AND Date = april 11
CREATE TABLE INST, Here is a database schema( table schema);
What is the score of the visiting Hartford Whalers game from April 11?.It is not neccessary to use all the tables.
SELECT SUM(county) FROM table_name_16 WHERE party = "people before profit" AND borough > 0
CREATE TABLE INST, Here is a database schema( table schema);
How many counties have people before profit as the party and a borough greater than 0?It is not neccessary to use all the tables.
SELECT template_type_code, template_type_description FROM Ref_template_types
CREATE TABLE INST, Here is a database schema( table schema);
Show all template type codes and descriptions.It is not neccessary to use all the tables.
SELECT runners_up FROM table_name_1 WHERE result = "4–1" AND champions = "wonju dongbu promy"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Runners-up of the game with a Result of 4–1 and Champions of Wonju Dongbu Promy?It is not neccessary to use all the tables.
SELECT Name FROM table WHERE Bodyweight > 89.64 AND Total (kg) > 310 AND Clean & jerk < 207.5 AND Snatch > 165
CREATE TABLE INST, Here is a database schema( table schema);
Which name had a bodyweight bigger than 89.64, a total (kg) bigger than 310, a clean and jerk less than 207.5, and a snatch that is bigger than 165?.It is not neccessary to use all the tables.
SELECT SUM(points) FROM table_name_68 WHERE played > 34
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of the points of the club with more than 34 played?It is not neccessary to use all the tables.
SELECT years_for_jazz FROM table_name_52 WHERE school_club_team = "southern methodist"
CREATE TABLE INST, Here is a database schema( table schema);
What years did the Utah Jazz Player from Southern Methodist Play?It is not neccessary to use all the tables.
SELECT Water (sqmi) FROM table WHERE County = Ramsey AND GEO ID > 3807159460.0
CREATE TABLE INST, Here is a database schema( table schema);
How many square miles of water is in Ramsey County with a geo id larger than 3807159460.0?.It is not neccessary to use all the tables.
SELECT Constructor FROM table WHERE Chassis = ej15 ej15b
CREATE TABLE INST, Here is a database schema( table schema);
Which constructor makes the ej15 ej15b chassis?.It is not neccessary to use all the tables.
SELECT Record FROM table WHERE Date = august 4
CREATE TABLE INST, Here is a database schema( table schema);
What was the team's record on August 4?.It is not neccessary to use all the tables.
SELECT reason_for_vacancy FROM table_2417445_4 WHERE district = "Massachusetts 6th"
CREATE TABLE INST, Here is a database schema( table schema);
When massachusetts 6th is the district what is the reason for vacancy?It is not neccessary to use all the tables.
SELECT MAX(obama_number) FROM table_20688030_1 WHERE county = "Wayne"
CREATE TABLE INST, Here is a database schema( table schema);
What is the maximum Obama supporters in Wayne county?It is not neccessary to use all the tables.
SELECT city FROM table_name_2 WHERE stadium = "gwang-yang stadium"
CREATE TABLE INST, Here is a database schema( table schema);
What city is Gwang-Yang stadium in?It is not neccessary to use all the tables.
SELECT city FROM table_name_97 WHERE country = "thailand"
CREATE TABLE INST, Here is a database schema( table schema);
Name the city for thailandIt is not neccessary to use all the tables.
SELECT label FROM table_name_17 WHERE region = "united kingdom"
CREATE TABLE INST, Here is a database schema( table schema);
Which label was in the United Kingdom region?It is not neccessary to use all the tables.
SELECT DATEADD(mm, (YEAR(Posts.CreationDate) - 1900) * 12 + MONTH(Posts.CreationDate) - 1, 0) AS Month, Tags.TagName, COUNT(*) AS Questions FROM Tags LEFT JOIN PostTags ON PostTags.TagId = Tags.Id LEFT JOIN Posts ON Posts.Id = PostTags.PostId LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Tags.TagName IN ('rust', 'dart', 'go', 'scala', 'erlang', '.net core', 'c#', 'java', 'javascript', 'c', 'c++', 'python') AND YEAR(Posts.CreationDate) > 2014 AND PostTypes.Name = 'Question' GROUP BY YEAR(Posts.CreationDate), MONTH(Posts.CreationDate), Tags.TagName ORDER BY YEAR(Posts.CreationDate), MONTH(Posts.CreationDate), Tags.TagName
CREATE TABLE INST, Here is a database schema( table schema);
Language trends (# of Questions per Month).It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Attendance = arsenal win 4-2 on penalties
CREATE TABLE INST, Here is a database schema( table schema);
What is the Score of the game with arsenal win 4-2 on penalties in the attendance field?.It is not neccessary to use all the tables.
SELECT tyres FROM table_name_10 WHERE driver = "didier pironi"
CREATE TABLE INST, Here is a database schema( table schema);
What is the tyres for Didier pironi?It is not neccessary to use all the tables.
SELECT "Original name" FROM table_15506 WHERE "Country" = 'bulgaria'
CREATE TABLE INST, Here is a database schema( table schema);
Name the original name for the one from bulgariaIt is not neccessary to use all the tables.
SELECT Team_ID, ACC_Percent FROM basketball_match GROUP BY All_Home
CREATE TABLE INST, Here is a database schema( table schema);
Visualize the relationship between Team_ID and ACC_Percent , and group by attribute All_Home.It is not neccessary to use all the tables.
SELECT Hometown FROM table WHERE School = Norco High School
CREATE TABLE INST, Here is a database schema( table schema);
Where is Norco HIgh School?.It is not neccessary to use all the tables.
SELECT COUNT Pick FROM table WHERE Round = 6
CREATE TABLE INST, Here is a database schema( table schema);
How many picks were from round 6?.It is not neccessary to use all the tables.
SELECT COUNT(gp_gs) FROM table_name_41 WHERE effic = "121.70" AND avg_g < 218.7
CREATE TABLE INST, Here is a database schema( table schema);
How many gp-gs have 121.70 as an effic and an avg/g less than 218.7?It is not neccessary to use all the tables.
SELECT Record FROM table WHERE Game = 56
CREATE TABLE INST, Here is a database schema( table schema);
What's the record of Game 56?.It is not neccessary to use all the tables.
SELECT marplan FROM table_name_55 WHERE gallup = "1.5%"
CREATE TABLE INST, Here is a database schema( table schema);
What is Marplan when Gallup is 1.5%It is not neccessary to use all the tables.
SELECT score FROM table_name_31 WHERE place = "t7" AND player = "justin leonard"
CREATE TABLE INST, Here is a database schema( table schema);
What is T7 Place Player Justin Leonard's Score?It is not neccessary to use all the tables.
SELECT date FROM table_name_10 WHERE venue = "carson"
CREATE TABLE INST, Here is a database schema( table schema);
On what Date was the Venue in Carson?It is not neccessary to use all the tables.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2126" AND lab.flag = "abnormal"
CREATE TABLE INST, Here is a database schema( table schema);
find the number of patients born before 2126 who had abnormal lab test status.It is not neccessary to use all the tables.
SELECT candidates FROM table_1342393_16 WHERE first_elected = 1914
CREATE TABLE INST, Here is a database schema( table schema);
What is the candidates for first elected 1914It is not neccessary to use all the tables.
SELECT MAX(lane) FROM table_name_3 WHERE reaction_time < 0.199 AND country = "united states" AND name = "muna lee" AND time > 22.01
CREATE TABLE INST, Here is a database schema( table schema);
Which Lane has a Reaction Time smaller than 0.199 and a Country of united states and a Name of muna lee and a Time larger than 22.01?It is not neccessary to use all the tables.
SELECT Candidate FROM table WHERE Number of votes = 73,494
CREATE TABLE INST, Here is a database schema( table schema);
Who is the candidate with 73,494 votes?.It is not neccessary to use all the tables.
SELECT Built FROM table WHERE Number = 34
CREATE TABLE INST, Here is a database schema( table schema);
What is the built data for number 34?.It is not neccessary to use all the tables.
SELECT MIN Avg transfer rate [kB/s] FROM table WHERE Device = 3243
CREATE TABLE INST, Here is a database schema( table schema);
What is the smallest transfer rate for a 3243 device?.It is not neccessary to use all the tables.
SELECT exponent_field FROM table_name_93 WHERE exp__biased_ = "255" AND value = "+∞"
CREATE TABLE INST, Here is a database schema( table schema);
What's the exponent field that has 255 exp and value of +∞?It is not neccessary to use all the tables.
SELECT team FROM table_name_21 WHERE driver = "toshihiro kaneishi"
CREATE TABLE INST, Here is a database schema( table schema);
Name the team for toshihiro kaneishiIt is not neccessary to use all the tables.
SELECT COUNT Laps FROM table WHERE Start = 12
CREATE TABLE INST, Here is a database schema( table schema);
How many laps were there when the start was 12?.It is not neccessary to use all the tables.
SELECT Home FROM table WHERE Date = february 3
CREATE TABLE INST, Here is a database schema( table schema);
Who was the home team on February 3?.It is not neccessary to use all the tables.
SELECT COUNT(partner) FROM table_23944006_4 WHERE score = "5-7, 6-7 (5-7)"
CREATE TABLE INST, Here is a database schema( table schema);
Name the number of partners for 5-7 6-7 (5-7)It is not neccessary to use all the tables.
SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
Which policy type has the most records in the database?It is not neccessary to use all the tables.
SELECT COUNT(*) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14836)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'chest tube #1' AND d_items.linksto = 'outputevents') AND DATETIME(outputevents.charttime) >= DATETIME(CURRENT_TIME(), '-506 day')
CREATE TABLE INST, Here is a database schema( table schema);
calculate the number of times patient 14836 had a chest tube #1 since 506 days ago.It is not neccessary to use all the tables.
SELECT country FROM table_name_77 WHERE catalogue__number = "asw 50248 (724385024825)"
CREATE TABLE INST, Here is a database schema( table schema);
What Country is Catalogue # ASW 50248 (724385024825) from?It is not neccessary to use all the tables.
SELECT stepping FROM table_name_61 WHERE part_number_s_ = "adh4450iaa5do"
CREATE TABLE INST, Here is a database schema( table schema);
What's the stepping amount for adh4450iaa5do?It is not neccessary to use all the tables.
SELECT AVG(laps) FROM table_name_6 WHERE pos = "dnf"
CREATE TABLE INST, Here is a database schema( table schema);
What is the average number of laps with a dnf pos.?It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Game = 2
CREATE TABLE INST, Here is a database schema( table schema);
What was the score for game 2?.It is not neccessary to use all the tables.
SELECT marine_organism_α FROM table_name_96 WHERE disease_area = "cancer" AND clinical_trials_β = "4/4"
CREATE TABLE INST, Here is a database schema( table schema);
What is the organism that has a disease area of cancer and has 4/4 clinical trial b?It is not neccessary to use all the tables.
SELECT player FROM table_name_88 WHERE goals_against_average > 2.07 AND games_played = 44
CREATE TABLE INST, Here is a database schema( table schema);
Who played 44 games who averaged over 2.07 goals against?It is not neccessary to use all the tables.
SELECT COUNT(directed_by) FROM table_22347090_6 WHERE us_viewers__million_ = "1.59"
CREATE TABLE INST, Here is a database schema( table schema);
How many directors are there for the episode that had 1.59 million U.S. viewers?It is not neccessary to use all the tables.
SELECT SUM(2011) FROM table_name_58 WHERE rank < 8 AND water_park = "ocean world"
CREATE TABLE INST, Here is a database schema( table schema);
what is 2011 when the rank is less than 8 and the water park is ocean world?It is not neccessary to use all the tables.
SELECT Res. FROM table WHERE Record = 12-2
CREATE TABLE INST, Here is a database schema( table schema);
What is the result of the fight when record is 12-2?.It is not neccessary to use all the tables.
SELECT season FROM table_name_56 WHERE runner_up = "judean rebels"
CREATE TABLE INST, Here is a database schema( table schema);
Name the season for runner up of judean rebelsIt is not neccessary to use all the tables.
SELECT Away team FROM table WHERE Home team score = 14.21 (105)
CREATE TABLE INST, Here is a database schema( table schema);
Which away team played the home team when they scored 14.21 (105)?.It is not neccessary to use all the tables.
SELECT MIN Overall FROM table WHERE College = san diego state AND Pick # < 30
CREATE TABLE INST, Here is a database schema( table schema);
College of san diego state, and a Pick # smaller than 30 has what lowest overall?.It is not neccessary to use all the tables.
SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = "Miramichi"
CREATE TABLE INST, Here is a database schema( table schema);
What products are available at store named "Miramichi"?It is not neccessary to use all the tables.
SELECT COUNT(week) FROM table_name_29 WHERE attendance = 56 OFFSET 023
CREATE TABLE INST, Here is a database schema( table schema);
What week were there 56023 people in attendance?It is not neccessary to use all the tables.
SELECT event FROM table_name_16 WHERE acts = "106 bands"
CREATE TABLE INST, Here is a database schema( table schema);
I want to know the events for 106 bandsIt is not neccessary to use all the tables.
SELECT AVG(laps) FROM table_name_42 WHERE driver = "niki lauda" AND grid < 3
CREATE TABLE INST, Here is a database schema( table schema);
How many Laps with a Grid smaller than 3 did Driver NIki Lauda have?It is not neccessary to use all the tables.
SELECT Best Actor FROM table WHERE Best Film = mystery
CREATE TABLE INST, Here is a database schema( table schema);
Which Best Actor has a Best Film of mystery?.It is not neccessary to use all the tables.
SELECT driver___passenger FROM table_16729457_17 WHERE position = 4
CREATE TABLE INST, Here is a database schema( table schema);
Name the driver passenger for position 4It is not neccessary to use all the tables.