table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_204_190 ( id number, "rank" number, "city" text, "county" text, "state" text, "percentage" text )
which county has the most representation ?
SELECT "county" FROM table_204_190 GROUP BY "county" ORDER BY SUM("percentage") DESC LIMIT 1
CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE time_zone ( time_zone_code text, time_zone...
what flights are available from DALLAS FORT WORTH to ATLANTA
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS FORT WORTH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name...
CREATE TABLE table_name_29 ( points_for VARCHAR, lost VARCHAR )
What is the points when the lost was 11?
SELECT points_for FROM table_name_29 WHERE lost = "11"
CREATE TABLE order_items ( order_id number, product_id number, order_quantity text ) CREATE TABLE addresses ( address_id number, address_content text, city text, zip_postcode text, state_province_county text, country text, other_address_details text ) CREATE TABLE products ( ...
Tell me the number of orders with 'Second time' as order detail.
SELECT COUNT(*) FROM customer_orders WHERE order_details = "Second time"
CREATE TABLE publication_keyword ( kid int, pid int ) CREATE TABLE publication ( abstract varchar, cid int, citation_num int, jid int, pid int, reference_num int, title varchar, year int ) CREATE TABLE domain_author ( aid int, did int ) CREATE TABLE cite ( cited in...
return me the papers after 2000 .
SELECT title FROM publication WHERE year > 2000
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE c...
how many patients had been in the ward 16?
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.wardid = 16)
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
what is the number of patients whose diagnoses long title is 29-30 completed weeks of gestation and lab test category is blood gas?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "29-30 completed weeks of gestation" AND lab."CATEGORY" = "Blood Gas"
CREATE TABLE table_29296103_10 ( runner_up VARCHAR, tournament VARCHAR, champion VARCHAR )
How many runner ups were there for the cologne , germany carpet $75,000 s32/d16 when the champion was matt doyle 1 6, 6 1, 6 2?
SELECT COUNT(runner_up) FROM table_29296103_10 WHERE tournament = "Cologne , Germany Carpet – $75,000 – S32/D16" AND champion = "Matt Doyle 1–6, 6–1, 6–2"
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
provide the number of patients whose diagnoses long title is other preterm infants, 1,250-1,499 grams?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Other preterm infants, 1,250-1,499 grams"
CREATE TABLE table_33148 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Where was the game held when the away team scored 10.12 (72)?
SELECT "Venue" FROM table_33148 WHERE "Away team score" = '10.12 (72)'
CREATE TABLE table_29658 ( "Outcome" text, "Year" real, "Tournament" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text )
Who were Petrova's opponents with Vania King?
SELECT "Opponents" FROM table_29658 WHERE "Partner" = 'Vania King'
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE icustays ( row_id number, s...
how many days has elapsed since the first time during their current hospital visit patient 28443 had received a creatine kinase (ck) lab test?
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', labevents.charttime)) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'creatine kinase (ck)') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28443 AN...
CREATE TABLE table_14984126_1 ( game_site VARCHAR, result VARCHAR )
what's the game site with result being l 24 34
SELECT game_site FROM table_14984126_1 WHERE result = "L 24–34"
CREATE TABLE table_23303 ( "English Name" text, "Chinese Name (Simplified / Traditional)" text, "Pinyin" text, "Population" real, "Post Code" real )
What's the post code of the county with the Chinese name / ?
SELECT MIN("Post Code") FROM table_23303 WHERE "Chinese Name (Simplified / Traditional)" = '潜山县 / 潛山縣'
CREATE TABLE Ref_Incident_Type ( incident_type_code VARCHAR(10), incident_type_description VARCHAR(80) ) CREATE TABLE Behavior_Incident ( incident_id INTEGER, incident_type_code VARCHAR(10), student_id INTEGER, date_incident_start DATETIME, date_incident_end DATETIME, incident_summary V...
What is the number of start dates for incidents with incident type code 'NOISE'? Bin by year and return a bar chart, and I want to order in descending by the Y-axis.
SELECT date_incident_start, COUNT(date_incident_start) FROM Behavior_Incident WHERE incident_type_code = "NOISE" ORDER BY COUNT(date_incident_start) DESC
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
what number of patients have primary disease named sdh and lab test fluid is cerebrospinal fluid (csf)?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "SDH" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
CREATE TABLE table_34974 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text, "Attendance" real )
What is the attendance of the game on week 4?
SELECT "Attendance" FROM table_34974 WHERE "Week" = '4'
CREATE TABLE table_48967 ( "Team #1" text, "Agg." text, "Team #2" text, "1st leg" text, "2nd leg" text )
Which Team #1 had a 2nd leg score of 88-83?
SELECT "Team #1" FROM table_48967 WHERE "2nd leg" = '88-83'
CREATE TABLE table_49289 ( "Winner" text, "Country" text, "Winter Olympics" real, "FIS Nordic World Ski Championships" real, "Holmenkollen" text )
Which country has a FIS Nordic World Ski Championship before 1989, was in the winter Olympics before 1980, and has a Holmenkollen of 1956?
SELECT "Country" FROM table_49289 WHERE "FIS Nordic World Ski Championships" < '1989' AND "Winter Olympics" < '1980' AND "Holmenkollen" = '1956'
CREATE TABLE table_77376 ( "Opposing Team" text, "Against" real, "Date" text, "Venue" text, "Status" text )
Which venue had an against score smaller than 18 when the opposing team was North Auckland?
SELECT "Venue" FROM table_77376 WHERE "Against" < '18' AND "Opposing Team" = 'north auckland'
CREATE TABLE table_name_83 ( pole_position VARCHAR, grand_prix VARCHAR )
What is the Pole Position for the German Grand Prix
SELECT pole_position FROM table_name_83 WHERE grand_prix = "german grand prix"
CREATE TABLE table_79511 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
Who was the Opponent on November 27, 2005?
SELECT "Opponent" FROM table_79511 WHERE "Date" = 'november 27, 2005'
CREATE TABLE table_23249 ( "Rank" real, "Couple" text, "Judges" real, "Public" real, "Total" real, "Vote percentage" text, "Result" text )
When 8 is the public what are the results?
SELECT "Result" FROM table_23249 WHERE "Public" = '8'
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, ...
count the number of times patient 46528 had received an extracran-intracr bypass during the last hospital visit.
SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'extracran-intracr bypass') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 46528 AND NOT admissions.d...
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Comments ( Id number, PostId number, Score num...
Questions from reasonably high-rep users.
SELECT p.Id, p.Title, u.Id, u.Reputation FROM Posts AS p INNER JOIN Users AS u ON p.OwnerUserId = u.Id WHERE u.Reputation > 300
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE procedures_icd ( row_id number, subject_id number, ...
what was the name of a drug patient 89202 was first prescribed until 28 months ago?
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 89202) AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-28 month') ORDER BY prescriptions.startdate LIMIT 1
CREATE TABLE table_name_39 ( pole_position VARCHAR, location VARCHAR )
What was the pole position for jerez?
SELECT pole_position FROM table_name_39 WHERE location = "jerez"
CREATE TABLE table_203_253 ( id number, "model" text, "frame" text, "years mfg'd" text, "caliber(s)" text, "production" text, "barrel" text, "notes" text )
name the models that had the same caliber as the remington beals navy model revolver .
SELECT "model" FROM table_203_253 WHERE "model" <> 'remington-beals navy model revolver' AND "caliber(s)" = (SELECT "caliber(s)" FROM table_203_253 WHERE "model" = 'remington-beals navy model revolver')
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE chartevents ( row_id number, subject_id number, h...
have patient 14467's been normal today in arterial bp [diastolic]?
SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14467)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [dias...
CREATE TABLE table_name_50 ( group_position VARCHAR, result_f_a VARCHAR, date VARCHAR )
Which Group position has Result F A of 0 1 on 1 november 2006?
SELECT group_position FROM table_name_50 WHERE result_f_a = "0–1" AND date = "1 november 2006"
CREATE TABLE table_name_9 ( home VARCHAR, decision VARCHAR, date VARCHAR )
Which home has a Decision of kolzig, and a Date of november 5?
SELECT home FROM table_name_9 WHERE decision = "kolzig" AND date = "november 5"
CREATE TABLE table_79662 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in final" text, "Score" text, "Prize Money" text )
What is the surface for the Volos tournament?
SELECT "Surface" FROM table_79662 WHERE "Tournament" = 'volos'
CREATE TABLE table_34297 ( "Grand Cru" text, "Region" text, "Village" text, "Wine style" text, "Vineyard surface (2010)" text )
Which Village has a Region of C te De Nuits, Wine Styles of Red Wine, and a Grand Cru of Latrici res-Chambertin?
SELECT "Village" FROM table_34297 WHERE "Region" = 'côte de nuits' AND "Wine style" = 'red wine' AND "Grand Cru" = 'latricières-chambertin'
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
what is the gender and procedure long title of subject id 2560?
SELECT demographic.gender, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560"
CREATE TABLE table_name_61 ( stepping VARCHAR, part_number_s_ VARCHAR )
What's the stepping amount for adh4450iaa5do?
SELECT stepping FROM table_name_61 WHERE part_number_s_ = "adh4450iaa5do"
CREATE TABLE company ( company_id number, rank number, company text, headquarters text, main_industry text, sales_billion number, profits_billion number, assets_billion number, market_value number ) CREATE TABLE station_company ( station_id number, company_id number, ran...
Show the manager name for gas stations belonging to the ExxonMobil company.
SELECT T3.manager_name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id = T2.company_id JOIN gas_station AS T3 ON T1.station_id = T3.station_id WHERE T2.company = 'ExxonMobil'
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, ...
on the first icu visit', what was minimum arterial bp [systolic] of patient 17667?
SELECT MIN(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17667) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.itemid ...
CREATE TABLE table_76451 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
What round was it when the method was TKO (would not stand up from Butt Scoot)?
SELECT AVG("Round") FROM table_76451 WHERE "Method" = 'tko (would not stand up from butt scoot)'
CREATE TABLE table_76354 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
Who was the away team against the home team Sheffield United?
SELECT "Away team" FROM table_76354 WHERE "Home team" = 'sheffield united'
CREATE TABLE table_name_43 ( date VARCHAR, record VARCHAR )
What date was the record 21-11?
SELECT date FROM table_name_43 WHERE record = "21-11"
CREATE TABLE table_name_28 ( year INTEGER, winner VARCHAR )
What is the latest year when Phil Anderson won?
SELECT MAX(year) FROM table_name_28 WHERE winner = "phil anderson"
CREATE TABLE table_name_24 ( to_par VARCHAR, score VARCHAR )
What was the to par for the game with a score of 74-69-66=209?
SELECT to_par FROM table_name_24 WHERE score = 74 - 69 - 66 = 209
CREATE TABLE table_name_2 ( date VARCHAR, opponent VARCHAR )
What date was gabriela paz-franco the opponent?
SELECT date FROM table_name_2 WHERE opponent = "gabriela paz-franco"
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semes...
Show me 300 -level courses that are easy .
SELECT DISTINCT course.name, course.number, program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND program_course.course_id = course.course_id AND program_course.workload < 3 ORDER BY program_course.workload
CREATE TABLE table_2072 ( "#" real, "Volume line" text, "Volume title" text, "Creators" text, "Material collected" text, "Publication date" text, "ISBN" text )
Name the umbr of creators for flash of two worlds
SELECT COUNT("Creators") FROM table_2072 WHERE "Volume title" = 'Flash of Two Worlds'
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time...
how much miconazole powder 2% was last prescribed to patient 41132 until 38 months ago dosage?
SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 41132) AND prescriptions.drug = 'miconazole powder 2%' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-38 month') ORDER BY prescriptions.startda...
CREATE TABLE table_25814 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Who did the most high assists during the game played on February 6?
SELECT "High assists" FROM table_25814 WHERE "Date" = 'February 6'
CREATE TABLE table_78871 ( "Team" text, "City" text, "Venue" text, "Capacity" real, "Head Coach" text, "Team Captain" text, "Past Season" text )
What is the Capacity of the Venue of Head Coach Ali Asghar Modir Roosta?
SELECT MAX("Capacity") FROM table_78871 WHERE "Head Coach" = 'ali asghar modir roosta'
CREATE TABLE table_41095 ( "Ship" text, "13.5-inch/1400lb" real, "13.5-inch/1250lb" real, "12-inch" real, "Total" real )
What is the lowest 13.5-inch/1400lb with a 13.5-inch/1250lb of more than 1, and a 12-inch smaller than 8?
SELECT MIN("13.5-inch/1400lb") FROM table_41095 WHERE "13.5-inch/1250lb" > '1' AND "12-inch" < '8'
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TAB...
How many classes across all departments are being offered next semester ?
SELECT COUNT(DISTINCT course_offering.course_id) FROM course_offering, semester WHERE semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
CREATE TABLE table_14634 ( "Team" text, "Manager" text, "Captain" text, "Kit manufacturer" text, "Shirt sponsor" text )
Who is the captain of the manchester city team?
SELECT "Captain" FROM table_14634 WHERE "Team" = 'manchester city'
CREATE TABLE table_70414 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Performance" text )
What was the earliest year in which long jump was performed in the world indoor Championships in 5th position?
SELECT MIN("Year") FROM table_70414 WHERE "Performance" = 'long jump' AND "Competition" = 'world indoor championships' AND "Position" = '5th'
CREATE TABLE table_1099080_1 ( bleeding_time VARCHAR, condition VARCHAR )
What was the bleeding time for the factor x deficiency as seen in amyloid purpura
SELECT bleeding_time FROM table_1099080_1 WHERE condition = "Factor X deficiency as seen in amyloid purpura"
CREATE TABLE table_name_21 ( position VARCHAR, round VARCHAR, nationality VARCHAR )
What is the position of the player from round 2 from Sweden?
SELECT position FROM table_name_21 WHERE round = 2 AND nationality = "sweden"
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
calculate the minimum age of female patients who are aged 20 years or more.
SELECT MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.age >= "20"
CREATE TABLE table_name_21 ( to_par VARCHAR, year_s__won VARCHAR, country VARCHAR, total VARCHAR )
What is the To par of the United States, when the Total was 145, in 2004?
SELECT to_par FROM table_name_21 WHERE country = "united states" AND total = 145 AND year_s__won = "2004"
CREATE TABLE table_37962 ( "Year" real, "Award" text, "Category" text, "Nominee" text, "Result" text )
What was the result for the best musical revival category?
SELECT "Result" FROM table_37962 WHERE "Category" = 'best musical revival'
CREATE TABLE table_37470 ( "Airdate" text, "Celebrities" text, "Rating" real, "Share" real, "18\u201349" text, "Viewers (millions)" real, "Weekly rank" text, "Prod. code" real )
Which rating larger than 5 have the lowest amount of views in #3 rank with a share of 9?
SELECT MIN("Viewers (millions)") FROM table_37470 WHERE "Weekly rank" = '#3' AND "Share" = '9' AND "Rating" > '5'
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
let me know the type of admission and short title of diagnoses for patient with patient id 74032.
SELECT demographic.admission_type, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "74032"
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
what are the five frequently ordered treatments for patients with age 30s?
SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) GROUP BY treatment.treatmentname) AS t1 WHERE t1.c1 <= 5
CREATE TABLE table_name_76 ( machine VARCHAR, rider VARCHAR )
What machine did Keith T. Gawler ride?
SELECT machine FROM table_name_76 WHERE rider = "keith t. gawler"
CREATE TABLE table_name_17 ( national_university_of_ireland VARCHAR, industrial_and_commercial_panel VARCHAR, cultural_and_educational_panel VARCHAR )
What is the total for National University of Ireland with an industrial and commercial panel less than 1, and the cultural and educational panel bigger than 0?
SELECT COUNT(national_university_of_ireland) FROM table_name_17 WHERE industrial_and_commercial_panel < 1 AND cultural_and_educational_panel > 0
CREATE TABLE table_11900773_4 ( paper_type VARCHAR, theme VARCHAR )
What kind of paper were the stamps with the theme duck decoys, barrow's golden eye printed on?
SELECT paper_type FROM table_11900773_4 WHERE theme = "Duck Decoys, Barrow's Golden Eye"
CREATE TABLE table_name_6 ( bronze VARCHAR, nation VARCHAR, total VARCHAR )
How many bronzes have a Nation of jamaica (jam), and a Total smaller than 7?
SELECT COUNT(bronze) FROM table_name_6 WHERE nation = "jamaica (jam)" AND total < 7
CREATE TABLE table_13785 ( "Rank" real, "Athlete" text, "Country" text, "Time" text, "Notes" text )
Which athlete represented the country of egypt?
SELECT "Athlete" FROM table_13785 WHERE "Country" = 'egypt'
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
how many patients are diagnosed with primary disease atrial fibrillation\thoracoscopic maze procedure bilateral/sda and died before 2115?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ATRIAL FIBRILLATION\THORACOSCOPIC MAZE PROCEDURE BILATERAL/SDA" AND demographic.dod_year <= "2115.0"
CREATE TABLE table_22645714_5 ( regular_season_winner VARCHAR, tournament_winner VARCHAR )
Who had the best regular season in the contest won by Arkansas-Pine Bluff?
SELECT regular_season_winner FROM table_22645714_5 WHERE tournament_winner = "Arkansas-Pine Bluff"
CREATE TABLE table_name_23 ( leader_at_the_summit VARCHAR, year VARCHAR )
Who was the leader at the summit for the race in 2005?
SELECT leader_at_the_summit FROM table_name_23 WHERE year = 2005
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
give the number of patients whose primary disease is st-segment elevation myocardial infarction\cardiac cath and drug route is im
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "ST-SEGMENT ELEVATION MYOCARDIAL INFARCTION\CARDIAC CATH" AND prescriptions.route = "IM"
CREATE TABLE table_15491596_1 ( chassis VARCHAR, no VARCHAR )
How many chassis used number 34?
SELECT COUNT(chassis) FROM table_15491596_1 WHERE no = 34
CREATE TABLE table_9310 ( "Player" text, "Team" text, "Matches" real, "Innings" real, "Runs" real, "Average" real, "Highest Score" text, "100s" real )
Which player has less than 2 in the 100s category, more than 4 matches, and an average greater than 42.75?
SELECT "Player" FROM table_9310 WHERE "100s" < '2' AND "Average" > '42.75' AND "Matches" > '4'
CREATE TABLE table_79911 ( "Name" text, "Period" text, "League" real, "FA Cup" real, "League Cup" real, "Other" real, "Total" real )
What is the lowest number of League Cups a player with a 434 league has?
SELECT MIN("League Cup") FROM table_79911 WHERE "League" = '434'
CREATE TABLE table_63442 ( "Rank" real, "Rowers" text, "Country" text, "Time" text, "Notes" text )
What is the rank for the team that had a time of 6:41.45 and note FA?
SELECT SUM("Rank") FROM table_63442 WHERE "Notes" = 'fa' AND "Time" = '6:41.45'
CREATE TABLE table_name_57 ( motor VARCHAR, quantity VARCHAR, class VARCHAR )
Which motor's quantity was more than 8, and a class of bs 1915?
SELECT motor FROM table_name_57 WHERE quantity > 8 AND class = "bs 1915"
CREATE TABLE table_16667 ( "Round" real, "Grand Prix" text, "Date" text, "Location" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Constructor" text, "Report" text )
What is the date of the circuit gilles villeneuve?
SELECT "Date" FROM table_16667 WHERE "Location" = 'Circuit Gilles Villeneuve'
CREATE TABLE table_name_34 ( total_matches INTEGER, competition VARCHAR, draw VARCHAR )
How many average total matches have league cup as the competition, with a draw greater than 0?
SELECT AVG(total_matches) FROM table_name_34 WHERE competition = "league cup" AND draw > 0
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
how many patients whose marital status is divorced and lab test name is cholesterol, hdl?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "DIVORCED" AND lab.label = "Cholesterol, HDL"
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
For those products with a price between 60 and 120, give me the comparison about manufacturer over the name , and show by the names from high to low please.
SELECT Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Name DESC
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number,...
questions closed by mods vs community (all time).
SELECT UserId, UserId AS "user_link", COUNT(PostId) FROM PostHistory WHERE PostHistoryTypeId = 10 GROUP BY UserId
CREATE TABLE department ( Department_ID int, Name text, Creation text, Ranking int, Budget_in_Billions real, Num_Employees real ) CREATE TABLE management ( department_ID int, head_ID int, temporary_acting text ) CREATE TABLE head ( head_ID int, name text, born_state tex...
How many departments are built in each year? Group by creation time in a line chart, and order by the x axis in asc.
SELECT Creation, COUNT(Creation) FROM department GROUP BY Creation ORDER BY Creation
CREATE TABLE table_name_27 ( gdp__ppp__per_capita_2012_eu27_ VARCHAR, _100 VARCHAR, gdp_2012_millions_of_euro VARCHAR )
What is GDP (PPP) Per Capita 2012 EU27 = 100, when GDP 2012 Millions Of Euro is 309,900?
SELECT gdp__ppp__per_capita_2012_eu27_ = _100 FROM table_name_27 WHERE gdp_2012_millions_of_euro = "309,900"
CREATE TABLE table_22597626_17 ( surface VARCHAR, opponents_in_the_final VARCHAR )
What was the surface for the opponents in the final with fitzgerald vilas?
SELECT surface FROM table_22597626_17 WHERE opponents_in_the_final = "Fitzgerald Vilas"
CREATE TABLE table_70111 ( "City of license" text, "Identifier" text, "Frequency" text, "Power" text, "Class" text, "RECNet" text )
Which class has an identifier of CBUA-FM?
SELECT "Class" FROM table_70111 WHERE "Identifier" = 'cbua-fm'
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnon...
Total DTD (Range) 'classroom' in Title.
SELECT Id AS "post_link", CreationDate, Tags, Score, AnswerCount, CommentCount FROM Posts WHERE Posts.Title LIKE '%classroom%' AND CreationDate BETWEEN @StartDate AND @EndDate ORDER BY CreationDate
CREATE TABLE table_name_25 ( crowd INTEGER, away_team VARCHAR )
What was the smallest crowd size for away team st kilda?
SELECT MIN(crowd) FROM table_name_25 WHERE away_team = "st kilda"
CREATE TABLE table_name_22 ( tournament VARCHAR, runner_s__up VARCHAR )
What races were Chi-Chi Rodriguez the runner-up in?
SELECT tournament FROM table_name_22 WHERE runner_s__up = "chi-chi rodriguez"
CREATE TABLE Accounts ( account_id INTEGER, customer_id INTEGER, date_account_opened DATETIME, account_name VARCHAR(50), other_account_details VARCHAR(255) ) CREATE TABLE Orders ( order_id INTEGER, customer_id INTEGER, date_order_placed DATETIME, order_details VARCHAR(255) ) CREATE...
Show the number of accounts for each customer in a bar chart grouping by customer's first name, I want to sort in descending by the bars.
SELECT customer_first_name, COUNT(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY customer_first_name DESC
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number...
has the heartrate of patient 010-9767 ever been greater than 116.0 on 03/01/2105.
SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-9767')) AND vitalperiodic.heartrate > 116.0 AND NOT vitalperiodi...
CREATE TABLE table_5497 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the average total with a nation of thailand with a gold smaller than 17?
SELECT AVG("Total") FROM table_5497 WHERE "Nation" = 'thailand' AND "Gold" < '17'
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
Draw a bar chart of affiliation versus sum enrollment, and I want to display y axis from low to high order please.
SELECT Affiliation, SUM(Enrollment) FROM university GROUP BY Affiliation ORDER BY SUM(Enrollment)
CREATE TABLE table_26358264_2 ( location VARCHAR, fastest_qualifying VARCHAR )
When cancelled is the fastest qualifying where is the location?
SELECT location FROM table_26358264_2 WHERE fastest_qualifying = "Cancelled"
CREATE TABLE table_name_49 ( home_team VARCHAR, venue VARCHAR )
What is the home team's score at mcg?
SELECT home_team AS score FROM table_name_49 WHERE venue = "mcg"
CREATE TABLE table_69434 ( "School" text, "Location" text, "Mascot" text, "# / County" text, "IHSAA Class" text, "Year Joined" real, "Previous Conference" text )
what is the correct year for # / county of 09 cass?
SELECT "Year Joined" FROM table_69434 WHERE "# / County" = '09 cass'
CREATE TABLE table_38694 ( "Career Card" text, "Starting career/salary" text, "2nd career/salary" text, "3rd career/salary" text, "4th career/salary" text, "5th career/salary" text, "6th career/salary" text )
5th career/salary of restaurant manager ($250,000) had what 2nd career/salary?
SELECT "2nd career/salary" FROM table_38694 WHERE "5th career/salary" = 'restaurant manager ($250,000)'
CREATE TABLE Projects ( project_id VARCHAR, project_details VARCHAR ) CREATE TABLE Project_outcomes ( outcome_code VARCHAR, project_id VARCHAR ) CREATE TABLE Research_outcomes ( outcome_description VARCHAR, outcome_code VARCHAR )
What are the result description of the project whose detail is 'sint'?
SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint'
CREATE TABLE table_name_58 ( result VARCHAR, competition VARCHAR )
What was the result from the 2000 asian cup qualification?
SELECT result FROM table_name_58 WHERE competition = "2000 asian cup qualification"
CREATE TABLE table_name_62 ( city_of_license VARCHAR, frequency_mhz INTEGER )
What city has larger than 94.1 as a frequency?
SELECT city_of_license FROM table_name_62 WHERE frequency_mhz > 94.1
CREATE TABLE table_204_302 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
who is ranked # 1 ?
SELECT "nation" FROM table_204_302 WHERE "rank" = 1
CREATE TABLE table_38191 ( "Year (Ceremony)" text, "Film title" text, "Language(s)" text, "Director" text, "Result" text )
What was the result for the fil Paljas?
SELECT "Result" FROM table_38191 WHERE "Film title" = 'paljas'
CREATE TABLE table_11649123_1 ( disaster VARCHAR, year VARCHAR )
In 2005-06 what was the disaster?
SELECT disaster FROM table_11649123_1 WHERE year = "2005-06"