instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
If the year is 2010, what is the minimum amount of years 5-9? | CREATE TABLE table_174266_6 (year VARCHAR) | SELECT MIN(5 AS _9_years) FROM table_174266_6 WHERE year = 2010 |
How many names are listed for the player with 50 points? | CREATE TABLE table_73793 ("Number" real,"Name" text,"Games Played" real,"Games Started" real,"Goals" real,"Assists" real,"Points" real,"Shots" real) | SELECT COUNT("Name") FROM table_73793 WHERE "Points" = '50' |
How many clubs are located at 'HHH'? | CREATE TABLE member_of_club (stuid number,clubid number,position text)CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_code text)CREATE TABLE club (clubid number,clubname text,clubdesc text,clublocation text) | SELECT COUNT(*) FROM club WHERE clublocation = "HHH" |
Who was the vacator when Shadrach Bond was the successor? | CREATE TABLE table_25066 ("District" text,"Vacator" text,"Reason for change" text,"Successor" text,"Date successor seated" text) | SELECT "Vacator" FROM table_25066 WHERE "Successor" = 'Shadrach Bond' |
What score was conceded by Richmond? | CREATE TABLE table_name_94 (away_team VARCHAR,home_team VARCHAR) | SELECT away_team AS score FROM table_name_94 WHERE home_team = "richmond" |
What is the prime mover for a build date in 1975? | CREATE TABLE table_70736 ("Model" text,"Build date" text,"Total produced" real,"Wheel arrangement" text,"Prime mover" text,"Power output" text) | SELECT "Prime mover" FROM table_70736 WHERE "Build date" = '1975' |
Which Rams opponent had a record of 2-3? | CREATE TABLE table_33641 ("Week" real,"Opponent" text,"Result" text,"Record" text,"Attendance" text) | SELECT "Opponent" FROM table_33641 WHERE "Record" = '2-3' |
did patient 31482 receive a diagnostic for urinostomy status nec on their current hospital visit? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_labitems (row_id number,itemid number,label 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 diagnoses_icd... | SELECT COUNT(*) > 0 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'urinostomy status nec') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31482 AND admissions.dischtime ... |
The person who had $126,796 WSOP earnings had how many WSOP cashes? | CREATE TABLE table_23696862_6 (wsop_cashes VARCHAR,wsop_earnings VARCHAR) | SELECT wsop_cashes FROM table_23696862_6 WHERE wsop_earnings = "$126,796" |
give me the number of female patients with medicare health insurance. | 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 WHERE demographic.gender = "F" AND demographic.insurance = "Medicare" |
What tournament or series was played in England, when games played was 4, points for were 121? | CREATE TABLE table_14089 ("Year(s)" real,"Tournament or series" text,"Played in" text,"Games played (Tests)" text,"Games won (Tests)" text,"Games lost (Tests)" text,"Games drawn (Tests)" text,"Points for (Tests)" text,"Points against (Tests)" text) | SELECT "Tournament or series" FROM table_14089 WHERE "Played in" = 'england' AND "Games played ( Tests )" = '4' AND "Points for ( Tests )" = '121' |
when was the last time patient 006-80884 measured its respiration less than 15.0 since 8 days ago? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE treatment (treatmentid number,patientunitstayid ... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-80884')) AND vitalperiodic.respiration < 15.0 A... |
Return the average price of products that have each category code in a bar chart. | CREATE TABLE Complaints (complaint_id INTEGER,product_id INTEGER,customer_id INTEGER,complaint_outcome_code VARCHAR(20),complaint_status_code VARCHAR(20),complaint_type_code VARCHAR(20),date_complaint_raised DATETIME,date_complaint_closed DATETIME,staff_id INTEGER)CREATE TABLE Customers (customer_id INTEGER,customer_ty... | SELECT product_category_code, AVG(product_price) FROM Products GROUP BY product_category_code |
What is the name of the flag that means decimal digit 2? | CREATE TABLE table_29997112_3 (flag_name VARCHAR,meaning VARCHAR) | SELECT flag_name FROM table_29997112_3 WHERE meaning = "Decimal Digit 2" |
How much Overall has a Pick # larger than 2, and a Name of claude humphrey? | CREATE TABLE table_name_93 (overall VARCHAR,pick__number VARCHAR,name VARCHAR) | SELECT COUNT(overall) FROM table_name_93 WHERE pick__number > 2 AND name = "claude humphrey" |
What was the surface for events held in 1983? | CREATE TABLE table_73317 ("Outcome" text,"Year" real,"Championship" text,"Surface" text,"Partner" text,"Opponents" text,"Score" text) | SELECT "Surface" FROM table_73317 WHERE "Year" = '1983' |
What were the round results when Hanne Skak Jensen faced Austria? | CREATE TABLE table_25505246_7 (result VARCHAR,against VARCHAR) | SELECT result FROM table_25505246_7 WHERE against = "Austria" |
What are lines 1 and 2 of the addressed of the customer with the email 'vbogisich@example.org'? | CREATE TABLE customers (customer_id number,customer_type_code text,address_line_1 text,address_line_2 text,town_city text,state text,email_address text,phone_number text)CREATE TABLE products (product_id number,parent_product_id number,product_category_code text,date_product_first_available time,date_product_discontinu... | SELECT address_line_1, address_line_2 FROM customers WHERE email_address = "vbogisich@example.org" |
Who is the away side at corio oval? | CREATE TABLE table_name_85 (away_team VARCHAR,venue VARCHAR) | SELECT away_team FROM table_name_85 WHERE venue = "corio oval" |
Which courses in Prehistory of Oceania count for the Other requirement ? | CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE course_prerequisite (... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Prehistory of Oceania%' OR course.description LIKE '%Prehistory of Oceania%' OR course.name LIKE... |
How many incumbents were elected in the 1926 election? | CREATE TABLE table_1342256_11 (incumbent VARCHAR,first_elected VARCHAR) | SELECT COUNT(incumbent) FROM table_1342256_11 WHERE first_elected = 1926 |
What is the average date of the game with the Detroit Red Wings as the opponent? | CREATE TABLE table_name_19 (date INTEGER,opponent VARCHAR) | SELECT AVG(date) FROM table_name_19 WHERE opponent = "detroit red wings" |
What was the pick number when Paul Krake was selected? | CREATE TABLE table_2897457_8 (pick__number INTEGER,player VARCHAR) | SELECT MIN(pick__number) FROM table_2897457_8 WHERE player = "Paul Krake" |
For each faculty rank, show the number of faculty members who have it. Visualize by pie chart. | CREATE TABLE Participates_in (stuid INTEGER,actid INTEGER)CREATE TABLE Activity (actid INTEGER,activity_name varchar(25))CREATE TABLE Faculty_Participates_in (FacID INTEGER,actid INTEGER)CREATE TABLE Faculty (FacID INTEGER,Lname VARCHAR(15),Fname VARCHAR(15),Rank VARCHAR(15),Sex VARCHAR(1),Phone INTEGER,Room VARCHAR(5)... | SELECT Rank, COUNT(*) FROM Faculty GROUP BY Rank |
how many patients were admitted to the hospital until 3 years ago? | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)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 patients (row_id number,... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-3 year') |
What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst? | CREATE TABLE problems (reported_by_staff_id VARCHAR,closure_authorised_by_staff_id VARCHAR)CREATE TABLE staff (staff_id VARCHAR,staff_first_name VARCHAR,staff_last_name VARCHAR) | SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop" AND T2.staff_last_name = "Berge" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Ashley"... |
hepatic failure or dysfunction | CREATE TABLE table_test_9 ("id" int,"ejection_fraction_ef" int,"anemia" bool,"child_pugh_class" string,"systolic_blood_pressure_sbp" int,"leukopenia" int,"heart_disease" bool,"stroke" bool,"av_block" bool,"renal_disease" bool,"hepatic_disease" bool,"estimated_glomerular_filtration_rate_egfr" int,"thrombocytopenia" floa... | SELECT * FROM table_test_9 WHERE hepatic_disease = 1 OR hepatic_disease = 1 |
How many counties correspond to each police force, display y axis in desc order. | CREATE TABLE city (City_ID int,County_ID int,Name text,White real,Black real,Amerindian real,Asian real,Multiracial real,Hispanic real)CREATE TABLE county_public_safety (County_ID int,Name text,Population int,Police_officers int,Residents_per_officer int,Case_burden int,Crime_rate real,Police_force text,Location text) | SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force ORDER BY COUNT(*) DESC |
Name the loss on may 22 | CREATE TABLE table_name_29 (loss VARCHAR,date VARCHAR) | SELECT loss FROM table_name_29 WHERE date = "may 22" |
Which tournament had a clay surface and a score of 6 1, 3 6, 6 2? | CREATE TABLE table_name_76 (tournament VARCHAR,surface VARCHAR,score_in_the_final VARCHAR) | SELECT tournament FROM table_name_76 WHERE surface = "clay" AND score_in_the_final = "6–1, 3–6, 6–2" |
What result was a date of 20/03/2008 with leeds as the opponent | CREATE TABLE table_71075 ("Date" text,"Competition" text,"Round" text,"Opponent" text,"Result" text,"Score" text,"Home/Away" text,"Venue" text,"Goals" text,"Attendance" real,"Report" text) | SELECT "Result" FROM table_71075 WHERE "Opponent" = 'leeds' AND "Date" = '20/03/2008' |
What Engine has a Power of 114hp (85kw)? | CREATE TABLE table_55764 ("Years" text,"Displacement" text,"Engine" text,"Power" text,"Torque" text) | SELECT "Engine" FROM table_55764 WHERE "Power" = '114hp (85kw)' |
how many of these religious groups have a literacy rate of above 60 % ? | CREATE TABLE table_203_90 (id number,"religious\ngroup" text,"population\n%" text,"growth\n(1991-2001)" text,"sex ratio\n(total)" number,"literacy\n(%)" text,"work participation\n(%)" text,"sex ratio\n(rural)" number,"sex ratio\n(urban)" number,"sex ratio\n(child)" number) | SELECT COUNT("religious\ngroup") FROM table_203_90 WHERE "literacy\n(%)" > 60 |
What is Time/Retired with a Grid of 12? | CREATE TABLE table_10474 ("Rider" text,"Manufacturer" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT "Time/Retired" FROM table_10474 WHERE "Grid" = '12' |
What grid has 23 laps done by Josh Brookes? | CREATE TABLE table_32743 ("Rider" text,"Bike" text,"Laps" real,"Time" text,"Grid" real) | SELECT "Grid" FROM table_32743 WHERE "Laps" = '23' AND "Rider" = 'josh brookes' |
What is the lowest number in the Labour Party for the Fianna Fail higher than 5? | CREATE TABLE table_name_16 (labour_party INTEGER,fianna_fáil INTEGER) | SELECT MIN(labour_party) FROM table_name_16 WHERE fianna_fáil > 5 |
Which Score has an Opponent of melanie south? | CREATE TABLE table_name_58 (score VARCHAR,opponent VARCHAR) | SELECT score FROM table_name_58 WHERE opponent = "melanie south" |
Who was the Winner at Campbelltown Sports Stadium? | CREATE TABLE table_34945 ("Winner" text,"Score" text,"Date" text,"Venue" text,"Crowd" real) | SELECT "Winner" FROM table_34945 WHERE "Venue" = 'campbelltown sports stadium' |
Name the place where adelaide oval is | CREATE TABLE table_57556 ("Runs" text,"Against" text,"City/Country" text,"Venue" text,"Result" text,"Year" text) | SELECT "City/Country" FROM table_57556 WHERE "Venue" = 'adelaide oval' |
Which team's home is the Arden Street Oval? | CREATE TABLE table_name_56 (home_team VARCHAR,venue VARCHAR) | SELECT home_team FROM table_name_56 WHERE venue = "arden street oval" |
How many saves did the player with a 92.3% save rate and 217 goals have? | CREATE TABLE table_15145 ("Player" text,"Years" text,"Goals against" real,"Saves" real,"Save %" text) | SELECT SUM("Saves") FROM table_15145 WHERE "Save %" = '92.3%' AND "Goals against" > '217' |
At what stadium was the final score 31-28? | CREATE TABLE table_name_60 (stadium VARCHAR,final_score VARCHAR) | SELECT stadium FROM table_name_60 WHERE final_score = "31-28" |
What is the sum of Against, when Opposing Teams is 'South Africa', and when Status is 'First Test'? | CREATE TABLE table_59223 ("Opposing Teams" text,"Against" real,"Date" text,"Venue" text,"Status" text) | SELECT SUM("Against") FROM table_59223 WHERE "Opposing Teams" = 'south africa' AND "Status" = 'first test' |
What's the award for #100? | CREATE TABLE table_name_84 (award VARCHAR,result VARCHAR) | SELECT award FROM table_name_84 WHERE result = "#100" |
list all flights from DENVER to PHILADELPHIA | CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)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_m... | 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADE... |
count the number of patients whose diagnoses short title is joint replaced hip and drug route is sc? | 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,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Joint replaced hip" AND prescriptions.route = "SC" |
What are the names of parties with at least 2 events? | CREATE TABLE party (party_name VARCHAR,party_id VARCHAR)CREATE TABLE party_events (party_id VARCHAR) | SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id = T2.party_id GROUP BY T1.party_id HAVING COUNT(*) >= 2 |
out of these drivers : nigel mansell , al unser , jr. , michael schumacher , and jeff gordon , all but one has more than one espy award . who only has one espy award ? | CREATE TABLE table_203_364 (id number,"year" number,"driver" text,"nation of citizenship" text,"racing series" text,"type of vehicle" text) | SELECT "driver" FROM table_203_364 WHERE "driver" IN ('nigel mansell', 'al unser, jr', 'michael schumacher', 'jeff gordon') GROUP BY "driver" HAVING COUNT(*) = 1 |
when was the last laboratory test during their first hospital visit for patient 006-224208? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number... | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-224208' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospital... |
Give the names of people who did not participate in the candidate election. | CREATE TABLE candidate (candidate_id number,people_id number,poll_source text,date text,support_rate number,consider_rate number,oppose_rate number,unsure_rate number)CREATE TABLE people (people_id number,sex text,name text,date_of_birth text,height number,weight number) | SELECT name FROM people WHERE NOT people_id IN (SELECT people_id FROM candidate) |
Draw a pie chart about the proportion of All_Games and Team_ID. | CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)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_Perce... | SELECT All_Games, Team_ID FROM basketball_match |
How many are eligible to DV?. | CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE PostLinks (Id n... | SELECT COUNT(*) FROM Users WHERE Reputation >= 125 |
How many nuclear power plants are in preparation to be used in Japan? | CREATE TABLE nuclear_power_plants (id text,name text,latitude text,longitude text,country text,status text,reactortype text,reactormodel text,constructionstartat text,operationalfrom text,operationalto text,capacity text,lastupdatedat text,source text) | SELECT COUNT(*) FROM nuclear_power_plants WHERE country = "Japan" AND status = "Under Construction" |
What year did Ecurie Bleue score more than 0 points? | CREATE TABLE table_15804 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Pts." real) | SELECT AVG("Year") FROM table_15804 WHERE "Pts." > '0' AND "Entrant" = 'ecurie bleue' |
what is minimum age of patients whose admission location is trsf within this facility and discharge location is home health care? | 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,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND demographic.discharge_location = "HOME HEALTH CARE" |
how many patients were diagnosed with sepsis in hospital and didn't come back to the hospital in the same month until 2103? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissio... | SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'sepsis' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2103') AS t1) - (SELECT COUNT(DISTINCT t2.un... |
What Home team has an Away team score of 8.9 (57)? | CREATE TABLE table_33168 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Home team" FROM table_33168 WHERE "Away team score" = '8.9 (57)' |
How many votes did Kerry get in the county that gave Bush 189,605 votes? | CREATE TABLE table_name_46 (kerry_number INTEGER,bush_number VARCHAR) | SELECT AVG(kerry_number) FROM table_name_46 WHERE bush_number = 189 OFFSET 605 |
Which Event has a Competition of chicago marathon, and a Year larger than 2004? | CREATE TABLE table_name_79 (event VARCHAR,competition VARCHAR,year VARCHAR) | SELECT event FROM table_name_79 WHERE competition = "chicago marathon" AND year > 2004 |
Who was the high scorer and how much did they score in the game on May 3? | CREATE TABLE table_11963601_11 (high_points VARCHAR,date VARCHAR) | SELECT high_points FROM table_11963601_11 WHERE date = "May 3" |
What is the weight of the entry that has a date of birth of 1981-11-21? | CREATE TABLE table_78902 ("Name" text,"Pos." text,"Height" text,"Weight" text,"Date of Birth" text,"Club" text) | SELECT "Weight" FROM table_78902 WHERE "Date of Birth" = '1981-11-21' |
What are the titles of episodes with 5.66 million US viewers? | CREATE TABLE table_2866514_1 (title VARCHAR,us_viewers__million_ VARCHAR) | SELECT title FROM table_2866514_1 WHERE us_viewers__million_ = "5.66" |
Name Event of Medal of gold and a Name of duncan white? | CREATE TABLE table_64167 ("Medal" text,"Name" text,"Games" text,"Sport" text,"Event" text) | SELECT "Event" FROM table_64167 WHERE "Medal" = 'gold' AND "Name" = 'duncan white' |
Who played as the away team when Essendon was the home team? | CREATE TABLE table_10767 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team" FROM table_10767 WHERE "Home team" = 'essendon' |
what is the institution at akron, oh? | CREATE TABLE table_10083 ("Institution" text,"Location" text,"Team Nickname" text,"Joined TSCHL" real,"Home Arena" text,"Capacity" real,"Team Website" text) | SELECT "Institution" FROM table_10083 WHERE "Location" = 'akron, oh' |
did patient 60136 have crushing injury foot diagnosed in this hospital encounter? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREA... | SELECT COUNT(*) > 0 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'crushing injury foot') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 60136 AND admissions.dischtime I... |
Which engine of Rob Walker Racing Team has 47 points and F tyres? | CREATE TABLE table_name_27 (engine VARCHAR,entrant VARCHAR,points VARCHAR,tyres VARCHAR) | SELECT engine FROM table_name_27 WHERE points = "47" AND tyres = "f" AND entrant = "rob walker racing team" |
At what location was the time 1:54:21? | CREATE TABLE table_name_90 (location VARCHAR,time VARCHAR) | SELECT location FROM table_name_90 WHERE time = "1:54:21" |
Tell me the sum of wins for top 5 less than 1 | CREATE TABLE table_name_77 (wins INTEGER,top_5 INTEGER) | SELECT SUM(wins) FROM table_name_77 WHERE top_5 < 1 |
Which Year has a Manager of bobby dews, and Playoffs of lost in 1st round? | CREATE TABLE table_name_37 (year INTEGER,manager VARCHAR,playoffs VARCHAR) | SELECT MIN(year) FROM table_name_37 WHERE manager = "bobby dews" AND playoffs = "lost in 1st round" |
What were the Points on December 13? | CREATE TABLE table_name_63 (points INTEGER,date VARCHAR) | SELECT MAX(points) FROM table_name_63 WHERE date = "december 13" |
Which res has a Record of 3-0? | CREATE TABLE table_5032 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Res." FROM table_5032 WHERE "Record" = '3-0' |
List the title for the season episode number of 8. | CREATE TABLE table_23916272_6 (title VARCHAR,season__number VARCHAR) | SELECT title FROM table_23916272_6 WHERE season__number = 8 |
what is the total of points in all ? | CREATE TABLE table_204_788 (id number,"pos" text,"no" number,"driver" text,"constructor" text,"laps" number,"time/retired" text,"grid" number,"points" number) | SELECT SUM("points") FROM table_204_788 |
Rick Plant was the man of the match in what competition? | CREATE TABLE table_name_39 (competition VARCHAR,man_of_the_match VARCHAR) | SELECT competition FROM table_name_39 WHERE man_of_the_match = "rick plant" |
What is the highest silver medals for Russia with more than 5 bronze medals? | CREATE TABLE table_39981 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MAX("Silver") FROM table_39981 WHERE "Nation" = 'russia' AND "Bronze" > '5' |
What is the most laps for Ayrton Senna? | CREATE TABLE table_54114 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT MAX("Laps") FROM table_54114 WHERE "Driver" = 'ayrton senna' |
Who was the home team in the game broadcast on the Big East Network? | CREATE TABLE table_26842217_12 (home_team VARCHAR,broadcast VARCHAR) | SELECT home_team FROM table_26842217_12 WHERE broadcast = "Big East Network" |
Which type has a list entry number more than 1356436, named Albion Congregational Church? | CREATE TABLE table_name_64 (type VARCHAR,list_entry_number VARCHAR,name VARCHAR) | SELECT type FROM table_name_64 WHERE list_entry_number > 1356436 AND name = "albion congregational church" |
get the number of office admission patients who had ascitic fluid lab test. | 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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND lab.fluid = "Ascites" |
How many poles had 78 points? | CREATE TABLE table_2248 ("Season" real,"Series" text,"Team" text,"Races" real,"Wins" real,"Poles" real,"F/Laps" real,"Podiums" real,"Points" text,"Position" text) | SELECT COUNT("Poles") FROM table_2248 WHERE "Points" = '78' |
List the dates of enrollment and completion of the student with personal name 'Karson'. | CREATE TABLE Students (student_id VARCHAR,personal_name VARCHAR)CREATE TABLE Student_Course_Enrolment (date_of_enrolment VARCHAR,date_of_completion VARCHAR,student_id VARCHAR) | SELECT T1.date_of_enrolment, T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = "Karson" |
Find total capacity of dorms for each gender in a bar chart, and could you list by the x-axis from low to high? | CREATE TABLE Lives_in (stuid INTEGER,dormid INTEGER,room_number INTEGER)CREATE TABLE Dorm (dormid INTEGER,dorm_name VARCHAR(20),student_capacity INTEGER,gender VARCHAR(1))CREATE TABLE Has_amenity (dormid INTEGER,amenid INTEGER)CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCH... | SELECT gender, SUM(student_capacity) FROM Dorm GROUP BY gender ORDER BY gender |
Can you draw the trend of how many date in location from over the date in location from? | CREATE TABLE Documents_to_be_Destroyed (Document_ID INTEGER,Destruction_Authorised_by_Employee_ID INTEGER,Destroyed_by_Employee_ID INTEGER,Planned_Destruction_Date DATETIME,Actual_Destruction_Date DATETIME,Other_Details VARCHAR(255))CREATE TABLE All_Documents (Document_ID INTEGER,Date_Stored DATETIME,Document_Type_Code... | SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations |
What School/Club Team has a Player named Juan Dixon and a Position of guard? | CREATE TABLE table_name_58 (school_club_team VARCHAR,position VARCHAR,player VARCHAR) | SELECT school_club_team FROM table_name_58 WHERE position = "guard" AND player = "juan dixon" |
What is the year listed when tied is listed as 11? | CREATE TABLE table_28848697_4 (year VARCHAR,tied VARCHAR) | SELECT year FROM table_28848697_4 WHERE tied = 11 |
Which Game has an Opponent of @ houston rockets? | CREATE TABLE table_12892 ("Game" real,"Date" text,"Opponent" text,"Score" text,"Location/Attendance" text,"Record" text,"Streak" text) | SELECT MIN("Game") FROM table_12892 WHERE "Opponent" = '@ houston rockets' |
Calculate the total number of patients who had transient ischemic attack as their primary disease. | 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 text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "TRANSIENT ISCHEMIC ATTACK" |
What is the method of the match with chris ade as the opponent? | CREATE TABLE table_46256 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Location" text) | SELECT "Method" FROM table_46256 WHERE "Opponent" = 'chris ade' |
In what year was the cfl team in edmonton, alberta established? | CREATE TABLE table_name_6 (est VARCHAR,city VARCHAR,state_province VARCHAR,league VARCHAR) | SELECT est FROM table_name_6 WHERE state_province = "alberta" AND league = "cfl" AND city = "edmonton" |
What number pick was Bill Athey? | CREATE TABLE table_name_70 (pick__number VARCHAR,name VARCHAR) | SELECT pick__number FROM table_name_70 WHERE name = "bill athey" |
What was the score of the home team when they played carlton? | CREATE TABLE table_name_77 (home_team VARCHAR,away_team VARCHAR) | SELECT home_team AS score FROM table_name_77 WHERE away_team = "carlton" |
how many patients during this year were prescribed nicardipine hcl iv? | 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 transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid numb... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'nicardipine hcl iv' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')) |
what is the name when avg/g is 13.7? | CREATE TABLE table_name_1 (name VARCHAR,avg_g VARCHAR) | SELECT name FROM table_name_1 WHERE avg_g = 13.7 |
Which L2-Cache has a Frequency of 1333 mhz, and a Model Number of c3 1.3a? | CREATE TABLE table_name_42 (l2_cache VARCHAR,frequency VARCHAR,model_number VARCHAR) | SELECT l2_cache FROM table_name_42 WHERE frequency = "1333 mhz" AND model_number = "c3 1.3a" |
Among patients born before the year 2047, how many of them had a lab test for cerebrospinal fluid (csf)? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2047" AND lab.fluid = "Cerebrospinal Fluid (CSF)" |
what was the last value of heart rate of patient 1784? | CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,... | SELECT 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 = 1784)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate... |
Name the most number in season | CREATE TABLE table_26168687_5 (no_in_season INTEGER) | SELECT MIN(no_in_season) FROM table_26168687_5 |
How many credits do I have ? | CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,tota... | SELECT DISTINCT total_credit FROM student WHERE student_id = 1 |
calculate the difference between the total amount of input and output of patient 018-115975 on 02/05/2105. | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,obs... | SELECT (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '018-115975')) AND intakeoutput.cellpath ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.