sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT SUM Year FROM table WHERE Film = the adventures of tintin
CREATE TABLE INST, Here is a database schema( table schema);
Which year did The Adventures of Tintin come out?.It is not neccessary to use all the tables.
SELECT WINNING_SONG(English AS Title) FROM table_name_65 WHERE winning_song = "aku tetap milikmu"
CREATE TABLE INST, Here is a database schema( table schema);
Which winning song was sung by aku tetap milikmu?It is not neccessary to use all the tables.
SELECT admissions.subject_id FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'obst chr bronc w/o exac') AND STRFTIME('%y', diagnoses_icd.charttime) <= '...
CREATE TABLE INST, Here is a database schema( table schema);
list the id list of patients who have been diagnosed with obst chr bronc w/o exac until 2104.It is not neccessary to use all the tables.
SELECT COUNT(gold) FROM table_name_99 WHERE rank = "10" AND bronze > 2
CREATE TABLE INST, Here is a database schema( table schema);
How many Golds did Rank 10 get with a Bronze larger than 2?It is not neccessary to use all the tables.
SELECT away_team AS score FROM table_name_25 WHERE venue = "windy hill"
CREATE TABLE INST, Here is a database schema( table schema);
What was the away team score at Windy Hill?It is not neccessary to use all the tables.
SELECT MAX(draw) FROM table_name_62 WHERE place = "4th"
CREATE TABLE INST, Here is a database schema( table schema);
What is the greatest draw that has 4th for place?It is not neccessary to use all the tables.
SELECT SUM(term_ending) FROM table_name_67 WHERE position = "member" AND nationality = "india"
CREATE TABLE INST, Here is a database schema( table schema);
Position of member and a Nationality of india is what sum of term ending?It is not neccessary to use all the tables.
SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase, venue WHERE keyphrase.keyphrasename = 'lasso' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND paper.year = 2014 AND venue.venueid = paper.venueid AND venue.venuename = 'icml'
CREATE TABLE INST, Here is a database schema( table schema);
which papers in icml 2014 had lasso in them ?It is not neccessary to use all the tables.
SELECT class FROM table_name_9 WHERE weight = 242
CREATE TABLE INST, Here is a database schema( table schema);
What is the class of the player with a weight of 242 pounds?It is not neccessary to use all the tables.
SELECT MIN(top_5) FROM table_name_74 WHERE top_10 < 1 AND top_25 < 1
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest top-5 of the tournament with less than 1 top-10 and less than 1 top-25?It is not neccessary to use all the tables.
SELECT Match FROM table WHERE Date = 30 january 1938
CREATE TABLE INST, Here is a database schema( table schema);
What match was on 30 january 1938?.It is not neccessary to use all the tables.
SELECT away_team FROM table_name_9 WHERE home_team = "blackpool"
CREATE TABLE INST, Here is a database schema( table schema);
What was the Away Team of Blackpool's Home game?It is not neccessary to use all the tables.
SELECT withdrawal FROM table_name_95 WHERE lb & sc_number < 16 AND sr_number = 2011
CREATE TABLE INST, Here is a database schema( table schema);
what is the withdrawal when the lb&sc number is less than 16 and the s.r. number is 2011?It is not neccessary to use all the tables.
SELECT MAX Population 1991 FROM table WHERE Name = baden bei wien AND Population 2007 > 25,284
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest population in 1991 in Baden Bei Wien, and a 2007 population larger than 25,284?.It is not neccessary to use all the tables.
SELECT Frequency FROM table WHERE City of license = temagami
CREATE TABLE INST, Here is a database schema( table schema);
What frequency has temagami as the city of license?.It is not neccessary to use all the tables.
SELECT Team, COUNT(*) FROM Elimination GROUP BY Team
CREATE TABLE INST, Here is a database schema( table schema);
A bar chart about how many eliminations did each team have?It is not neccessary to use all the tables.
SELECT COUNT Constructor FROM table WHERE Race Name = III RedeX Trophy
CREATE TABLE INST, Here is a database schema( table schema);
How many constructors won the III Redex Trophy?.It is not neccessary to use all the tables.
SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%'
CREATE TABLE INST, Here is a database schema( table schema);
What are the daily hire costs for the products with substring 'Book' in its name?It is not neccessary to use all the tables.
SELECT result FROM table_name_15 WHERE home_away = "away" AND date = "august 4"
CREATE TABLE INST, Here is a database schema( table schema);
What is the result of the away game played on August 4?It is not neccessary to use all the tables.
SELECT type FROM table_name_1 WHERE issued = 1964
CREATE TABLE INST, Here is a database schema( table schema);
What type was issued in 1964?It is not neccessary to use all the tables.
SELECT average FROM table_10621256_1 WHERE high_score = 120
CREATE TABLE INST, Here is a database schema( table schema);
what's the average where high score is 120It is not neccessary to use all the tables.
SELECT Education FROM table WHERE Country = Nepal
CREATE TABLE INST, Here is a database schema( table schema);
What is the education in Nepal? .It is not neccessary to use all the tables.
SELECT beer_name FROM table_name_33 WHERE prize = "silver medal" AND competition = "camra reading branch beer festival" AND year = 2008
CREATE TABLE INST, Here is a database schema( table schema);
What beer won a silver medal at the camra reading branch beer festival in 2008?It is not neccessary to use all the tables.
SELECT MIN(bronze) FROM table_name_75 WHERE nation = "switzerland" AND silver < 3
CREATE TABLE INST, Here is a database schema( table schema);
How many Bronze medals did Switzerland with less than 3 Silver medals receive?It is not neccessary to use all the tables.
SELECT Site FROM table WHERE Orbit = leo AND Decay ( UTC ) = still in orbit AND Function = magnetosphere research
CREATE TABLE INST, Here is a database schema( table schema);
What site has an orbit of Leo, a decay (UTC) of still in orbit, and a magnetosphere research?.It is not neccessary to use all the tables.
SELECT Home team score FROM table WHERE Venue = glenferrie oval
CREATE TABLE INST, Here is a database schema( table schema);
What is the home team's score in the game played at glenferrie oval?.It is not neccessary to use all the tables.
SELECT SUM(ViewCount) AS total_views, COUNT(DISTINCT Id) AS post_cnt, COUNT(DISTINCT OwnerUserId) AS total_users_owners FROM Posts WHERE YEAR(CreationDate) = '2017'
CREATE TABLE INST, Here is a database schema( table schema);
Number of Views, Total Posts and Total Owners for Questions created in 2017.It is not neccessary to use all the tables.
SELECT Rank, COUNT(*) FROM Faculty GROUP BY Rank ORDER BY COUNT(*)
CREATE TABLE INST, Here is a database schema( table schema);
How many faculty members do we have for each faculty rank Show bar chart, I want to list in asc by the Y.It is not neccessary to use all the tables.
SELECT MAX("SP+FS") FROM table_56978 WHERE "Points" > '164.56' AND "Rank" > '1' AND "Name" = 'mitsuru matsumura'
CREATE TABLE INST, Here is a database schema( table schema);
What is the largest value for SP+FS with more than 164.56 points for Mitsuru Matsumura in a Rank greater than 1?It is not neccessary to use all the tables.
SELECT winning_driver FROM table_name_7 WHERE fastest_lap = "ryan hunter-reay" AND most_laps_led = "ryan briscoe"
CREATE TABLE INST, Here is a database schema( table schema);
What is Winning Driver when Fastest Lap is Ryan Hunter-Reay and when Most Laps Led is Ryan Briscoe?It is not neccessary to use all the tables.
SELECT colors FROM table_1221089_1 WHERE institution = "University of New Hampshire"
CREATE TABLE INST, Here is a database schema( table schema);
What are the school colors of the University of New Hampshire?It is not neccessary to use all the tables.
SELECT player FROM table_name_5 WHERE school_club_team = "illinois"
CREATE TABLE INST, Here is a database schema( table schema);
Which Player has a School/Club Team of Illinois?It is not neccessary to use all the tables.
SELECT city FROM table_name_61 WHERE icao = "oejn"
CREATE TABLE INST, Here is a database schema( table schema);
Which city has an ICAO of Oejn?It is not neccessary to use all the tables.
SELECT traditional FROM table_1638437_2 WHERE population = 74779
CREATE TABLE INST, Here is a database schema( table schema);
Name the traditional for population 74779It is not neccessary to use all the tables.
SELECT kit_factory FROM table_name_90 WHERE manufacturer = "jabiru" AND model = "j250"
CREATE TABLE INST, Here is a database schema( table schema);
What Kit/Factory has a J250 model made by Jabiru?It is not neccessary to use all the tables.
SELECT Parent magazine FROM table WHERE Frequency = bimonthly AND Magazine type = manga AND Title = dengeki moeoh
CREATE TABLE INST, Here is a database schema( table schema);
What was the parent magazine for the manga magazine, dengeki moeoh that was issued bimonthly?.It is not neccessary to use all the tables.
SELECT Location FROM table WHERE Mascot = kingsmen
CREATE TABLE INST, Here is a database schema( table schema);
What location has kingsmen as the mascot?.It is not neccessary to use all the tables.
SELECT laps FROM table_name_38 WHERE grid < 2
CREATE TABLE INST, Here is a database schema( table schema);
what is the laps when the grid is less than 2?It is not neccessary to use all the tables.
SELECT MIN(year) FROM table_name_74 WHERE location = "gelredome, arnhem" AND anthem = "technoboy - next dimensional world"
CREATE TABLE INST, Here is a database schema( table schema);
What is the earliest year it was located in gelredome arnhem and a Anthem of technoboy - next dimensional world?It is not neccessary to use all the tables.
SELECT Reason for Vacancy FROM table WHERE Vacator = Frederick Remann (R)
CREATE TABLE INST, Here is a database schema( table schema);
When frederick remann (r) is the vacator what is the reason for vacancy?.It is not neccessary to use all the tables.
SELECT "Date" FROM table_55194 WHERE "Home team score" = '9.6 (60)'
CREATE TABLE INST, Here is a database schema( table schema);
When did a home team score 9.6 (60)?It is not neccessary to use all the tables.
SELECT outgoing_manager FROM table_name_92 WHERE replaced_by = "tony mowbray"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the outgoing manager that was replaced by Tony Mowbray?It is not neccessary to use all the tables.
SELECT Viewers (millions) FROM table WHERE Rating/Share (18–49) = 2.6/7
CREATE TABLE INST, Here is a database schema( table schema);
How many million viewers watched the episode that had a 2.6/7 rating/share (18-49).It is not neccessary to use all the tables.
SELECT t1.product_name, t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id = t2.product_id GROUP BY t2.product_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
Find the name and price of the product that has been ordered the greatest number of times.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 = "ELECTIVE" AND prescriptions.drug = "5% Dextrose (EXCEL BAG)"
CREATE TABLE INST, Here is a database schema( table schema);
give me the number of patients whose admission type is elective and drug name is 5% dextrose (excel bag)?It is not neccessary to use all the tables.
SELECT COUNT(won) FROM table_13018091_1 WHERE pts_for = 616
CREATE TABLE INST, Here is a database schema( table schema);
How many teams scored 616 points?It is not neccessary to use all the tables.
SELECT defensive FROM table_name_97 WHERE rookie = "craig point" AND week = 6
CREATE TABLE INST, Here is a database schema( table schema);
Who played defensive when the rookie Craig Point was playing during week 6?It is not neccessary to use all the tables.
SELECT Change (2009 to 2010) FROM table WHERE International tourist arrivals (2011) = 9.4 million
CREATE TABLE INST, Here is a database schema( table schema);
Name the change 2009 to 2010 where international tourist arrivals is 9.4 million.It is not neccessary to use all the tables.
SELECT Transfer window FROM table WHERE Country = bel
CREATE TABLE INST, Here is a database schema( table schema);
What is the transfer window for bel?.It is not neccessary to use all the tables.
SELECT COUNT(rd) FROM table_1132568_3 WHERE grand_prix = "Austrian grand_prix"
CREATE TABLE INST, Here is a database schema( table schema);
How many on the list are called the Austrian Grand Prix?It is not neccessary to use all the tables.
SELECT location FROM table_name_50 WHERE built = "early 19th century"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Location of the Mill Built in the Early 19th Century?It is not neccessary to use all the tables.
SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID = T2.County_ID WHERE T1.White > 90
CREATE TABLE INST, Here is a database schema( table schema);
Show the crime rate of counties with a city having white percentage more than 90.It is not neccessary to use all the tables.
SELECT MIN # FROM table WHERE Writer = Tony Basgallop
CREATE TABLE INST, Here is a database schema( table schema);
What episode number of the season did Tony Basgallop write?.It is not neccessary to use all the tables.
SELECT (UpVotes) AS votes FROM Users WHERE Id = '##UserId##'
CREATE TABLE INST, Here is a database schema( table schema);
How much vote did I do ?. See how much time you vote (Civic Duty badge)It is not neccessary to use all the tables.
SELECT indigenous_mining_production_2006 FROM table_15624586_2 WHERE _percentage_of_world_demand = "24.0%"
CREATE TABLE INST, Here is a database schema( table schema);
Which country mines 24.0% of the world demand of uranium?It is not neccessary to use all the tables.
SELECT AVG(Age) FROM manager
CREATE TABLE INST, Here is a database schema( table schema);
What is the average age for all managers?It is not neccessary to use all the tables.
SELECT Competition FROM table WHERE Location = bamako
CREATE TABLE INST, Here is a database schema( table schema);
What competition is located in bamako?.It is not neccessary to use all the tables.
SELECT opponent FROM table_name_52 WHERE record = "17-25"
CREATE TABLE INST, Here is a database schema( table schema);
Which of the opponents has a record of 17-25?It is not neccessary to use all the tables.
SELECT language FROM table_name_27 WHERE film_name = "seethaiah"
CREATE TABLE INST, Here is a database schema( table schema);
what language is seethaiah inIt is not neccessary to use all the tables.
SELECT COUNT(population) FROM table_name_92 WHERE number_of_households = 41 OFFSET 511
CREATE TABLE INST, Here is a database schema( table schema);
What is the population with 41511 households?It is not neccessary to use all the tables.
SELECT MIN Attempts FROM table WHERE Player = Charles White
CREATE TABLE INST, Here is a database schema( table schema);
How many attempts did Charles White make?.It is not neccessary to use all the tables.
SELECT resolution FROM table_name_96 WHERE network = "canal de las estrellas"
CREATE TABLE INST, Here is a database schema( table schema);
What is the resolution of the network Canal de las Estrellas?It is not neccessary to use all the tables.
SELECT position_in_table FROM table_name_11 WHERE team = "hartlepool united"
CREATE TABLE INST, Here is a database schema( table schema);
what is the position in table when the team is hartlepool united?It is not neccessary to use all the tables.
SELECT capacity__mw_ FROM table_26387382_1 WHERE turbines = "50-60"
CREATE TABLE INST, Here is a database schema( table schema);
What all capacities have turbines between 50-60?It is not neccessary to use all the tables.
SELECT tennis FROM table_16423070_4 WHERE softball = "Ashland" AND volleyball = "Wooster"
CREATE TABLE INST, Here is a database schema( table schema);
who won tennis when ashland won softball and wooster won volleybalIt is not neccessary to use all the tables.
SELECT Score FROM table WHERE Date = april 23
CREATE TABLE INST, Here is a database schema( table schema);
What is the Score for the Date of April 23?.It is not neccessary to use all the tables.
SELECT House FROM table WHERE Abbr. = g
CREATE TABLE INST, Here is a database schema( table schema);
Which house has an abbreviation of G?.It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Game > 31 AND Opponent = detroit
CREATE TABLE INST, Here is a database schema( table schema);
What is the Date of the game against Detroit in game 31 or after?.It is not neccessary to use all the tables.
SELECT Evening Gown FROM table WHERE Swimsuit > 9.51 AND Country = maryland
CREATE TABLE INST, Here is a database schema( table schema);
Name the evening gown for swimsuit more than 9.51 for maryland.It is not neccessary to use all the tables.
SELECT candidates FROM table_1341453_22 WHERE party = "Republican" AND district = "Maryland 1"
CREATE TABLE INST, Here is a database schema( table schema);
List the candidates in district Maryland 1 where the republican party won.It is not neccessary to use all the tables.
SELECT Indoor track FROM table WHERE Tennis = yes AND Golf = no
CREATE TABLE INST, Here is a database schema( table schema);
What is the indoor track status for the school that has yes for tennis and no for golf?.It is not neccessary to use all the tables.
SELECT MIN(round) FROM table_name_58 WHERE player = "matt delahey" AND pick > 112
CREATE TABLE INST, Here is a database schema( table schema);
What is the littlest round that has Matt Delahey and a greater than 112 pick?It is not neccessary to use all the tables.
SELECT gold FROM table_name_48 WHERE silver = "bertil ahlin sweden"
CREATE TABLE INST, Here is a database schema( table schema);
Who won the gold when Bertil Ahlin Sweden won the silver?It is not neccessary to use all the tables.
SELECT MAX("Lost") FROM table_74877 WHERE "Drawn" < '4' AND "Played" < '9'
CREATE TABLE INST, Here is a database schema( table schema);
Which Lost is the highest one that has a Drawn smaller than 4, and a Played smaller than 9?It is not neccessary to use all the tables.
SELECT year, month, day FROM sampledata15 WHERE sample_pk = 3763
CREATE TABLE INST, Here is a database schema( table schema);
When is sample 3763 collected?It is not neccessary to use all the tables.
SELECT Song Title FROM table WHERE Length = 2:50
CREATE TABLE INST, Here is a database schema( table schema);
What Song has a Length of 2:50?.It is not neccessary to use all the tables.
SELECT AVG(attendance) FROM table_name_71 WHERE venue = "candlestick park" AND date = "december 27"
CREATE TABLE INST, Here is a database schema( table schema);
What is the average Attendance when Venue is "Candlestick Park" and when Date is "December 27"?It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Home = kings
CREATE TABLE INST, Here is a database schema( table schema);
Home of kings had what score?.It is not neccessary to use all the tables.
SELECT COUNT Joined FROM table WHERE Nickname = Nor'easters
CREATE TABLE INST, Here is a database schema( table schema);
How many years are listed under joined for the Nor'easters?.It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Date = september 14
CREATE TABLE INST, Here is a database schema( table schema);
what was the score on september 14.It is not neccessary to use all the tables.
SELECT score FROM table_name_33 WHERE attendance = "2,444"
CREATE TABLE INST, Here is a database schema( table schema);
What is Score, when Attendance is 2,444?It is not neccessary to use all the tables.
SELECT Major FROM STUDENT GROUP BY Major HAVING COUNT(*) < 3
CREATE TABLE INST, Here is a database schema( table schema);
Report all majors that have less than 3 students.It is not neccessary to use all the tables.
SELECT 2008 First Time FROM table WHERE 2006 First Time = 85%
CREATE TABLE INST, Here is a database schema( table schema);
What is the percentage for 2008 First time when in 2006 it was 85%?.It is not neccessary to use all the tables.
SELECT Episode FROM table WHERE Result = nominated AND Nominee(s) = walon green, joe sachs
CREATE TABLE INST, Here is a database schema( table schema);
For what episode was the nominee (s) Walon Green, Joe Sachs nominated as a result?.It is not neccessary to use all the tables.
SELECT Party FROM table WHERE Name = claudette tardif
CREATE TABLE INST, Here is a database schema( table schema);
Which party does Claudette Tardif belong to?.It is not neccessary to use all the tables.
SELECT series__number FROM table_25800134_12 WHERE airdate = "February 26, 1968"
CREATE TABLE INST, Here is a database schema( table schema);
What episode number of the series aired on February 26 1968?It is not neccessary to use all the tables.
SELECT Call sign FROM table WHERE Frequency MHz > 88.7 AND ERP W = 99
CREATE TABLE INST, Here is a database schema( table schema);
Which callsign has ERP W of 99 and a frequency of greater than 88.7MHz?.It is not neccessary to use all the tables.
SELECT Player FROM table WHERE Country = northern ireland
CREATE TABLE INST, Here is a database schema( table schema);
Which player is from Northern Ireland?.It is not neccessary to use all the tables.
SELECT tdp FROM table_2467150_2 WHERE model__list_ = "X53xx"
CREATE TABLE INST, Here is a database schema( table schema);
What is every value for TDP if model is x53xx?It is not neccessary to use all the tables.
SELECT COUNT 2013 population (July est.) FROM table WHERE Population density (/km 2 ) > 14.1
CREATE TABLE INST, Here is a database schema( table schema);
What was the July 2013 population estimate of the location which had a population density larger than 14.1?.It is not neccessary to use all the tables.
SELECT lost FROM table_name_50 WHERE try_bp = "10" AND club = "uwic rfc"
CREATE TABLE INST, Here is a database schema( table schema);
Can you tell the Lost that has the Try BP of 10 and the Club of uwic rfc?It is not neccessary to use all the tables.
SELECT Season FROM table WHERE Division Four = Wallington New Foresters
CREATE TABLE INST, Here is a database schema( table schema);
When the wallington new foresters are in division four what is the season?.It is not neccessary to use all the tables.
SELECT Producer FROM table WHERE Year = 1961
CREATE TABLE INST, Here is a database schema( table schema);
Who were the producers in 1961?.It is not neccessary to use all the tables.
SELECT Scale FROM table WHERE Name = ura index
CREATE TABLE INST, Here is a database schema( table schema);
What is URA Index scale?.It is not neccessary to use all the tables.
SELECT T1.county FROM appellations AS T1 JOIN wine AS T2 ON T1.appelation = T2.appelation WHERE T2.score > 90 GROUP BY T1.county ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
What is the county that produces the most wines scoring higher than 90?It is not neccessary to use all the tables.
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 4 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI...
CREATE TABLE INST, Here is a database schema( table schema);
among patients diagnosed with ventricular tachycardia, get me the four year survival probability.It is not neccessary to use all the tables.
SELECT Time FROM table WHERE Laps = 14
CREATE TABLE INST, Here is a database schema( table schema);
What is the total time that it took for the driver to finish 14 laps?.It is not neccessary to use all the tables.
SELECT SUM Lane FROM table WHERE Time = 24.83 AND Heat < 11
CREATE TABLE INST, Here is a database schema( table schema);
What lane has a time of 24.83 and a heat less than 11?.It is not neccessary to use all the tables.
SELECT to_par FROM table_name_61 WHERE player = "dick metz"
CREATE TABLE INST, Here is a database schema( table schema);
Name the To par for dick metzIt is not neccessary to use all the tables.
SELECT COUNT Romaji title FROM table WHERE Japanese title = Mi-Chemin
CREATE TABLE INST, Here is a database schema( table schema);
How many songs have mi-chemin as their Japanese name and romanji name?.It is not neccessary to use all the tables.