table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
CREATE TABLE table_name_60 ( jushin_liger VARCHAR, gran_hamada VARCHAR )
Which Jushin Liger has a Gran Hamada of kendo kashin?
SELECT jushin_liger FROM table_name_60 WHERE gran_hamada = "kendo kashin"
CREATE TABLE table_60251 ( "Name" text, "Volume" text, "Engine" text, "Fuel" text, "Output" text, "Torque" text, "Engine ID code(s)" text, "0\u2013100km/h,s" real, "Top speed" text, "Years" text )
What engine has an output of ps (kw; hp) @4700 rpm?
SELECT "Engine" FROM table_60251 WHERE "Output" = 'ps (kw; hp) @4700 rpm'
CREATE TABLE table_31014 ( "Rnd" text, "Circuit" text, "AP Winning Team" text, "BP Winning Team" text, "CM Winning Team" text, "CP Winning Team" text, "DM Winning Team" text, "DP Winning Team" text, "EM Winning Team" text, "EP Winning Team" text, "FM Winning Team" text, "...
Who was the HP winning team when the EP winning team was Hans Zereis and the GM winning team was Charles Gibson?
SELECT "HP Winning Team" FROM table_31014 WHERE "EP Winning Team" = 'Hans Zereis' AND "GM Winning Team" = 'Charles Gibson'
CREATE TABLE table_name_7 ( extra_points INTEGER, player VARCHAR, touchdowns VARCHAR )
What mean number of extra points was there when James Lawrence was a player and the touchdown number was less than 1?
SELECT AVG(extra_points) FROM table_name_7 WHERE player = "james lawrence" AND touchdowns < 1
CREATE TABLE table_203_305 ( id number, "round" number, "#" number, "player" text, "nationality" text, "college/junior/club team (league)" text )
who is the only player to have denmark listed as their nationality ?
SELECT "player" FROM table_203_305 WHERE "nationality" = 'denmark'
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
count the number of dead patients who were diagnosed with noninf gastroenterit nec.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.short_title = "Noninf gastroenterit NEC"
CREATE TABLE table_28138035_26 ( year_location VARCHAR, womens_singles VARCHAR )
What year and where was the tournament when fan ying won the womens singles?
SELECT year_location FROM table_28138035_26 WHERE womens_singles = "Fan Ying"
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NA...
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of phone_number and employee_id , show X-axis in desc order please.
SELECT PHONE_NUMBER, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER DESC
CREATE TABLE table_name_24 ( label VARCHAR, album VARCHAR )
What label shows an Album of cover version v?
SELECT label FROM table_name_24 WHERE album = "cover version v"
CREATE TABLE table_name_7 ( genre VARCHAR, title VARCHAR )
What genre was Music in the Air?
SELECT genre FROM table_name_7 WHERE title = "music in the air"
CREATE TABLE table_23740 ( "County" text, "Obama%" text, "Obama#" real, "McCain%" text, "McCain#" real )
In how many counties di McCain win 41.62% of the vote?
SELECT COUNT("County") FROM table_23740 WHERE "McCain%" = '41.62%'
CREATE TABLE table_11206916_2 ( date_of_appointment VARCHAR, outgoing_manager VARCHAR )
What is the date of appointment for outgoing manager Campbell Money
SELECT date_of_appointment FROM table_11206916_2 WHERE outgoing_manager = "Campbell Money"
CREATE TABLE table_1808 ( "Year" real, "Lok Sabha" text, "Members of Parliament" text, "Party Won" text, "Winners % votes" text, "Trailing Party" text, "Trailing Party % votes" text )
What year was the winners vote 55.99%?
SELECT MIN("Year") FROM table_1808 WHERE "Winners % votes" = '55.99%'
CREATE TABLE table_name_73 ( points INTEGER, losses VARCHAR, position VARCHAR )
What is the lowest number of points of the team with 2 losses and a lower than 1 position?
SELECT MIN(points) FROM table_name_73 WHERE losses = 2 AND position > 1
CREATE TABLE table_57966 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the away team's score when the Home team score is 14.18 (102)?
SELECT "Away team score" FROM table_57966 WHERE "Home team score" = '14.18 (102)'
CREATE TABLE table_204_966 ( id number, "region" text, "date" text, "label" text, "format" text, "catalog" text )
what label was italy on ?
SELECT "label" FROM table_204_966 WHERE "region" = 'italy'
CREATE TABLE table_65762 ( "Name" text, "Nationality" text, "4.30" text, "4.45" text, "4.55" text, "Result" real )
What national has 4.45 for o and 4.55 for xo?
SELECT "Nationality" FROM table_65762 WHERE "4.45" = 'o' AND "4.55" = 'xo'
CREATE TABLE people ( people_id number, name text, height number, weight number, date_of_birth text ) CREATE TABLE entrepreneur ( entrepreneur_id number, people_id number, company text, money_requested number, investor text )
Return the average money requested across all entrepreneurs.
SELECT AVG(money_requested) FROM entrepreneur
CREATE TABLE table_28157 ( "Graphics" text, "Launch" real, "Market" text, "CPU" text, "Code name" text, "Device ID" real, "Core clock ( MHz )" text, "Execution units" real, "Shader model" text, "DirectX" text, "OpenGL" text, "OpenCL" text, "Memory bandwidth ( GB/s )" ...
What core clocks ( mhz ) have a 21.3 memory bandwidth ( gb/s )?
SELECT "Core clock ( MHz )" FROM table_28157 WHERE "Memory bandwidth ( GB/s )" = '21.3'
CREATE TABLE table_31012 ( "Rnd" text, "Circuit" text, "AP Winning Team" text, "BP Winning Team" text, "CM Winning Team" text, "CP Winning Team" text, "DM Winning Team" text, "DP Winning Team" text, "EM Winning Team" text, "EP Winning Team" text, "FM Winning Team" text, "...
Who the GM winning team when the EP winning team was #37 Porsche?
SELECT "GM Winning Team" FROM table_31012 WHERE "EP Winning Team" = '#37 Porsche'
CREATE TABLE table_name_57 ( position VARCHAR, b_score VARCHAR, gymnast VARCHAR )
What is their position when the b score is more than 8.975 for Ekaterina Kramarenko ( rus )?
SELECT position FROM table_name_57 WHERE b_score > 8.975 AND gymnast = "ekaterina kramarenko ( rus )"
CREATE TABLE table_train_157 ( "id" int, "gender" string, "systolic_blood_pressure_sbp" int, "hemoglobin_a1c_hba1c" float, "platelets" int, "renal_disease" bool, "c_reactive_protein" float, "creatinine_clearance_cl" float, "urine_protein" int, "serum_creatinine" float, "prote...
known renal disease with a baseline serum creatinine > 1.5 mg / dl
SELECT * FROM table_train_157 WHERE renal_disease = 1 AND serum_creatinine > 1.5
CREATE TABLE election ( Date VARCHAR, Vote_Percent VARCHAR )
List the dates and vote percents of elections.
SELECT Date, Vote_Percent FROM election
CREATE TABLE table_204_123 ( id number, "week" number, "date" text, "kickoff" text, "opponent" text, "results\nfinal score" text, "results\nteam record" text, "game site" text, "attendance" number )
which date had the least attendance ?
SELECT "date" FROM table_204_123 ORDER BY "attendance" LIMIT 1
CREATE TABLE table_2319 ( "School" text, "Location(s)" text, "Control" text, "Type" text, "Enrollment" real, "Founded" real )
What enrollement would you expect if you were attending the university in St. Louis?
SELECT "Enrollment" FROM table_2319 WHERE "Location(s)" = 'St. Louis'
CREATE TABLE table_203_186 ( id number, "painter" text, "composition" number, "drawing" number, "color" number, "expression" number )
what is the total number of painters who scored 12 in composition ?
SELECT COUNT("painter") FROM table_203_186 WHERE "composition" = 12
CREATE TABLE table_29728596_2 ( away_team VARCHAR, competition VARCHAR, home_team VARCHAR )
Who were the away teams when the competition was the 1st republic of srpska football day and the home team was u 14 republic of srpska?
SELECT away_team FROM table_29728596_2 WHERE competition = "1st ``Republic of Srpska Football Day``" AND home_team = "U 14 Republic of Srpska"
CREATE TABLE table_name_32 ( chassis VARCHAR, year VARCHAR, entrant VARCHAR )
Which chassis did fondmetal f1 spa use after 1990?
SELECT chassis FROM table_name_32 WHERE year > 1990 AND entrant = "fondmetal f1 spa"
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number...
what is the number of patients who are in ward 650 until 2104?
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.wardid = 650 AND STRFTIME('%y', patient.unitadmittime) <= '2104'
CREATE TABLE table_10194 ( "Date" text, "Course" text, "Distance" text, "Type" text, "Winner" text )
How far is the olbia to sassari route?
SELECT "Distance" FROM table_10194 WHERE "Course" = 'olbia to sassari'
CREATE TABLE table_4377 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
What competition was held 1 March 1909?
SELECT "Competition" FROM table_4377 WHERE "Date" = '1 march 1909'
CREATE TABLE table_204_882 ( id number, "number" number, "builder" text, "entered service" text, "withdrawn" text, "notes" text )
can you find the top entered service ?
SELECT "entered service" FROM table_204_882 WHERE id = 1
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
provide the number of patients whose ethnicity is black/cape verdean and age is less than 68?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.age < "68"
CREATE TABLE table_80361 ( "Tournament" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
Name the 2011 when 2010 is 2r
SELECT "2011" FROM table_80361 WHERE "2010" = '2r'
CREATE TABLE table_2468961_4 ( title VARCHAR, no_in_series VARCHAR )
What was the title of series number 56?
SELECT title FROM table_2468961_4 WHERE no_in_series = 56
CREATE TABLE table_9055 ( "Outcome" text, "Date" real, "Championship" text, "Surface" text, "Opponent" text, "Score" text )
What was the championship during the match with the opponent of richard fromberg?
SELECT "Championship" FROM table_9055 WHERE "Opponent" = 'richard fromberg'
CREATE TABLE table_68346 ( "Rank" real, "Team" text, "Country" text, "Value ($M)" real, "Debt as % of value" real, "% change on year" text, "Revenue ($M)" real, "Operating income ($m)" real )
Name the most revenue for operating income more than 27 for hamburg and debt as % of value less than 0
SELECT MAX("Revenue ($M)") FROM table_68346 WHERE "Operating income ($m)" > '27' AND "Team" = 'hamburg' AND "Debt as % of value" < '0'
CREATE TABLE table_9742 ( "Game" text, "Date" text, "Home Team" text, "Result" text, "Road Team" text )
What is the result for game 5?
SELECT "Result" FROM table_9742 WHERE "Game" = 'game 5'
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time,...
count the number of patients who were diagnosed with oth nonauto hem anemia and did not come back to the hospital within 2 months in 2103.
SELECT (SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'oth nonaut...
CREATE TABLE table_65693 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "IHSAA Football Class" text, "County" text )
What school has the Lancers as their mascot?
SELECT "Location" FROM table_65693 WHERE "Mascot" = 'lancers'
CREATE TABLE table_60420 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What was the tie number for the game with an away team of Hartlepool United?
SELECT "Tie no" FROM table_60420 WHERE "Away team" = 'hartlepool united'
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, ...
count the number of patients who had received vitamin k within 2 months after being diagnosed with bone fracture(s) - left lower extremity until 3 years ago.
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bone fracture(s) - left lower extremity' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '...
CREATE TABLE table_name_92 ( round VARCHAR, race VARCHAR )
What is the round for the Int. Adac-Preis Der Tourenwagen Von Sachsen-Anhalt?
SELECT round FROM table_name_92 WHERE race = "int. adac-preis der tourenwagen von sachsen-anhalt"
CREATE TABLE table_203_606 ( id number, "region" text, "rnd" number, "host" text, "venue" text, "city" text, "state" text )
total number of venues that hosted first and second round games .
SELECT COUNT("venue") FROM table_203_606 WHERE "rnd" = 1 OR "rnd" = 2
CREATE TABLE table_54219 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
Which constructor has laps less than 100 and a time/retired +10 laps?
SELECT "Constructor" FROM table_54219 WHERE "Laps" < '100' AND "Time/Retired" = '+10 laps'
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugsto...
what was the first time that patient 003-83 had an intake since 995 days ago?
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-83')) AND intakeoutput.cellpath LIKE '%intake%' A...
CREATE TABLE table_22083044_2 ( winning_team VARCHAR, circuit VARCHAR, fastest_lap VARCHAR )
What was the winning team where Tim Macrow won the fastest lap on Queensland Raceway circuit?
SELECT winning_team FROM table_22083044_2 WHERE circuit = "Queensland Raceway" AND fastest_lap = "Tim Macrow"
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...
since 3 years ago, count the number of drugs that patient 19428 had been prescribed.
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19428) AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-3 year')
CREATE TABLE table_57614 ( "Serial Title" text, "Year" text, "Chapters" text, "Director" text, "Cast" text )
Tell me the cast for b. reeves eason and joseph kane
SELECT "Cast" FROM table_57614 WHERE "Director" = 'b. reeves eason and joseph kane'
CREATE TABLE table_76555 ( "Date" text, "Captain 1" text, "Team 2" text, "Captain 2" text, "Venue" text, "Result" text )
Which Captain 2 has a Result of final?
SELECT "Captain 2" FROM table_76555 WHERE "Result" = 'final'
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number...
when was the last time patient 85895 was prescribed a drug the previous month?
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 85895) AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') ORDER BY prescriptions.startdate DESC LIMIT 1
CREATE TABLE table_33986 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
What was the record on April 1?
SELECT "Record" FROM table_33986 WHERE "Date" = 'april 1'
CREATE TABLE table_name_29 ( entered_service VARCHAR, serial_no VARCHAR )
What is the entered service date for serial number 85-1222?
SELECT entered_service FROM table_name_29 WHERE serial_no = "85-1222"
CREATE TABLE table_21515673_2 ( rr1_pts VARCHAR, team_name VARCHAR )
How many points does Swedish America's Cup Challenge have for rr1?
SELECT COUNT(rr1_pts) FROM table_21515673_2 WHERE team_name = "Swedish America's Cup Challenge"
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE comment_instructor ( instructor_id int, ...
Who is teaching PreMajor classes in the Winter term ?
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instr...
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS va...
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of job_id and commission_pct , and list by the JOB_ID in asc.
SELECT JOB_ID, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY JOB_ID
CREATE TABLE table_name_24 ( lowest INTEGER, average INTEGER )
What is the lowest attendance for a stadium that has an average smaller than 307?
SELECT AVG(lowest) FROM table_name_24 WHERE average < 307
CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER )
How many people are under 40 for each gender Plot them as bar chart, list x axis in asc order.
SELECT gender, COUNT(*) FROM Person WHERE age < 40 GROUP BY gender ORDER BY gender
CREATE TABLE table_22883210_11 ( high_assists VARCHAR, series VARCHAR )
When 0-1 is the series who has the highest amount of assists?
SELECT high_assists FROM table_22883210_11 WHERE series = "0-1"
CREATE TABLE enroll ( class_code text, stu_num number, enroll_grade text ) CREATE TABLE employee ( emp_num number, emp_lname text, emp_fname text, emp_initial text, emp_jobcode text, emp_hiredate time, emp_dob time ) CREATE TABLE professor ( emp_num number, dept_code te...
What are the first names of all students taking accoutning and Computer Information Systems classes?
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN class AS T3 ON T2.class_code = T3.class_code JOIN course AS T4 ON T3.crs_code = T4.crs_code JOIN department AS T5 ON T5.dept_code = T4.dept_code WHERE T5.dept_name = 'Accounting' INTERSECT SELECT T1.stu_fname FROM student AS T1 JOI...
CREATE TABLE table_203_43 ( id number, "polling firm" text, "month" text, "link" text, "favor" number, "oppose" number )
how many months had more than 55 favor votes ?
SELECT COUNT("month") FROM table_203_43 WHERE "favor" > 55
CREATE TABLE table_78401 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the score for south melbourne at home?
SELECT "Home team score" FROM table_78401 WHERE "Home team" = 'south melbourne'
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
Tell me the time of admission and primary disease for the patient with patient id 53707.
SELECT demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.subject_id = "53707"
CREATE TABLE table_test_24 ( "id" int, "history_of_bleeding_diathesis" bool, "bleeding" int, "systolic_blood_pressure_sbp" int, "hemoglobin_a1c_hba1c" float, "blood_draw" bool, "renal_disease" bool, "allergy_to_aspirin" bool, "allergy_to_clopidogrel" bool, "cardiogenic_shock" boo...
previous gastrointestinal bleeding within 6 months, bleeding diathesis, platelet count < 100000 / mm3 or hemoglobin < 10 g / dl
SELECT * FROM table_test_24 WHERE gastrointestinal_disease = 1 OR bleeding = 1 OR platelet_count < 100000 OR hemoglobin_a1c_hba1c < 10
CREATE TABLE table_204_971 ( id number, "m" number, "date" text, "tournament" text, "round" text, "ground" text, "opponent" text, "score" text, "attendance" number, "dinamo scorers" text, "report" text )
how many games were attended by at least 8,000 people ?
SELECT COUNT(*) FROM table_204_971 WHERE "attendance" >= 8000
CREATE TABLE region ( Region_id int, Region_code text, Region_name text ) CREATE TABLE storm ( Storm_ID int, Name text, Dates_active text, Max_speed int, Damage_millions_USD real, Number_Deaths int ) CREATE TABLE affected_region ( Region_id int, Storm_ID int, Number_cit...
For all storms with at least 1 death, compare the total number of deaths by dates_active attribute, sort by the names from low to high.
SELECT Dates_active, Number_Deaths FROM storm WHERE Number_Deaths >= 1 ORDER BY Dates_active
CREATE TABLE table_68512 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" real )
Name the most time for katrin mei ner and rank less than 5
SELECT MAX("Time") FROM table_68512 WHERE "Name" = 'katrin meißner' AND "Rank" < '5'
CREATE TABLE table_26368963_1 ( under_13 VARCHAR, year VARCHAR )
In the year 2009 who was the under-13?
SELECT under_13 FROM table_26368963_1 WHERE year = 2009
CREATE TABLE table_name_4 ( horizontal_bar INTEGER, country VARCHAR, rings VARCHAR )
Name the highest Horizontal Bar which is in france and Rings smaller than 58.975?
SELECT MAX(horizontal_bar) FROM table_name_4 WHERE country = "france" AND rings < 58.975
CREATE TABLE table_name_74 ( county VARCHAR, geo_id VARCHAR, latitude VARCHAR, ansi_code VARCHAR )
what is the county when the latitude is more than 48.581299, ansi code is more than 1037103 and the geo id is 3801985060?
SELECT county FROM table_name_74 WHERE latitude > 48.581299 AND ansi_code > 1037103 AND geo_id = 3801985060
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE ReviewTaskResultTypes ( Id number, Na...
Recent bounties with a given tag.
SELECT p.Id AS "post_link", p.Score AS "Score", p.AnswerCount AS "Answers", bs.BountyAmount AS "Amount", p.Tags, CAST(TIME_TO_STR(bs.CreationDate, '%Y-%m-%d %H:%M:%S') AS TEXT(10)) AS "Bounty Start" FROM Posts AS p INNER JOIN Votes AS bs ON p.Id = bs.PostId AND bs.VoteTypeId = 8 AND p.Tags LIKE '%<##Tagname##>%' ORDER ...
CREATE TABLE climber ( Climber_ID int, Name text, Country text, Time text, Points real, Mountain_ID int ) CREATE TABLE mountain ( Mountain_ID int, Name text, Height real, Prominence real, Range text, Country text )
Show the names of climbers and the heights of mountains they climb Show bar chart, and display in desc by the bars please.
SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T1.Name DESC
CREATE TABLE table_name_69 ( total INTEGER, to_par VARCHAR, player VARCHAR )
How many strokes for arnold palmer with a to par of greater than 9?
SELECT AVG(total) FROM table_name_69 WHERE to_par > 9 AND player = "arnold palmer"
CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, applica...
what is a flight that goes from BALTIMORE to SAN FRANCISCO and arrives at SAN FRANCISCO at 2000 on a FRIDAY
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, days, flight WHERE ((((((flight.arrival_time < 41 OR flight.time_elapsed >= 60) AND flight.departure_time > flight.arrival_time) AND days.day_name = 'THURSDAY' AND flight.fli...
CREATE TABLE table_73703 ( "Name" text, "Nation" text, "Seasons" text, "Championship titles" text, "Races (Starts)" text, "Poles" real, "Wins" real, "Podiums" real, "Fastest Laps" real, "Points (Dropped points)" text )
What were the starts when the points dropped 18?
SELECT "Races (Starts)" FROM table_73703 WHERE "Points (Dropped points)" = '18'
CREATE TABLE table_1341568_14 ( opponent VARCHAR, incumbent VARCHAR )
Who was Henry Hyde's opponent in the race?
SELECT opponent FROM table_1341568_14 WHERE incumbent = "Henry Hyde"
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 about the distribution of All_Road and School_ID , order by the Y-axis from low to high please.
SELECT All_Road, School_ID FROM basketball_match ORDER BY School_ID
CREATE TABLE field ( fieldid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE paperda...
which papers used NELL ?
SELECT DISTINCT paper.paperid FROM dataset, paper, paperdataset WHERE dataset.datasetname = 'NELL' AND paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid
CREATE TABLE table_name_47 ( tournament VARCHAR, runner_s__up VARCHAR )
Which tournament has a Runner(s)-up of Gary McCord?
SELECT tournament FROM table_name_47 WHERE runner_s__up = "gary mccord"
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodi...
when did patient 021-221706 come to the hospital for the last time until 4 years ago via an floor?
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '021-221706' AND patient.hospitaladmitsource = 'floor' AND DATETIME(patient.hospitaladmittime) <= DATETIME(CURRENT_TIME(), '-4 year') ORDER BY patient.hospitaladmittime DESC LIMIT 1
CREATE TABLE table_22993636_2 ( overall_record VARCHAR, road_record VARCHAR )
What's the overall record of the team with 4-3 road record?
SELECT overall_record FROM table_22993636_2 WHERE road_record = "4-3"
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, t...
Which person teaches the easiest course in regards to ULCS ?
SELECT DISTINCT instructor.name, program_course.workload FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN program_course ON program_course.course_id = cour...
CREATE TABLE table_54042 ( "Driver" text, "Entrant" text, "Constructor" text, "Chassis" text, "Engine" text, "Tyre" text )
who is the constructor when the tyre is d, the engine is talbot 23cv 4.5 l6, the chassis is talbot-lago t26c and the entrant is ecurie belge?
SELECT "Constructor" FROM table_54042 WHERE "Tyre" = 'd' AND "Engine" = 'talbot 23cv 4.5 l6' AND "Chassis" = 'talbot-lago t26c' AND "Entrant" = 'ecurie belge'
CREATE TABLE table_47828 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real )
What is Place, when To Par is '5', and when Score is '72-73=145'?
SELECT "Place" FROM table_47828 WHERE "To par" = '5' AND "Score" = '72-73=145'
CREATE TABLE table_67462 ( "Minister" text, "Party" text, "Governments" text, "Term start" text, "Term end" text )
When is the term end of Shlomo-Yisrael Ben-Meir of the National Religious Party?
SELECT "Term end" FROM table_67462 WHERE "Party" = 'national religious party' AND "Minister" = 'shlomo-yisrael ben-meir'
CREATE TABLE editor ( Name VARCHAR, Age VARCHAR )
List the names of editors in ascending order of age.
SELECT Name FROM editor ORDER BY Age
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TAB...
what was the last time that patient 009-13409 was prescribed for a drug until 48 months ago?
SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-13409')) AND DATETIME(medication.drugstarttime) <= DATETIM...
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's the minimum cost of a hospital that includes a cortisol lab test until 4 years ago?
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'cortisol')) AND DATETIME(cost.chargetime) <= DATETIME(CURRENT_TIME()...
CREATE TABLE Ref_Budget_Codes ( Budget_Type_Code CHAR(15), Budget_Type_Description VARCHAR(255) ) CREATE TABLE Projects ( Project_ID INTEGER, Project_Details VARCHAR(255) ) CREATE TABLE Documents ( Document_ID INTEGER, Document_Type_Code CHAR(15), Project_ID INTEGER, Document_Date DATE...
What are the different budget type codes, and how many documents are there for each. Show a pie chart.
SELECT Budget_Type_Code, COUNT(*) FROM Documents_with_Expenses GROUP BY Budget_Type_Code
CREATE TABLE table_31969 ( "Heat Rank" real, "Lane" real, "Swimmer" text, "Country" text, "Time" real, "Overall Rank" text )
In heat rank 7, what is the sum of lanes?
SELECT SUM("Lane") FROM table_31969 WHERE "Heat Rank" = '7'
CREATE TABLE table_51037 ( "Date" text, "Series" text, "Circuit" text, "City / State" text, "Winner" text, "Team" text )
What is the city/state of the circuit where Russell Ingall Larry Perkins was the winner?
SELECT "City / State" FROM table_51037 WHERE "Winner" = 'russell ingall larry perkins'
CREATE TABLE table_143352_1 ( construction_started INTEGER, net_mwe VARCHAR )
When did construction start on the Power station with a net MWE of 1190
SELECT MIN(construction_started) FROM table_143352_1 WHERE net_mwe = 1190
CREATE TABLE table_26866233_1 ( director VARCHAR, series__number VARCHAR )
Who are the directors of the episode in series # 54?
SELECT director FROM table_26866233_1 WHERE series__number = 54
CREATE TABLE table_71546 ( "Date" text, "Winner" text, "Score" text, "Location" text, "Series" text )
What is the Location, when the Score is 38-29?
SELECT "Location" FROM table_71546 WHERE "Score" = '38-29'
CREATE TABLE table_name_79 ( week VARCHAR, host_team VARCHAR )
Which week did the Baltimore Ravens play at home ?
SELECT week FROM table_name_79 WHERE host_team = "baltimore ravens"
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE airline ( ...
please show me all airlines with SUNDAY flights from PHILADELPHIA to DENVER
SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND days.day_name = 'SUNDAY' AND flight.flight_days = days.day...
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 ) ...
what is the number of patients whose primary disease is brain mass;intracranial hemorrhage and procedure icd9 code is 8856?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" AND procedures.icd9_code = "8856"
CREATE TABLE table_name_62 ( record VARCHAR, attendance VARCHAR )
Which Record has an Attendance of 24,597?
SELECT record FROM table_name_62 WHERE attendance = "24,597"
CREATE TABLE table_62596 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text )
Who had a finish of t15?
SELECT "Player" FROM table_62596 WHERE "Finish" = 't15'
CREATE TABLE table_62642 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog number" text, "Lyrics" text )
In what language is the Lyrics of the release on August 10, 2005 with Catalog number of TOCP-66427?
SELECT "Lyrics" FROM table_62642 WHERE "Date" = 'august 10, 2005' AND "Catalog number" = 'tocp-66427'