sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT status FROM table_name_16 WHERE opposing_teams = "scotland"
CREATE TABLE INST, Here is a database schema( table schema);
What is Status when Opposing Teams is "Scotland"?It is not neccessary to use all the tables.
SELECT Result FROM table WHERE Week > 6 AND Opponent = buffalo bills
CREATE TABLE INST, Here is a database schema( table schema);
What is the result when the week is greater than 6 and the Buffalo Bills are the opponent?.It is not neccessary to use all the tables.
SELECT nationality FROM table_name_78 WHERE year > 2009 AND player = "dwayne de rosario category:articles with hcards"
CREATE TABLE INST, Here is a database schema( table schema);
After 2009 what's the nationality of a player named Dwayne de Rosario Category:articles with hcards?It is not neccessary to use all the tables.
SELECT attendance FROM table_name_56 WHERE group_position = "3rd"
CREATE TABLE INST, Here is a database schema( table schema);
How many people were in attendance when the group position was 3rd?It is not neccessary to use all the tables.
SELECT Canadian Chapters FROM table WHERE Founding Date = 1872-10-10
CREATE TABLE INST, Here is a database schema( table schema);
When 1872-10-10 is the founding date what are the canadian chapters?.It is not neccessary to use all the tables.
SELECT Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa' ORDER BY Amount_Payment DESC
CREATE TABLE INST, Here is a database schema( table schema);
Give me a histogram to show the date and the amount for all the payments processed with Visa, order y axis in descending order.It is not neccessary to use all the tables.
SELECT away_team FROM table_name_30 WHERE tie_no > 13 AND home_team = "team bath"
CREATE TABLE INST, Here is a database schema( table schema);
who is the away team when the tie no is more than 13 and the home team is team bath?It is not neccessary to use all the tables.
SELECT Status, AVG(Population) FROM city GROUP BY Status
CREATE TABLE INST, Here is a database schema( table schema);
Please show the different statuses of cities and the average population of cities with each status.It is not neccessary to use all the tables.
SELECT numbers FROM table_name_49 WHERE power__horsepower_ > 220 AND type = "thn"
CREATE TABLE INST, Here is a database schema( table schema);
What is the numbers of the thn unit with a power greater than 220?It is not neccessary to use all the tables.
SELECT MAX("Holborn Division") FROM table_20956 WHERE "Tower Division" = '272966'
CREATE TABLE INST, Here is a database schema( table schema);
When 272966 is the tower division what is the highest holborn division?It is not neccessary to use all the tables.
SELECT hometown FROM table_name_20 WHERE year = "fr" AND club = "brown's gymnastics"
CREATE TABLE INST, Here is a database schema( table schema);
What hometown was FR Year and ha Brown's Gymnastics club?It is not neccessary to use all the tables.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.drug = "Sodium Polystyrene Sulfonate"
CREATE TABLE INST, Here is a database schema( table schema);
provide the number of patients whose admission type is emergency and drug name is sodium polystyrene sulfonate?It is not neccessary to use all the tables.
SELECT Character name FROM table WHERE Release date = july 29, 1938
CREATE TABLE INST, Here is a database schema( table schema);
What was the character name for the film with a release date of July 29, 1938?.It is not neccessary to use all the tables.
SELECT MIN Population FROM table WHERE Per capita income = $16,330
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest Population, when Per Capita Income is "$16,330"?.It is not neccessary to use all the tables.
SELECT City FROM table WHERE IATA = lao
CREATE TABLE INST, Here is a database schema( table schema);
What is City, when IATA is "LAO"?.It is not neccessary to use all the tables.
SELECT team FROM table_11207040_6 WHERE outgoing_manager = "Jim McInally"
CREATE TABLE INST, Here is a database schema( table schema);
What teams does jim mcinally manage?It is not neccessary to use all the tables.
SELECT General classification FROM table WHERE Points classification = Alessandro Petacchi AND Young rider classification = Thomas Löfkvist
CREATE TABLE INST, Here is a database schema( table schema);
When thomas löfkvist is the young rider classification and alessandro petacchi is the points classification who are the general classifications? .It is not neccessary to use all the tables.
SELECT AVG(product_price) FROM products WHERE product_type_code = 'Clothes'
CREATE TABLE INST, Here is a database schema( table schema);
Find the average price of all product clothes.It is not neccessary to use all the tables.
SELECT Opponent FROM table WHERE Week = 6
CREATE TABLE INST, Here is a database schema( table schema);
Who was the opponent in week 6?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Opponent = liberia AND Score = 1-0
CREATE TABLE INST, Here is a database schema( table schema);
When was the event that had Liberia as an opponent and resulted in a 1-0 score?.It is not neccessary to use all the tables.
SELECT Men's singles FROM table WHERE Women's singles = christine magnusson
CREATE TABLE INST, Here is a database schema( table schema);
The year the Women's singles was won by Christine Magnusson who was the winner of the Men's singles?.It is not neccessary to use all the tables.
SELECT engine FROM table_name_99 WHERE entrant = "scuderia ferrari" AND driver = "raymond sommer"
CREATE TABLE INST, Here is a database schema( table schema);
Which engine has the entrant scuderia ferrari and is driven by Raymond Sommer?It is not neccessary to use all the tables.
SELECT Tournament FROM table WHERE 2013 = 1r AND 2012 = 1r
CREATE TABLE INST, Here is a database schema( table schema);
Which tournament has a 2013 of 1r, and a 2012 of 1r?.It is not neccessary to use all the tables.
SELECT date FROM table_name_72 WHERE score = "3–6, 7–6(6), 5–7"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Date of the Tournament with a Score of 3–6 7–6(6) 5–7?It is not neccessary to use all the tables.
SELECT writer FROM table_name_14 WHERE film = "run"
CREATE TABLE INST, Here is a database schema( table schema);
Who is the writer of the film Run?It is not neccessary to use all the tables.
SELECT route_via FROM table_29202276_2 WHERE destination = "Madurai"
CREATE TABLE INST, Here is a database schema( table schema);
What is the route/via when the destination is listed as Madurai?It is not neccessary to use all the tables.
SELECT 2007 result FROM table WHERE Notional control (based on 2003 results) = noc
CREATE TABLE INST, Here is a database schema( table schema);
What's the 2007 result when the notional control is noc?.It is not neccessary to use all the tables.
SELECT Finals FROM table WHERE Goals > 0 AND Assists = 8
CREATE TABLE INST, Here is a database schema( table schema);
How many finals had more than 0 goals and 8 assists?.It is not neccessary to use all the tables.
SELECT COUNT Events FROM table WHERE Cuts made < 34 AND Top-10 > 3
CREATE TABLE INST, Here is a database schema( table schema);
What is the total number of events that had 34 cuts and 3 in the top 10?.It is not neccessary to use all the tables.
SELECT 2004-05 FROM table WHERE 2001-02 = 1,725
CREATE TABLE INST, Here is a database schema( table schema);
What was the production in 2004-05 for the commodity that produced 1,725 in 2001-02?.It is not neccessary to use all the tables.
SELECT Competition FROM table WHERE Date = october 31, 1979
CREATE TABLE INST, Here is a database schema( table schema);
What Competition had a game on October 31, 1979?.It is not neccessary to use all the tables.
SELECT Maltese FROM table WHERE Malay = rabu
CREATE TABLE INST, Here is a database schema( table schema);
What is the Maltese word for the Malay word rabu?.It is not neccessary to use all the tables.
SELECT COUNT Pos. FROM table WHERE Points < 10 AND Qualifying > 7 AND Race 1 = ret AND Driver = jonathan grant
CREATE TABLE INST, Here is a database schema( table schema);
What is the total number of positions with less than 10 points, more than 7 qualifying, ret value in Race 1, and Jonathan Grant driving?.It is not neccessary to use all the tables.
SELECT pada_4 FROM table_name_32 WHERE pada_2 = "थ tha"
CREATE TABLE INST, Here is a database schema( table schema);
which Pada 4 has a Pada 2 of थ tha?It is not neccessary to use all the tables.
SELECT To par FROM table WHERE Player = tom kite
CREATE TABLE INST, Here is a database schema( table schema);
What was Tom Kite's to par?.It is not neccessary to use all the tables.
SELECT theatre FROM table_name_5 WHERE author = "stanisław wyspiański" AND year = 1969
CREATE TABLE INST, Here is a database schema( table schema);
Author of stanisław wyspiański and a Year of 1969 happened in what theatre?It is not neccessary to use all the tables.
SELECT round FROM table_22656187_9 WHERE w_l = "Loss" AND edition = "2012 Fed Cup Europe/Africa Group I"
CREATE TABLE INST, Here is a database schema( table schema);
Which round has a win-loss result of loss and an edition of 2012 Fed Cup Europe/Africa Group I?It is not neccessary to use all the tables.
SELECT company FROM table_name_74 WHERE author = "aristophanes" AND play = "plutus"
CREATE TABLE INST, Here is a database schema( table schema);
Which company has an author of Aristophanes and play of Plutus?It is not neccessary to use all the tables.
SELECT power FROM table_name_21 WHERE name = "9 nc"
CREATE TABLE INST, Here is a database schema( table schema);
Which Power has a Name of 9 nc?It is not neccessary to use all the tables.
SELECT 250cc winner FROM table WHERE Round = 9
CREATE TABLE INST, Here is a database schema( table schema);
in round 9 who was the 250cc winner?.It is not neccessary to use all the tables.
SELECT COUNT(*) FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM accounts)
CREATE TABLE INST, Here is a database schema( table schema);
Show the number of all customers without an account.It is not neccessary to use all the tables.
SELECT COUNT Draws FROM table WHERE Wins < 17 AND Against < 1158
CREATE TABLE INST, Here is a database schema( table schema);
Which Draws has a Wins smaller than 17, and an Against smaller than 1158?.It is not neccessary to use all the tables.
SELECT afl_team FROM table_12165999_1 WHERE player = "Bob Johnson"
CREATE TABLE INST, Here is a database schema( table schema);
Bob Johnson plays for which AFL team?It is not neccessary to use all the tables.
SELECT COUNT(college_junior_club_team) FROM table_22402438_7 WHERE player = "John Garrett"
CREATE TABLE INST, Here is a database schema( table schema);
How many college/junior/clubteams have John garrett as the player?It is not neccessary to use all the tables.
SELECT Party FROM table WHERE Margin = 105731
CREATE TABLE INST, Here is a database schema( table schema);
What party won with a margin of 105731?.It is not neccessary to use all the tables.
SELECT Listed FROM table WHERE CERCLIS ID = msd004006995
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the listed when cerclis id is msd004006995.It is not neccessary to use all the tables.
SELECT MAX Field Goals FROM table WHERE Player = Alexis Yackley
CREATE TABLE INST, Here is a database schema( table schema);
Name the field goals for alexis yackley.It is not neccessary to use all the tables.
SELECT english_version FROM table_25173505_15 WHERE character = "Drizella"
CREATE TABLE INST, Here is a database schema( table schema);
Who voiced Drizella in the English version?It is not neccessary to use all the tables.
SELECT Winning Team FROM table WHERE Circuit = Circuit Ricardo Tormo
CREATE TABLE INST, Here is a database schema( table schema);
When circuit ricardo tormo is the circuit who is the winning team?.It is not neccessary to use all the tables.
SELECT Accreditation FROM table WHERE School = United Tribes Technical College
CREATE TABLE INST, Here is a database schema( table schema);
What is the accrediation for united tribes technical college?.It is not neccessary to use all the tables.
SELECT Team 2 FROM table WHERE Score = 2 - 1
CREATE TABLE INST, Here is a database schema( table schema);
What is Team 2, when Score is 2 - 1?.It is not neccessary to use all the tables.
SELECT AVG(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID = SECRETARY_Vote WHERE T1.Sex = "F" AND T2.Election_Cycle = "Spring"
CREATE TABLE INST, Here is a database schema( table schema);
Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.It is not neccessary to use all the tables.
SELECT deputy FROM table_name_88 WHERE name = "elizabeth black"
CREATE TABLE INST, Here is a database schema( table schema);
What is the name of the Deputy when the Name was elizabeth black?It is not neccessary to use all the tables.
SELECT Team FROM table WHERE Date = January 9
CREATE TABLE INST, Here is a database schema( table schema);
Who did the team play on january 9?.It is not neccessary to use all the tables.
SELECT AVG(launches) FROM table_name_3 WHERE failures = 0 AND rocket = "soyuz" AND successes < 12
CREATE TABLE INST, Here is a database schema( table schema);
What are average launches with 0 failures rocket of Soyuz and less than 12 successes?It is not neccessary to use all the tables.
SELECT Regular season Vacated FROM table WHERE Record as played = 12–19
CREATE TABLE INST, Here is a database schema( table schema);
What is the regular season vacated for the Record as played of 12–19?.It is not neccessary to use all the tables.
SELECT D 43 √ FROM table WHERE D 42 √ = d 42 √
CREATE TABLE INST, Here is a database schema( table schema);
What is the value of D 43 √ when the value of D 42 √ is d 42 √?.It is not neccessary to use all the tables.
SELECT Player FROM table WHERE Score = 70-68-70=208
CREATE TABLE INST, Here is a database schema( table schema);
Who is the player with a score of 70-68-70=208?.It is not neccessary to use all the tables.
SELECT AVG(entered_service) FROM table_name_73 WHERE builder = "tom smith" AND number < 7007
CREATE TABLE INST, Here is a database schema( table schema);
When did the tom smith built train enter service with a number under 7007?It is not neccessary to use all the tables.
SELECT written_by FROM table_1130632_1 WHERE us_viewers__million_ = "18.73"
CREATE TABLE INST, Here is a database schema( table schema);
Who wrote all the shows with 18.73 u.s. viewers?It is not neccessary to use all the tables.
SELECT player FROM table_name_23 WHERE cfl_team = "montreal alouettes (via hamilton via winnipeg)"
CREATE TABLE INST, Here is a database schema( table schema);
Which Player has a CFL Team of montreal alouettes (via hamilton via winnipeg)?It is not neccessary to use all the tables.
SELECT COUNT(status) FROM table_27514362_7 WHERE entrant = "James Finch"
CREATE TABLE INST, Here is a database schema( table schema);
How many status figures does James Finch have?It is not neccessary to use all the tables.
SELECT COUNT(written_by) FROM table_25740548_2 WHERE production_code = "CA106"
CREATE TABLE INST, Here is a database schema( table schema);
How many episodes with the production code CA106 are there?It is not neccessary to use all the tables.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Oxycodone SR (OxyconTIN)"
CREATE TABLE INST, Here is a database schema( table schema);
how many patients whose drug name is oxycodone sr (oxycontin)?It is not neccessary to use all the tables.
SELECT COUNT(title) FROM table_17355820_1 WHERE season__number = 19
CREATE TABLE INST, Here is a database schema( table schema);
How many episodes were there in season 19?It is not neccessary to use all the tables.
SELECT winning_score FROM table_name_46 WHERE tournament = "standard register ping" AND runner_s__up = "kelly robbins"
CREATE TABLE INST, Here is a database schema( table schema);
What is the winning score of standard register ping tournament which has Kelly Robbins as the runner-up?It is not neccessary to use all the tables.
SELECT location FROM table_name_62 WHERE enrollment > 543
CREATE TABLE INST, Here is a database schema( table schema);
Which Location has an Enrollment larger than 543?It is not neccessary to use all the tables.
SELECT Branding FROM table WHERE Location = San Jose Del Monte
CREATE TABLE INST, Here is a database schema( table schema);
What is the branding for the station located in san jose del monte?.It is not neccessary to use all the tables.
SELECT constituency_number FROM table_name_11 WHERE reserved_for___sc___st__none_ = "st" AND name = "bikhangaon"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Constituency number for Bikhangaon with a Reserved for ( SC / ST /None) of st?It is not neccessary to use all the tables.
SELECT Original airing FROM table WHERE Audience share (average) = 8%
CREATE TABLE INST, Here is a database schema( table schema);
Where the audience share is 8%, what is the original airing?.It is not neccessary to use all the tables.
SELECT COUNT(longitude) FROM table_16768245_2 WHERE diameter = "224.0"
CREATE TABLE INST, Here is a database schema( table schema);
How many longitudes have a diameter of 224.0?It is not neccessary to use all the tables.
SELECT MAX(weeks_in_top_10) FROM table_26400041_2 WHERE peak = 9
CREATE TABLE INST, Here is a database schema( table schema);
if the peak is 9 how many weeks was it in the top 10?It is not neccessary to use all the tables.
SELECT AVG Year FROM table WHERE English Title = my queen
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the average year for my queen.It is not neccessary to use all the tables.
SELECT COUNT(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN = T2.patient JOIN physician AS T3 ON T2.physician = T3.employeeid WHERE T3.name = "John Dorian"
CREATE TABLE INST, Here is a database schema( table schema);
How many patients' prescriptions are made by physician John Dorian?It is not neccessary to use all the tables.
SELECT type FROM table_name_16 WHERE m809_series = "m814"
CREATE TABLE INST, Here is a database schema( table schema);
Name the type with M809 series of m814It is not neccessary to use all the tables.
SELECT SUM(weight) FROM table_name_52 WHERE player = "deshawn stevenson"
CREATE TABLE INST, Here is a database schema( table schema);
What does DeShawn Stevenson weigh?It is not neccessary to use all the tables.
SELECT Opponent FROM table WHERE Game = 37
CREATE TABLE INST, Here is a database schema( table schema);
What is Opponent, when Game is "37"?.It is not neccessary to use all the tables.
SELECT COUNT(liberal_candidates) FROM table_name_94 WHERE liberal_leader = "pearson" AND _percentage_of_popular_vote = "40.2%" AND seats_won < 131
CREATE TABLE INST, Here is a database schema( table schema);
How many Liberal candidates have a Liberal leader of pearson and a % of popular vote of 40.2% and Seats won smaller than 131?It is not neccessary to use all the tables.
SELECT AVG Crowd FROM table WHERE Away team score = 22.12 (144)
CREATE TABLE INST, Here is a database schema( table schema);
What is the average crowd size where the away team scored 22.12 (144)?.It is not neccessary to use all the tables.
SELECT Place FROM table WHERE Player = jack renner
CREATE TABLE INST, Here is a database schema( table schema);
What place has jack renner as the player?.It is not neccessary to use all the tables.
SELECT 54 AS _holes FROM table_name_7 WHERE championship = "the open championship (4)"
CREATE TABLE INST, Here is a database schema( table schema);
What is the 54 holes for The Open Championship (4)?It is not neccessary to use all the tables.
SELECT leading_scorer FROM table_name_55 WHERE visitor = "trail blazers"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the leading scorer when the visiting team was the Trail Blazers?It is not neccessary to use all the tables.
SELECT MAX Pick # FROM table WHERE Player = Greg Strome
CREATE TABLE INST, Here is a database schema( table schema);
What pick was Greg Strome?.It is not neccessary to use all the tables.
SELECT Airport FROM table WHERE Country = russia AND IATA = krr
CREATE TABLE INST, Here is a database schema( table schema);
What is the name of the airport located in Russia with an IATA of KRR?.It is not neccessary to use all the tables.
SELECT nationality FROM table_name_72 WHERE school_country = "temple"
CREATE TABLE INST, Here is a database schema( table schema);
Which nationality is associated with Temple?It is not neccessary to use all the tables.
SELECT Weight FROM table WHERE College = Western Ontario
CREATE TABLE INST, Here is a database schema( table schema);
What is the weight for western ontario college?.It is not neccessary to use all the tables.
SELECT Home team FROM table WHERE Home team score = 13.16 (94)
CREATE TABLE INST, Here is a database schema( table schema);
Who has a home team score of 13.16 (94)?.It is not neccessary to use all the tables.
SELECT "Position" FROM table_4229 WHERE "Affiliation" = 'University of Akron Michigan Bucks'
CREATE TABLE INST, Here is a database schema( table schema);
What is the position for the university of akron michigan bucks affiliationIt is not neccessary to use all the tables.
SELECT MIN(draft) FROM table_name_62 WHERE pick > 197 AND round = 14 AND player = "jim farrell"
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest draft of player jim farrell, who has a pick greater than 197 and a round of 14?It is not neccessary to use all the tables.
SELECT MAX(pick) FROM table_name_9 WHERE round > 5 AND player = "tom ivey"
CREATE TABLE INST, Here is a database schema( table schema);
Name of the highest Pick is also a Round greater than 5 and Player as Tom Ivey?It is not neccessary to use all the tables.
SELECT SUM Evening gown FROM table WHERE Average = 9.06 AND Swimsuit < 8.76
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the sum of evening gown for average of 9.06 and swimsuit less than 8.76.It is not neccessary to use all the tables.
SELECT AVG Rank FROM table WHERE 2012 = 219,721
CREATE TABLE INST, Here is a database schema( table schema);
What is the average rank of a nation that had 219,721 in 2012?.It is not neccessary to use all the tables.
SELECT set_3 FROM table_name_22 WHERE time = "10:00" AND set_2 = "25–19"
CREATE TABLE INST, Here is a database schema( table schema);
Which Set 3 has a Time of 10:00 and a Set 2 of 25–19?It is not neccessary to use all the tables.
SELECT round FROM table_name_83 WHERE college = "mississippi valley state"
CREATE TABLE INST, Here is a database schema( table schema);
What round was the player drafted from mississippi valley state?It is not neccessary to use all the tables.
SELECT losing_bonus FROM table_14070062_3 WHERE won = "9"
CREATE TABLE INST, Here is a database schema( table schema);
What's the losing bonus count for the club with 9 won games?It is not neccessary to use all the tables.
SELECT COUNT(loss) FROM table_name_15 WHERE long < 24 AND gain > 116
CREATE TABLE INST, Here is a database schema( table schema);
WHAT IS THE NUMBER OF LOSSES WITH A LONG SMALLER THAN 24 AND GAIN BIGGER THAN 116?It is not neccessary to use all the tables.
SELECT MAX(area__km_2__) FROM table_name_96 WHERE province = "ontario" AND status = "town" AND municipality = "minto" AND rank < 84
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest Area (KM 2) for the Province of Ontario that has the Status of Town a Municipality of Minto and a Rank that's smaller than 84?It is not neccessary to use all the tables.
SELECT package_option FROM table_name_51 WHERE television_service = "sky arte hd"
CREATE TABLE INST, Here is a database schema( table schema);
What package/option has sky arte hd as the television service?It is not neccessary to use all the tables.
SELECT SUM Scored FROM table WHERE Date = 22 february 2006
CREATE TABLE INST, Here is a database schema( table schema);
How many times did Sham Kwok Fai score in the game that was played on 22 February 2006?.It is not neccessary to use all the tables.
SELECT COUNT Mens doubles FROM table WHERE Womens doubles = Catrine Bengtsson Margit Borg
CREATE TABLE INST, Here is a database schema( table schema);
How many mens doubles when womens doubles is catrine bengtsson margit borg?.It is not neccessary to use all the tables.