instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Who was ashley sampi's opponent? | CREATE TABLE table_name_71 (opponent VARCHAR,player VARCHAR) | SELECT opponent FROM table_name_71 WHERE player = "ashley sampi" |
when patient 006-105495 had intake for the first time on this month/28? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE patient (uniquepid text,patienthealthsystemsta... | 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 = '006-105495')) AND intakeoutput.cellpath LIKE '%intake... |
When did the length of 60 minutes air? | CREATE TABLE table_15117 ("Title" text,"Length" text,"Writer" text,"Director" text,"Airdate" text) | SELECT "Airdate" FROM table_15117 WHERE "Length" = '60 minutes' |
which three teams have been playing for the most seasons ? | CREATE TABLE table_204_506 (id number,"seasons" number,"team" text,"ch.wins" number,"promotions" number,"relegations" number) | SELECT "team" FROM table_204_506 WHERE "seasons" = (SELECT MAX("seasons") FROM table_204_506) |
what was the name of procedure, that patient 51698 was first received during this year? | 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 inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 51698) AND DATETIME(procedures_icd.charttime, 'start of year') = DAT... |
What player came from Cornell University (NCAA)? | CREATE TABLE table_74346 ("Pick #" real,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text) | SELECT "Player" FROM table_74346 WHERE "College/junior/club team" = 'Cornell University (NCAA)' |
What was the record for the date of June 14? | CREATE TABLE table_name_84 (record VARCHAR,date VARCHAR) | SELECT record FROM table_name_84 WHERE date = "june 14" |
What are all role codes? | CREATE TABLE ROLES (role_code VARCHAR) | SELECT role_code FROM ROLES |
The person who had $126,796 WSOP earnings had how many WSOP cashes? | CREATE TABLE table_26277 ("Name" text,"Starting chip count" real,"WSOP bracelets" real,"WSOP cashes" real,"WSOP earnings" text,"Final place" text,"Prize" text) | SELECT "WSOP cashes" FROM table_26277 WHERE "WSOP earnings" = '$126,796' |
Name the finish for patani | CREATE TABLE table_21178 ("Cycle no." text,"Air dates" text,"Reward" text,"Immunity" text,"Eliminated" text,"Vote" text,"Finish" text) | SELECT "Finish" FROM table_21178 WHERE "Eliminated" = 'Patani' |
Who were the co-drivers of the vehicle that had both a Class position and position of 7th? | CREATE TABLE table_62622 ("Year" real,"Team" text,"Co-Drivers" text,"Class" text,"Laps" real,"Pos." text,"Class Pos." text) | SELECT "Co-Drivers" FROM table_62622 WHERE "Class Pos." = '7th' AND "Pos." = '7th' |
What is the score in the touranament of Antalya-Belek? | CREATE TABLE table_name_66 (score VARCHAR,tournament VARCHAR) | SELECT score FROM table_name_66 WHERE tournament = "antalya-belek" |
The Home team of Sydney had which ground? | CREATE TABLE table_name_1 (ground VARCHAR,home_team VARCHAR) | SELECT ground FROM table_name_1 WHERE home_team = "sydney" |
Find the number of reviews. | CREATE TABLE useracct (u_id number,name text)CREATE TABLE trust (source_u_id number,target_u_id number,trust number)CREATE TABLE item (i_id number,title text)CREATE TABLE review (a_id number,u_id number,i_id number,rating number,rank number) | SELECT COUNT(*) FROM review |
What is the score for the match where the opponent in the final was james cerretani todd perry? | CREATE TABLE table_name_5 (score VARCHAR,opponents_in_the_final VARCHAR) | SELECT score FROM table_name_5 WHERE opponents_in_the_final = "james cerretani todd perry" |
among patients who have been prescribed buffered lidocaine 1%, what are the four most commonly prescribed drugs at the same time during this year? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,syst... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'buffered lidocaine 1%' AND DATETIME(medication.drug... |
What's the event that happened in Gander, Newfoundland and Labrador with Randy Ferbey runner-up? | CREATE TABLE table_name_91 (event VARCHAR,runner_up_skip VARCHAR,location VARCHAR) | SELECT event FROM table_name_91 WHERE runner_up_skip = "randy ferbey" AND location = "gander, newfoundland and labrador" |
Is drawing tablet support part of the semi-DDM class? | CREATE TABLE table_1153898_1 (semi_ddm_class VARCHAR,comparisons VARCHAR) | SELECT semi_ddm_class FROM table_1153898_1 WHERE comparisons = "Drawing Tablet Support" |
Who was the producer for the film 'Strange Little Girls'? | CREATE TABLE table_name_20 (producer_s_ VARCHAR,film VARCHAR) | SELECT producer_s_ FROM table_name_20 WHERE film = "strange little girls" |
What Catalog came out on August 20, 1965? | CREATE TABLE table_64151 ("Date" text,"Label" text,"Format" text,"Country" text,"Catalog" text) | SELECT "Catalog" FROM table_64151 WHERE "Date" = 'august 20, 1965' |
Name the year for open cup did not qualify and national final | CREATE TABLE table_27750 ("Year" real,"Division" real,"League" text,"Regular Season" text,"Playoffs" text,"Open Cup" text) | SELECT COUNT("Year") FROM table_27750 WHERE "Open Cup" = 'Did not qualify' AND "Playoffs" = 'National Final' |
What is the highest value for col(m) when prominence(m) is 3755? | CREATE TABLE table_18946749_4 (col__m_ INTEGER,prominence__m_ VARCHAR) | SELECT MAX(col__m_) FROM table_18946749_4 WHERE prominence__m_ = 3755 |
which month were the most games played in ? | CREATE TABLE table_203_368 (id number,"date" text,"opponent" text,"venue" text,"result" text) | SELECT "date" FROM table_203_368 GROUP BY "date" ORDER BY COUNT("opponent") DESC LIMIT 1 |
What year did Martina Navratilova win Wimbledon? | CREATE TABLE table_73243 ("Player" text,"Australian Open" real,"French Open" real,"Wimbledon" real,"US Open" real) | SELECT "Wimbledon" FROM table_73243 WHERE "Player" = 'Martina Navratilova' |
What was the aggregate for the match with Sierra Leone as team 1? | CREATE TABLE table_name_28 (agg VARCHAR,team_1 VARCHAR) | SELECT agg FROM table_name_28 WHERE team_1 = "sierra leone" |
What round did the match go to when tko (cut) was the method? | CREATE TABLE table_name_24 (round VARCHAR,method VARCHAR) | SELECT round FROM table_name_24 WHERE method = "tko (cut)" |
What's the record of the UCS 2 - Battle at the Barn when the round was n/a? | CREATE TABLE table_43820 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" text) | SELECT "Record" FROM table_43820 WHERE "Round" = 'n/a' AND "Event" = 'ucs 2 - battle at the barn' |
Number of answers by top 10 authors. | CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE Posts (Id number,PostTyp... | SELECT u.DisplayName, COUNT(p.Id) AS Answers FROM Posts AS p JOIN Users AS u ON u.Id = p.OwnerUserId WHERE p.OwnerUserId IN (SELECT Id FROM Users ORDER BY Reputation DESC LIMIT 10) AND p.PostTypeId = 2 GROUP BY u.DisplayName ORDER BY Answers DESC |
when did patient 21302 get admitted via transfer from hosp/extram to the hospital for the first time this year? | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,... | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 21302 AND admissions.admission_location = 'transfer from hosp/extram' AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY admissions.admittime LIMIT 1 |
What is the Facility ID that has a City of license of wheeling, and a ERP kW less than 4.5? | CREATE TABLE table_name_52 (facility_id INTEGER,city_of_license VARCHAR,erp_kw VARCHAR) | SELECT MAX(facility_id) FROM table_name_52 WHERE city_of_license = "wheeling" AND erp_kw < 4.5 |
Which player was selected in rounds under 3? | CREATE TABLE table_name_33 (player VARCHAR,round INTEGER) | SELECT player FROM table_name_33 WHERE round < 3 |
Which Song Sung has a Status of Eliminated? | CREATE TABLE table_name_14 (song_sung VARCHAR,status VARCHAR) | SELECT song_sung FROM table_name_14 WHERE status = "eliminated" |
What party was Lane Evans? | CREATE TABLE table_1341568_14 (party VARCHAR,incumbent VARCHAR) | SELECT party FROM table_1341568_14 WHERE incumbent = "Lane Evans" |
Which Bleeding time has a Condition of factor x deficiency as seen in amyloid purpura? | CREATE TABLE table_74966 ("Condition" text,"Prothrombin time" text,"Partial thromboplastin time" text,"Bleeding time" text,"Platelet count" text) | SELECT "Bleeding time" FROM table_74966 WHERE "Condition" = 'factor x deficiency as seen in amyloid purpura' |
what is the number of riders listed ? | CREATE TABLE table_203_244 (id number,"pos" text,"rider" text,"manufacturer" text,"time/retired" text,"points" number) | SELECT COUNT("rider") FROM table_203_244 |
Name the date with attendance more than 19,204 and result of l and visitor of san francisco 49ers and record of 2-8-0 | CREATE TABLE table_69940 ("Date" text,"Visitor" text,"Result" text,"Score" text,"Home" text,"Record" text,"Attendance" real) | SELECT "Date" FROM table_69940 WHERE "Attendance" > '19,204' AND "Result" = 'l' AND "Visitor" = 'san francisco 49ers' AND "Record" = '2-8-0' |
did patient 006-40255 since 2103 receive the diagnosis of hepatic dysfunction - moderate? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,disch... | SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-40255')) AND diagnosis.diagnosisname = 'hepatic dysfunction - moderate' ... |
What record medal event has athletics as the sport, with robert garrett as the athlete, and a medal count less than 3? | CREATE TABLE table_63604 ("Medal count" real,"Date" text,"Athlete" text,"Nation" text,"Sport" text,"Record medal event" text) | SELECT "Record medal event" FROM table_63604 WHERE "Sport" = 'athletics' AND "Athlete" = 'robert garrett' AND "Medal count" < '3' |
Who is 1.92 m tall and a current club member of Montepaschi Siena | CREATE TABLE table_name_43 (player VARCHAR,height VARCHAR,current_club VARCHAR) | SELECT player FROM table_name_43 WHERE height = 1.92 AND current_club = "montepaschi siena" |
what is maximum age of patients whose gender is f and discharge location is disc-tran cancer/chldrn h? | 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)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H" |
What is CJS 592 really called ? | CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE ta (campus_job_id int,studen... | SELECT DISTINCT name FROM course WHERE department = 'CJS' AND number = 592 |
What is the mascot for the school with a student body larger than 2,191 in Noblesville? | CREATE TABLE table_35444 ("School" text,"Mascot" text,"Location" text,"Enrollment" real,"IHSAA Class" text,"IHSAA Football Class" text,"County" text) | SELECT "Mascot" FROM table_35444 WHERE "Enrollment" > '2,191' AND "School" = 'noblesville' |
What is the place of the player with a 70-66-67=203 score? | CREATE TABLE table_12095 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Place" FROM table_12095 WHERE "Score" = '70-66-67=203' |
torque@rpm of n m (lb ft)@4050 has what code? | CREATE TABLE table_39733 ("Code" text,"Years" text,"Displacement (bore x stroke)/Type" text,"Power@rpm" text,"torque@rpm" text,"Compression (:1)" text) | SELECT "Code" FROM table_39733 WHERE "torque@rpm" = 'n·m (lb·ft)@4050' |
What is the home team that played Derby County as the away team? | CREATE TABLE table_name_18 (home_team VARCHAR,away_team VARCHAR) | SELECT home_team FROM table_name_18 WHERE away_team = "derby county" |
What circuit did Innes Ireland win at for the I lombank trophy? | CREATE TABLE table_77805 ("Race Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Constructor" text,"Report" text) | SELECT "Circuit" FROM table_77805 WHERE "Winning driver" = 'innes ireland' AND "Race Name" = 'i lombank trophy' |
MICRBIOL 642 has been taught by whom in the past ? | CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE gsi (course_offering_i... | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN semester... |
Which date has a Goal of deacon 4/4, withers 1 dg? | CREATE TABLE table_56162 ("Date" text,"Competition" text,"Venue" text,"Result" text,"Score" text,"Goals" text) | SELECT "Date" FROM table_56162 WHERE "Goals" = 'deacon 4/4, withers 1 dg' |
What year was the 146 total? | CREATE TABLE table_60121 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" real) | SELECT "Year(s) won" FROM table_60121 WHERE "Total" = '146' |
Events of 22, and a Rank smaller than 4 involved which of the lowest earnings ($)? | CREATE TABLE table_38142 ("Rank" real,"Player" text,"Country" text,"Earnings ($)" real,"Events" real,"Wins" real) | SELECT MIN("Earnings ( $ )") FROM table_38142 WHERE "Events" = '22' AND "Rank" < '4' |
Who were the winners of the Women's Doubles in the years after 2009? | CREATE TABLE table_42086 ("Year" real,"Men's singles" text,"Women's singles" text,"Men's doubles" text,"Women's doubles" text,"Mixed doubles" text) | SELECT "Women's doubles" FROM table_42086 WHERE "Year" > '2009' |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the sum of revenue , and group by attribute name, could you show in desc by the X-axis? | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT T2.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC |
Name the place of action for the marine corps and corporal rank | CREATE TABLE table_54319 ("Name" text,"Service" text,"Rank" text,"Place of action" text,"Unit" text) | SELECT "Place of action" FROM table_54319 WHERE "Service" = 'marine corps' AND "Rank" = 'corporal' |
What was the result in a week lower than 10 with an opponent of Chicago Bears? | CREATE TABLE table_name_21 (result VARCHAR,week VARCHAR,opponent VARCHAR) | SELECT result FROM table_name_21 WHERE week < 10 AND opponent = "chicago bears" |
how many times has patient 006-181433 been prescribed dextrose 50% inj in this month. | 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,drugstoptime time)CREATE TABLE intakeoutput (intakeoutputid number,pat... | SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-181433')) AND medication.drugname = 'dextrose 50% inj' AND DATETIME(medica... |
What is the number range for the Gloucester RCW builder introduced in 1937? | CREATE TABLE table_name_84 (number_range VARCHAR,builder VARCHAR,introduced VARCHAR) | SELECT number_range FROM table_name_84 WHERE builder = "gloucester rcw" AND introduced = "1937" |
Tell me the time of admission for patient Dona Cole. | 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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT demographic.admittime FROM demographic WHERE demographic.name = "Dona Cole" |
Who wrote the movie positioned at 8 on the list? | CREATE TABLE table_28271 ("No." real,"#" real,"Title" text,"Director" text,"Writer(s)" text,"Original air date" text,"Prod. code" real,"U.S. viewers (million)" text) | SELECT "Writer(s)" FROM table_28271 WHERE "#" = '8' |
What's the GPU model that has sSpec number SR16Z(c0)? | CREATE TABLE table_13570 ("Model number" text,"sSpec number" text,"Cores" text,"Frequency" text,"Turbo" text,"L2 cache" text,"L3 cache" text,"GPU model" text,"GPU frequency" text,"Socket" text,"I/O bus" text,"Release date" text,"Part number(s)" text,"Release price (USD)" text) | SELECT "GPU model" FROM table_13570 WHERE "sSpec number" = 'sr16z(c0)' |
What is the total number of churches built in 1916? | CREATE TABLE table_1772 ("Parish (Prestegjeld)" text,"Sub-Parish (Sogn)" text,"Church Name" text,"Year Built" real,"Location of the Church" text) | SELECT COUNT("Location of the Church") FROM table_1772 WHERE "Year Built" = '1916' |
How many overalls has 1 combined and 24 downhills? | CREATE TABLE table_name_9 (overall VARCHAR,combined VARCHAR,downhill VARCHAR) | SELECT overall FROM table_name_9 WHERE combined = "1" AND downhill = "24" |
What is the engine for the bmw motorsport entrant with 123 points before 2004? | CREATE TABLE table_name_57 (engine VARCHAR,points VARCHAR,year VARCHAR,entrant VARCHAR) | SELECT engine FROM table_name_57 WHERE year < 2004 AND entrant = "bmw motorsport" AND points = 123 |
who is the athlete when the time is less than 11.13 and the country is belgium? | CREATE TABLE table_64386 ("Rank" real,"Heat" real,"Athlete" text,"Country" text,"Time" real) | SELECT "Athlete" FROM table_64386 WHERE "Time" < '11.13' AND "Country" = 'belgium' |
what are the prices for meropenem? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE patient (uniquepid ... | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'meropenem') |
When 2005 is the season how many drivers are there? | CREATE TABLE table_21881 ("Season" text,"Date" text,"Driver" text,"Team" text,"Chassis" text,"Engine" text,"Laps" text,"Miles (km)" text,"Race Time" text,"Average Speed (mph)" text,"Report" text) | SELECT COUNT("Driver") FROM table_21881 WHERE "Season" = '2005' |
find the number of government health insurance patients who had other electric countershock of heart. | 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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Government" AND procedures.short_title = "Heart countershock NEC" |
What dat did episode 195 in the series originally air? | CREATE TABLE table_30191 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real) | SELECT "Original air date" FROM table_30191 WHERE "No. in series" = '195' |
how many finished above frnchitti ? | CREATE TABLE table_204_946 (id number,"pos" number,"no" number,"driver" text,"team" text,"laps" number,"time/retired" text,"grid" number,"points" number) | SELECT COUNT(*) FROM table_204_946 WHERE "pos" < (SELECT "pos" FROM table_204_946 WHERE "driver" = 'dario franchitti') |
What is the lowest fiscal year if total vehicles is 490? | CREATE TABLE table_19255192_1 (fiscal_year INTEGER,total_vehicles VARCHAR) | SELECT MIN(fiscal_year) FROM table_19255192_1 WHERE total_vehicles = 490 |
What is Authors, when Novelty is Gen Nov, when Location is South Africa, and when Name is Criocephalosaurus? | CREATE TABLE table_40609 ("Name" text,"Novelty" text,"Status" text,"Authors" text,"Location" text) | SELECT "Authors" FROM table_40609 WHERE "Novelty" = 'gen nov' AND "Location" = 'south africa' AND "Name" = 'criocephalosaurus' |
Where was the game against Detroit played? | CREATE TABLE table_27704187_7 (location_attendance VARCHAR,team VARCHAR) | SELECT location_attendance FROM table_27704187_7 WHERE team = "Detroit" |
what is the date after number 4 ? | CREATE TABLE table_204_353 (id number,"no." number,"date/time" text,"aircraft" text,"foe" text,"result" text,"location" text,"notes" text) | SELECT "date/time" FROM table_204_353 WHERE id > (SELECT id FROM table_204_353 WHERE "no." = 4) ORDER BY id LIMIT 1 |
What was the first paper on LSTM written ? | CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE paperkeyphrase (paperid int,keyphraseid in... | SELECT DISTINCT paper.year FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'LSTM' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid GROUP BY paper.year ORDER BY paper.year |
Find all the order items whose product id is 11. What are the order item ids? | CREATE TABLE order_items (order_item_id number,product_id number,order_id number,order_item_status text,order_item_details text)CREATE TABLE shipment_items (shipment_id number,order_item_id number)CREATE TABLE products (product_id number,product_name text,product_details text)CREATE TABLE invoices (invoice_number numbe... | SELECT order_item_id FROM order_items WHERE product_id = 11 |
Who was the opponent on November 11, 2001? | CREATE TABLE table_name_4 (opponent VARCHAR,date VARCHAR) | SELECT opponent FROM table_name_4 WHERE date = "november 11, 2001" |
how many height m ( ft ) with frequency mhz being 100.1 | CREATE TABLE table_13998897_1 (height_m___ft__ VARCHAR,frequency_mhz VARCHAR) | SELECT COUNT(height_m___ft__) FROM table_13998897_1 WHERE frequency_mhz = "100.1" |
If the NFL team is the Minnesota Vikings, what is the position? | CREATE TABLE table_2508633_8 (position VARCHAR,nfl_team VARCHAR) | SELECT position FROM table_2508633_8 WHERE nfl_team = "Minnesota Vikings" |
When is the latest game the bills had 21 first downs | CREATE TABLE table_20492 ("Game" real,"Date" text,"Opponent" text,"Result" text,"Bills points" real,"Opponents" real,"Bills first downs" real,"Record" text) | SELECT MIN("Game") FROM table_20492 WHERE "Bills first downs" = '21' |
how many patients whose age is less than 54 and drug name is succinylcholine? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "54" AND prescriptions.drug = "Succinylcholine" |
What network has lap-by-laps by Bill Flemming, and Pit reporter Chris Economaki? | CREATE TABLE table_53925 ("Year" real,"Network" text,"Lap-by-lap" text,"Pit reporters" text,"Host" text) | SELECT "Network" FROM table_53925 WHERE "Lap-by-lap" = 'bill flemming' AND "Pit reporters" = 'chris economaki' |
Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80. | CREATE TABLE submission (College VARCHAR,Scores INTEGER) | SELECT College FROM submission WHERE Scores > 90 INTERSECT SELECT College FROM submission WHERE Scores < 80 |
Show names for all aircraft with at least two flights. | CREATE TABLE aircraft (aid number,name text,distance number)CREATE TABLE employee (eid number,name text,salary number)CREATE TABLE flight (flno number,origin text,destination text,distance number,departure_date time,arrival_date time,price number,aid number)CREATE TABLE certificate (eid number,aid number) | SELECT T2.name FROM flight AS T1 JOIN aircraft AS T2 ON T1.aid = T2.aid GROUP BY T1.aid HAVING COUNT(*) >= 2 |
What is the highest Laps Led with a grid of less than 4 and a finishing position of 15? | CREATE TABLE table_61631 ("Fin. Pos" real,"Car No." real,"Driver" text,"Team" text,"Laps" real,"Time/Retired" text,"Grid" real,"Laps Led" real,"Points" text) | SELECT MAX("Laps Led") FROM table_61631 WHERE "Grid" < '4' AND "Fin. Pos" = '15' |
Which Japanese name has a Korean name of ( ) gyeongchip? | CREATE TABLE table_name_8 (japanese_name VARCHAR,korean_name_² VARCHAR) | SELECT japanese_name FROM table_name_8 WHERE korean_name_² = "경칩 (驚蟄) gyeongchip" |
does allegiant air fly to dallas or las vegas ? | CREATE TABLE table_204_215 (id number,"airline" text,"destination(s)" text,"aircraft scheduled" text,"service date(s)" text,"comments" text) | SELECT "destination(s)" FROM table_204_215 WHERE "airline" = 'allegiant air' |
What is the completed date of the church with list entry number 1068071? | CREATE TABLE table_40669 ("Name" text,"Location" text,"Type" text,"Completed" text,"List entry number" real) | SELECT "Completed" FROM table_40669 WHERE "Type" = 'church' AND "List entry number" = '1068071' |
What is the circuit on 19 Apr with Craig Lowndes as the winner? | CREATE TABLE table_51034 ("Date" text,"Series" text,"Circuit" text,"City / State" text,"Winner" text,"Team" text) | SELECT "Circuit" FROM table_51034 WHERE "Winner" = 'craig lowndes' AND "Date" = '19 apr' |
find the number of emergency hospital admission patients who were admitted via emergency hospital room. | 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,language text,religion text,admission_type text,days_stay text,insurance text,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.admission_location = "EMERGENCY ROOM ADMIT" |
tell me patient 15135's hospital admission time during this year? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)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 d_icd_diagnoses (row_id ... | SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 15135 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') |
who was his first opponent in the 2006 fifa world cup qualification round ? | CREATE TABLE table_204_774 (id number,"#" number,"date" text,"venue" text,"opponent" text,"score" text,"result" text,"competition" text) | SELECT "opponent" FROM table_204_774 WHERE "competition" = '2006 fifa world cup qualification' ORDER BY "date" LIMIT 1 |
provide the number of patients who had arteriography of cerebral arteries and were hospitalized for more than 5 days. | 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 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... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "5" AND procedures.short_title = "Contr cerebr arteriogram" |
what is the report when the home team is new zealand breakers? | CREATE TABLE table_name_31 (report VARCHAR,home_team VARCHAR) | SELECT report FROM table_name_31 WHERE home_team = "new zealand breakers" |
what is the smallest aircraft available to fly on from PITTSBURGH to BALTIMORE | CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,weight int,capacity int,pay_load int,cruising_speed int,range_miles int,pressurized varchar)CREATE TABLE time_interval (period text,... | SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE aircraft.capacity = (SELECT MIN(AIRCRAFTalias1.capacity) FROM aircraft AS AIRCRAFTalias1, airport_service AS AIRPORT_SERVICEa... |
What club did united states player ty harden play for? | CREATE TABLE table_name_55 (club VARCHAR,nationality VARCHAR,player VARCHAR) | SELECT club FROM table_name_55 WHERE nationality = "united states" AND player = "ty harden" |
what was the finishing place of the last race in december 2010 ? | CREATE TABLE table_204_607 (id number,"season" number,"date" text,"location" text,"discipline" text,"place" text) | SELECT "place" FROM table_204_607 WHERE "date" = 12 AND "date" = 2010 |
What club/province has 41 caps? | CREATE TABLE table_name_66 (club_province VARCHAR,caps VARCHAR) | SELECT club_province FROM table_name_66 WHERE caps = 41 |
Which average lost that has a match less than 14? | CREATE TABLE table_41175 ("Team" text,"Match" real,"Points" real,"Draw" real,"Lost" real) | SELECT AVG("Lost") FROM table_41175 WHERE "Match" < '14' |
Which venue did the home team score 22.23 (155) at? | CREATE TABLE table_56771 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Venue" FROM table_56771 WHERE "Home team score" = '22.23 (155)' |
what are the four most commonly ordered procedures in 2105 for patients who have previously been diagnosed with bone fracture(s) - clavicle in the same month? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE diagnosis... | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'bone fracture(s) - clavicle' AND STRFTIM... |
What Runners-up have a Venue in Broadwood Stadium? | CREATE TABLE table_name_75 (runners_up VARCHAR,venue VARCHAR) | SELECT runners_up FROM table_name_75 WHERE venue = "broadwood stadium" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.