sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "HYPERGLYCEMIA" AND demographic.dob_year < "2168"
CREATE TABLE INST, Here is a database schema( table schema);
give me the number of patients whose primary disease is hyperglycemia and year of birth is less than 2168?It is not neccessary to use all the tables.
SELECT MIN World Rank FROM table WHERE South American Rank = 3
CREATE TABLE INST, Here is a database schema( table schema);
Name the least world rank for south american rank 3.It is not neccessary to use all the tables.
SELECT number_s_ FROM table_name_43 WHERE quantity = "1" AND year_s__of_manufacture = "1841"
CREATE TABLE INST, Here is a database schema( table schema);
What number was manufactured 1 in 1841?It is not neccessary to use all the tables.
SELECT MAX(clubs_remaining) FROM table_1859269_1 WHERE leagues_entering_at_this_round = "Süper Lig"
CREATE TABLE INST, Here is a database schema( table schema);
If leagues entering this round is Süper Lig what is the maximum amount of clubs remaining?It is not neccessary to use all the tables.
SELECT opponent FROM table_name_94 WHERE record = "10-6"
CREATE TABLE INST, Here is a database schema( table schema);
Which opponent led to a record of 10-6?It is not neccessary to use all the tables.
SELECT college FROM table_name_29 WHERE player = "dennis byrd"
CREATE TABLE INST, Here is a database schema( table schema);
Where did Dennis Byrd go to college?It is not neccessary to use all the tables.
SELECT time_retired FROM table_name_86 WHERE laps = 75 AND driver = "pedro de la rosa"
CREATE TABLE INST, Here is a database schema( table schema);
Which time/retired had 75 laps and Pedro de la Rosa as a driver?It is not neccessary to use all the tables.
SELECT "Round" FROM table_61460 WHERE "Position" = 'left wing'
CREATE TABLE INST, Here is a database schema( table schema);
In what round was a left wing drafted?It is not neccessary to use all the tables.
SELECT score FROM table_name_47 WHERE result = "2–1" AND date = "5 july 2007"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Score that has a Result of 2–1 on 5 july 2007?It is not neccessary to use all the tables.
SELECT school_club_team FROM table_10015132_1 WHERE no = "6"
CREATE TABLE INST, Here is a database schema( table schema);
What school did player number 6 come from?It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Partnering = alexander waske AND Opponents in the final = rafael nadal bartolomé salvá-vidal
CREATE TABLE INST, Here is a database schema( table schema);
What is Score, when Partnering is "Alexander Waske", and when Opponents In The Final is "Rafael Nadal Bartolomé Salvá-Vidal"?.It is not neccessary to use all the tables.
SELECT tournament FROM table_name_68 WHERE 2006 = "a" AND 1996 = "1r" AND 2004 = "1r"
CREATE TABLE INST, Here is a database schema( table schema);
Name the tournament for 2006 of a 1996 of 1r and 2004 of 1rIt is not neccessary to use all the tables.
SELECT COUNT(avg_g) FROM table_name_51 WHERE long = 51 AND loss = 333 AND gain > 2013
CREATE TABLE INST, Here is a database schema( table schema);
How much Avg/G has a Long of 51 and a Loss of 333 and a Gain larger than 2013?It is not neccessary to use all the tables.
SELECT method FROM table_name_12 WHERE time = "2:16"
CREATE TABLE INST, Here is a database schema( table schema);
When the match lasted 2:16 how was it decided?It is not neccessary to use all the tables.
SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid = T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid = T3.amenid WHERE T3.amenity_name = 'Study Room'
CREATE TABLE INST, Here is a database schema( table schema);
Find the name of dorms which have both TV Lounge and Study Room as amenities.It is not neccessary to use all the tables.
SELECT description FROM table_25474825_1 WHERE license = "GNU GPL v2 or Ruby license"
CREATE TABLE INST, Here is a database schema( table schema);
What is the description of the license for GNU GPL v2 or Ruby license?It is not neccessary to use all the tables.
SELECT 2006 FROM table WHERE 2012 = a AND 2011 = 3r
CREATE TABLE INST, Here is a database schema( table schema);
Which 2006 has a 2012 of a, and a 2011 of 3r?.It is not neccessary to use all the tables.
SELECT country, COUNT(*) FROM stadium GROUP BY country
CREATE TABLE INST, Here is a database schema( table schema);
How many stadiums does each country have?It is not neccessary to use all the tables.
SELECT date FROM table_name_31 WHERE venue = "western oval"
CREATE TABLE INST, Here is a database schema( table schema);
I want to know the date for western oval venueIt is not neccessary to use all the tables.
SELECT MAX(presidency) FROM table_name_8 WHERE left_office = "1998" AND took_office > 1974
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest Presidency that Took Office after 1974 and Left Office in 1998?It is not neccessary to use all the tables.
SELECT Record FROM table WHERE Score = L 109–116 2 OT
CREATE TABLE INST, Here is a database schema( table schema);
what records have a score of l 109–116 2 ot.It is not neccessary to use all the tables.
SELECT COUNT(points) FROM table_name_41 WHERE engine = "honda hr-1"
CREATE TABLE INST, Here is a database schema( table schema);
What is the total number of points of the honda hr-1 engine?It is not neccessary to use all the tables.
SELECT AVG(points) FROM table_name_42 WHERE attendance = 3 OFFSET 806
CREATE TABLE INST, Here is a database schema( table schema);
Can you tell me the average Points that has the Attendance of 3806?It is not neccessary to use all the tables.
SELECT AVG(money_requested__) AS £_ FROM table_name_96 WHERE first_aired = "18 january 2005" AND company_or_product_name = "iv cam"
CREATE TABLE INST, Here is a database schema( table schema);
What is the average money requested in the episode first aired on 18 January 2005 by the company/product name IV CamIt is not neccessary to use all the tables.
SELECT Role FROM table WHERE Tournament = 1st division honduras
CREATE TABLE INST, Here is a database schema( table schema);
What is the Role in the 1st Division Honduras Tournament?.It is not neccessary to use all the tables.
SELECT date FROM table_17288825_9 WHERE team = "Memphis"
CREATE TABLE INST, Here is a database schema( table schema);
On what date did the Rockets play Memphis?It is not neccessary to use all the tables.
SELECT COUNT Money list rank FROM table WHERE Best finish = 2
CREATE TABLE INST, Here is a database schema( table schema);
Which money list ranks had a best finish of 2?.It is not neccessary to use all the tables.
SELECT artist FROM table_name_41 WHERE single___pack = "guitar hero track pack 1"
CREATE TABLE INST, Here is a database schema( table schema);
What is the name of the artist with a Single / Pack of guitar hero track pack 1?It is not neccessary to use all the tables.
SELECT MAX(overall) FROM table_name_54 WHERE college = "georgia"
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest overall of the player from Georgia?It is not neccessary to use all the tables.
SELECT report FROM table_name_71 WHERE circuit = "tripoli"
CREATE TABLE INST, Here is a database schema( table schema);
Which report includes a Circuit of Tripoli?It is not neccessary to use all the tables.
SELECT points FROM table_name_75 WHERE grid = "1"
CREATE TABLE INST, Here is a database schema( table schema);
How many points when the Grid was 1?It is not neccessary to use all the tables.
SELECT Country FROM table WHERE Player = tiger woods
CREATE TABLE INST, Here is a database schema( table schema);
What country is Tiger Woods from?.It is not neccessary to use all the tables.
SELECT SUM(original_week) FROM table_name_51 WHERE date = "september 16, 1982"
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the sum of original week for september 16 1982It is not neccessary to use all the tables.
SELECT AVG Gold FROM table WHERE Silver < 13 AND Total > 18 AND Bronze < 8
CREATE TABLE INST, Here is a database schema( table schema);
What is the average number of gold medals won among participants that won less than 13 silver, less than 8 bronze, and more than 18 medals overall?.It is not neccessary to use all the tables.
SELECT house_1950 FROM table_name_39 WHERE governors_1950 = "governors 1995"
CREATE TABLE INST, Here is a database schema( table schema);
What shows for House 1950 when the Governors 1950 show governors 1995?It is not neccessary to use all the tables.
SELECT constructor FROM table_name_40 WHERE rounds = "10-12" AND chassis = "m7a"
CREATE TABLE INST, Here is a database schema( table schema);
Which constructor has 10-12 rounds and a M7A chassis?It is not neccessary to use all the tables.
SELECT Name FROM table WHERE Winning constructor = bugatti AND Circuit = monza
CREATE TABLE INST, Here is a database schema( table schema);
What is the name for the Monza circuit race were Bugatti was the winning constructor?.It is not neccessary to use all the tables.
SELECT MIN Scored FROM table WHERE Position = 6
CREATE TABLE INST, Here is a database schema( table schema);
What is scored with the position of 6?.It is not neccessary to use all the tables.
SELECT Series No. FROM table WHERE U.K. viewers (million) = 2.43
CREATE TABLE INST, Here is a database schema( table schema);
What's the series number of the episode seen by 2.43 million viewers in the UK?.It is not neccessary to use all the tables.
SELECT Film title used in nomination FROM table WHERE Primary Language(s) = azerbaijani, russian
CREATE TABLE INST, Here is a database schema( table schema);
What is Film Title Used In Nomination, when Primary Language(s) is "Azerbaijani, Russian"?.It is not neccessary to use all the tables.
SELECT Date, UserId, UserId AS "user_link", Name, Class FROM Badges WHERE TagBased = 'true' AND (Name LIKE '%vba%' OR Name LIKE '%excel%') ORDER BY UserId, Date
CREATE TABLE INST, Here is a database schema( table schema);
VBA & Excel tag badges. This one may be better: https://data.stackexchange.com/stackoverflow/query/869444/how-would-removing-tagexcel-vba-affect-excel-and-vba-tag-badgesIt is not neccessary to use all the tables.
SELECT avg_seek_time_[ms] FROM table_name_26 WHERE device < 3231
CREATE TABLE INST, Here is a database schema( table schema);
What is the avg seek time for a device that is less than 3231?It is not neccessary to use all the tables.
SELECT MIN Field goals FROM table WHERE Player = Frederick L. Conklin
CREATE TABLE INST, Here is a database schema( table schema);
What were the least amount of field goals when Frederick L. Conklin played?.It is not neccessary to use all the tables.
SELECT MIN(position) FROM table_name_84 WHERE wins = 2 AND loses > 13
CREATE TABLE INST, Here is a database schema( table schema);
What is the lowest positioned team with 2 wins and losses greater than 13?It is not neccessary to use all the tables.
SELECT score_qualifying FROM table_name_94 WHERE apparatus = "hoop"
CREATE TABLE INST, Here is a database schema( table schema);
Which Qualifying score had hoop as an apparatus?It is not neccessary to use all the tables.
SELECT isbn_us FROM table_name_72 WHERE title = "crisis in space"
CREATE TABLE INST, Here is a database schema( table schema);
What is ISBN US when Title is "Crisis In Space"?It is not neccessary to use all the tables.
SELECT Location FROM table WHERE Event = fury fc 4: high voltage
CREATE TABLE INST, Here is a database schema( table schema);
Where was the Fury FC 4: High Voltage event held?.It is not neccessary to use all the tables.
SELECT AVG Rank FROM table WHERE Bronze = 2 AND Total = 2 AND Gold < 0
CREATE TABLE INST, Here is a database schema( table schema);
What is the average Rank when there are 2 bronze, the total is 2 and gold is less than 0?.It is not neccessary to use all the tables.
SELECT Home team FROM table WHERE Venue = kardinia park
CREATE TABLE INST, Here is a database schema( table schema);
Who was the home team at Kardinia Park?.It is not neccessary to use all the tables.
SELECT COUNT Reg GP FROM table WHERE Player = daniel rahimi AND Rd # > 3
CREATE TABLE INST, Here is a database schema( table schema);
How many Reg GP does daniel rahimi have with a rd # greater than 3?.It is not neccessary to use all the tables.
SELECT maximum_download_speed__kbps FROM table_name_24 WHERE technology = "3g" AND plan_name = "internet basic"
CREATE TABLE INST, Here is a database schema( table schema);
What is the maximum download speed for the Internet basic plan with 3G?It is not neccessary to use all the tables.
SELECT COUNT(byes) FROM table_name_67 WHERE draws < 1 AND wins < 8
CREATE TABLE INST, Here is a database schema( table schema);
What is the total number of byes associated with fewer than 8 wins and fewer than 1 draw?It is not neccessary to use all the tables.
SELECT Home FROM table WHERE Geust = fc thun (asl)
CREATE TABLE INST, Here is a database schema( table schema);
What is the home of fc thun (asl) geust?.It is not neccessary to use all the tables.
SELECT MIN(points) FROM table_name_33 WHERE extra_points = 0 AND player = "curtis redden" AND touchdowns < 2
CREATE TABLE INST, Here is a database schema( table schema);
Which Points is the lowest one that has an Extra points of 0 and a Player of curtis redden and Touchdowns smaller than 2?It is not neccessary to use all the tables.
SELECT venue FROM table_name_25 WHERE score = "2:3"
CREATE TABLE INST, Here is a database schema( table schema);
Which venue was used for the game whose score was 2:3?It is not neccessary to use all the tables.
SELECT Location FROM table WHERE Opponent = bob stines
CREATE TABLE INST, Here is a database schema( table schema);
What is the Location of the match against Bob Stines?.It is not neccessary to use all the tables.
SELECT Original air date FROM table WHERE Season no. = 2
CREATE TABLE INST, Here is a database schema( table schema);
What was the original air date for season number 2?.It is not neccessary to use all the tables.
SELECT MIN(Half) AS marathon__womens_ FROM table_11391954_3
CREATE TABLE INST, Here is a database schema( table schema);
What is the minimum number for the half marathon (womens)?It is not neccessary to use all the tables.
SELECT open_cup FROM table_name_21 WHERE reg_season = "2nd, northeast"
CREATE TABLE INST, Here is a database schema( table schema);
What open cup did they play in when they finished 2nd northeast in the reg. season?It is not neccessary to use all the tables.
SELECT vehicle FROM table_20549371_3 WHERE epa_rated_highway_fuel_economy = "109 mpg-e"
CREATE TABLE INST, Here is a database schema( table schema);
What vehicle has an epa highway fuel economy of 109 mpg-e?It is not neccessary to use all the tables.
SELECT built FROM table_name_22 WHERE fuel__trans = "diesel-electric"
CREATE TABLE INST, Here is a database schema( table schema);
What is the manufacturer found under the Built column that made locomotives with a Fuel/Trans of diesel-electric?It is not neccessary to use all the tables.
SELECT position FROM table_name_70 WHERE round > 14 AND overall < 419
CREATE TABLE INST, Here is a database schema( table schema);
Which Position has a Round larger than 14 and an Overall smaller than 419?It is not neccessary to use all the tables.
SELECT Category FROM table WHERE Year = 2012 AND Award = drama league award
CREATE TABLE INST, Here is a database schema( table schema);
Tell me the category for 2012 and drama league award.It is not neccessary to use all the tables.
SELECT score FROM table_name_75 WHERE team = "indiana"
CREATE TABLE INST, Here is a database schema( table schema);
WHAT IS THE SCORE WITH THE TEAM OF INDIANA?It is not neccessary to use all the tables.
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY COUNT(JOB_ID)
CREATE TABLE INST, Here is a database schema( table schema);
For those employees who did not have any job in the past, show me about the distribution of job_id and the amount of job_id , and group by attribute job_id in a bar chart, and sort by the total number in ascending.It is not neccessary to use all the tables.
SELECT written_by FROM table_name_36 WHERE no_in_series = 24
CREATE TABLE INST, Here is a database schema( table schema);
Who was the number 24 series written by?It is not neccessary to use all the tables.
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE course.department LIKE '%DENT%' AND program_course.category LIKE 'PreMajor' AND program_course.course_id = course.course_id
CREATE TABLE INST, Here is a database schema( table schema);
In order to declare a major in DENT , what classes do I need to take ?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Region = france
CREATE TABLE INST, Here is a database schema( table schema);
Which Date has a Region of france?.It is not neccessary to use all the tables.
SELECT fifth_district FROM table_15442974_1 WHERE fourth_district = "Steve Rudoni"
CREATE TABLE INST, Here is a database schema( table schema);
Name the fifth district for steve rudoniIt is not neccessary to use all the tables.
SELECT COUNT(rufus_guest) FROM table_19930660_1 WHERE first_broadcast = "15 December 2008"
CREATE TABLE INST, Here is a database schema( table schema);
Name the rufus guest for 15 december 2008It is not neccessary to use all the tables.
SELECT venue FROM table_name_62 WHERE year < 1986 AND position = "6th"
CREATE TABLE INST, Here is a database schema( table schema);
What Venue has a Year smaller than 1986 and a Position of 6th?It is not neccessary to use all the tables.
SELECT COUNT(total) FROM table_name_83 WHERE player = "pádraig harrington"
CREATE TABLE INST, Here is a database schema( table schema);
How many totals does p draig harrington have?It is not neccessary to use all the tables.
SELECT earnings_per_share__p_ FROM table_18304259_1 WHERE net_profit__£m_ = "39.2"
CREATE TABLE INST, Here is a database schema( table schema);
Name the eps for net profit being 39.2It is not neccessary to use all the tables.
SELECT home_team AS score FROM table_name_39 WHERE time = "12:00 pm" AND ground = "waverley park"
CREATE TABLE INST, Here is a database schema( table schema);
What is Home Team Score when Time is 12:00 PM and when Ground is Waverley Park?It is not neccessary to use all the tables.
SELECT Home team score FROM table WHERE Away team score = 8.14 (62)
CREATE TABLE INST, Here is a database schema( table schema);
What did the home team score in the game where the away team scored 8.14 (62)?.It is not neccessary to use all the tables.
SELECT season_in_tamil FROM table_name_23 WHERE season_in_english = "monsoon"
CREATE TABLE INST, Here is a database schema( table schema);
What is the english word Monsoon in Tamil?It is not neccessary to use all the tables.
SELECT MAX Series # FROM table WHERE Title = "The Night of the Flying Pie Plate"
CREATE TABLE INST, Here is a database schema( table schema);
Name the series number for "the night of the flying pie plate".It is not neccessary to use all the tables.
SELECT Manufacturer FROM table WHERE Quantity made = 2 AND Year made = 1884
CREATE TABLE INST, Here is a database schema( table schema);
What is Manufacturer, when Quantity Made is 2, and when Year Made is 1884?.It is not neccessary to use all the tables.
SELECT AVG(crowd) FROM table_name_67 WHERE date = "saturday, 29 january" AND away_team = "collingwood"
CREATE TABLE INST, Here is a database schema( table schema);
How many Crowd that has a Date on saturday 29 january and an Away team of collingwood?It is not neccessary to use all the tables.
SELECT League Cup FROM table WHERE Years = 1991–present
CREATE TABLE INST, Here is a database schema( table schema);
What is the League Cup value for 1991–present?.It is not neccessary to use all the tables.
SELECT year_s__won FROM table_name_11 WHERE total = 286
CREATE TABLE INST, Here is a database schema( table schema);
What years won have a total of 286?It is not neccessary to use all the tables.
SELECT MAX Wins FROM table WHERE Position < 1
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest number of wins of the team with a position less than 1?.It is not neccessary to use all the tables.
SELECT Driver FROM table WHERE Laps = 74 AND Grid > 9
CREATE TABLE INST, Here is a database schema( table schema);
Who drive 74 laps in a grid larger than 9?.It is not neccessary to use all the tables.
SELECT l_g FROM table_19018191_5 WHERE player = "Ermengol"
CREATE TABLE INST, Here is a database schema( table schema);
Name the lg for ermengolIt is not neccessary to use all the tables.
SELECT party FROM table_1341522_13 WHERE incumbent = "Sanford Bishop"
CREATE TABLE INST, Here is a database schema( table schema);
What party is Sanford Bishop a member of?It is not neccessary to use all the tables.
SELECT Label FROM table WHERE Catalog number = 817
CREATE TABLE INST, Here is a database schema( table schema);
What label has the 817 catalog?.It is not neccessary to use all the tables.
SELECT "Party" FROM table_18172 WHERE "First elected" = '1974'
CREATE TABLE INST, Here is a database schema( table schema);
What party was first elected in 1974?It is not neccessary to use all the tables.
SELECT No. in season FROM table WHERE Title = "Grad School"
CREATE TABLE INST, Here is a database schema( table schema);
What's the season number of the episode titled "Grad school"?.It is not neccessary to use all the tables.
SELECT AVG Attendance FROM table WHERE Week = 8
CREATE TABLE INST, Here is a database schema( table schema);
Which Attendance has a Week of 8?.It is not neccessary to use all the tables.
SELECT Dates active FROM table WHERE Deaths = 204
CREATE TABLE INST, Here is a database schema( table schema);
When was there 204 deaths?.It is not neccessary to use all the tables.
SELECT N117/2400 IEC3 FROM table WHERE N100 IEC3 = 25
CREATE TABLE INST, Here is a database schema( table schema);
What is the N117/2400 IEC3 associated with an N100IEC3 of 25?.It is not neccessary to use all the tables.
SELECT College FROM table WHERE Team = boston patriots
CREATE TABLE INST, Here is a database schema( table schema);
Which college did the player who went to the Boston Patriots go to?.It is not neccessary to use all the tables.
SELECT SUM(no_in_series) FROM table_name_5 WHERE written_by = "sam meikle" AND no_in_season = 21
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of the numbers in series written by sam meikle which have 21 numbers in the season?It is not neccessary to use all the tables.
SELECT co_drivers FROM table_name_24 WHERE year = 1992
CREATE TABLE INST, Here is a database schema( table schema);
Who was the Co-Driver of the winner of 1992's race?It is not neccessary to use all the tables.
SELECT year FROM table_29598261_1 WHERE name = "Chris McNamara"
CREATE TABLE INST, Here is a database schema( table schema);
what year is chris mcnamara?It is not neccessary to use all the tables.
SELECT Country FROM table WHERE City = yerevan
CREATE TABLE INST, Here is a database schema( table schema);
What country is Yerevan located in?.It is not neccessary to use all the tables.
SELECT MIN(lost) FROM table_name_23 WHERE points_1 = "53" AND goals_for > 73
CREATE TABLE INST, Here is a database schema( table schema);
What is the fewest losses for teams with points of 53 and more than 73 goals for?It is not neccessary to use all the tables.
SELECT result_f___a FROM table_name_87 WHERE league_position = "1st" AND date = "4 january 1994"
CREATE TABLE INST, Here is a database schema( table schema);
Name the Result F – A that has a League position of 1st on 4 january 1994?It is not neccessary to use all the tables.
SELECT 2008 FROM table_name_87 WHERE 2006 = "2nd"
CREATE TABLE INST, Here is a database schema( table schema);
What is the 2008 value that was 2nd in 2006?It is not neccessary to use all the tables.
SELECT Tries against FROM table WHERE Points against = 520
CREATE TABLE INST, Here is a database schema( table schema);
How many tries against were there with 520 points against?.It is not neccessary to use all the tables.