instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the highest top-25 with more than 9 top-10 but less than 29 events? | CREATE TABLE table_67731 ("Tournament" text,"Wins" real,"Top-5" real,"Top-10" real,"Top-25" real,"Events" real,"Cuts made" real) | SELECT MAX("Top-25") FROM table_67731 WHERE "Top-10" > '9' AND "Events" < '29' |
who was the opponent in the last game played ? | CREATE TABLE table_204_644 (id number,"week" number,"date" text,"opponent" text,"result" text,"record" text,"game site" text,"bye" text) | SELECT "opponent" FROM table_204_644 ORDER BY "week" DESC LIMIT 1 |
Name the championship for clay and corrado barazzutti | CREATE TABLE table_73491 ("Outcome" text,"Year" real,"Championship" text,"Surface" text,"Opponent in the final" text,"Score in the final" text) | SELECT "Championship" FROM table_73491 WHERE "Surface" = 'Clay' AND "Opponent in the final" = 'Corrado Barazzutti' |
How many tracks do we have? | CREATE TABLE race (race_id number,name text,class text,date text,track_id text)CREATE TABLE track (track_id number,name text,location text,seating number,year_opened number) | SELECT COUNT(*) FROM track |
count the number of patients whose diagnosis short title is mental disor nec oth dis and lab test category is blood gas. | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Mental disor NEC oth dis" AND lab."CATEGORY" = "Blood Gas" |
What is the home team score when the away team is Essendon? | CREATE TABLE table_name_77 (home_team VARCHAR,away_team VARCHAR) | SELECT home_team AS score FROM table_name_77 WHERE away_team = "essendon" |
what time did patient 92846 get his last urine out foley output on this month/20? | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status t... | SELECT outputevents.charttime FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 92846)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'urin... |
What country is Trent Yawney from? | CREATE TABLE table_2850912_3 (nationality VARCHAR,player VARCHAR) | SELECT nationality FROM table_2850912_3 WHERE player = "Trent Yawney" |
Name the college for houston oilers | CREATE TABLE table_27370 ("Pick #" real,"NFL Team" text,"Player" text,"Position" text,"College" text) | SELECT "College" FROM table_27370 WHERE "NFL Team" = 'Houston Oilers' |
what is the total cost of a maximum hospital with a drug called 37.5 g tube : dextrose (diabetic use) 40 % po gel the previous year? | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text... | SELECT MAX(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 medication.patientunitstayid FROM medication WHERE medication.drugname = '37.5 g tube : dextrose (diabetic use) 40 % po ... |
what is the division north in 2007 08 | CREATE TABLE table_17881033_1 (division_north VARCHAR,season VARCHAR) | SELECT division_north FROM table_17881033_1 WHERE season = "2007–08" |
give me the number of patients whose age is less than 59 and drug name is ranitidine? | 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 diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "59" AND prescriptions.drug = "Ranitidine" |
How many different end dates are there for the series seen by 4.2 million people? | CREATE TABLE table_2980 ("Series" real,"Start date" text,"End date" text,"Episodes" real,"Average viewers (millions)" text) | SELECT COUNT("End date") FROM table_2980 WHERE "Average viewers (millions)" = '4.2' |
list all flights from BOSTON to SAN FRANCISCO with the maximum number of stops | CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE code_description (code varchar,description text)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE aircraft (aircraft_code varchar,aircraft_descrip... | 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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND flight.stops = (SELECT MAX(FLIGHTalias1.stops) FROM airport_service AS... |
What's the largest pick number for corrie d'alessio with a rd number over 6? | CREATE TABLE table_name_34 (pick__number INTEGER,player VARCHAR,rd__number VARCHAR) | SELECT MAX(pick__number) FROM table_name_34 WHERE player = "corrie d'alessio" AND rd__number > 6 |
What is the value of D 47 + when the value of D 44 O is r 24? | CREATE TABLE table_80441 ("D 48 +" text,"D 47 +" text,"D 46 +" text,"D 45 O" text,"D 44 O" text,"D 43 \u221a" text,"D 42 \u221a" text,"D 41 \u221a" text) | SELECT "D 47 +" FROM table_80441 WHERE "D 44 O" = 'r 24' |
what is the number of patients admitted before the year 2187 who have procedure icd9 code 3806? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2187" AND procedures.icd9_code = "3806" |
What manner of departure was Dick Advocaat replaced by? | CREATE TABLE table_7212 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Replaced by" text,"Date of appointment" text) | SELECT "Manner of departure" FROM table_7212 WHERE "Replaced by" = 'dick advocaat' |
count the number of patients whose insurance is medicaid and primary disease is mesenteric ischemia? | 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 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,marita... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Medicaid" AND demographic.diagnosis = "MESENTERIC ISCHEMIA" |
Show all countries and the number of people from each country with a bar chart. | CREATE TABLE church (Church_ID int,Name text,Organized_by text,Open_Date int,Continuation_of text)CREATE TABLE people (People_ID int,Name text,Country text,Is_Male text,Age int)CREATE TABLE wedding (Church_ID int,Male_ID int,Female_ID int,Year int) | SELECT Country, COUNT(*) FROM people GROUP BY Country |
Users from the Dominican Republic. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoRename time,Score n... | SELECT * FROM Users WHERE Location = 'Dominican Republic' ORDER BY Reputation DESC |
tell me the number of directors for arunthathi . | CREATE TABLE table_204_961 (id number,"title" text,"director" text,"production" text,"music" text,"cast" text,"release date" text) | SELECT "director" FROM table_204_961 WHERE "title" = 'arunthathi' |
when did the last microbiology test take place for patient 26313 in 03/last year? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses_icd (r... | SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26313) AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', microbiolo... |
What is the longitude of Carmenta Farra in 1994? | CREATE TABLE table_name_74 (longitude VARCHAR,year_named VARCHAR,name VARCHAR) | SELECT longitude FROM table_name_74 WHERE year_named = 1994 AND name = "carmenta farra" |
The EVA that started 8 July 12:38 was from what spacecraft? | CREATE TABLE table_50372 ("Start Date/Time" text,"Duration" text,"End Time" text,"Spacecraft" text,"Crew" text) | SELECT "Spacecraft" FROM table_50372 WHERE "Start Date/Time" = '8 july 12:38' |
What was the number of music directors where the suresh wadkar co singer of bhayanak? | CREATE TABLE table_11827596_4 (music_director VARCHAR,co_singer VARCHAR,film_name VARCHAR) | SELECT COUNT(music_director) FROM table_11827596_4 WHERE co_singer = "Suresh Wadkar" AND film_name = "Bhayanak" |
give me the number of patients who have had open biopsy of soft tissue procedure and stayed in the hospital for more than 20 days. | 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 procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "20" AND procedures.short_title = "Open biopsy soft tissue" |
Which Particle has a Makeup of d s s and a Spin (Parity) J P of 3 2 +? | CREATE TABLE table_56576 ("Particle" text,"Symbol" text,"Makeup" text,"Rest mass MeV / c 2" text,"Isospin I" text,"Spin (Parity) J P" text,"Commonly decays to" text) | SELECT "Particle" FROM table_56576 WHERE "Makeup" = 'd s s' AND "Spin ( Parity ) J P" = '3⁄2 +' |
Retrieve the title of the paper that has the largest number of authors. | CREATE TABLE authors (authid number,lname text,fname text)CREATE TABLE papers (paperid number,title text)CREATE TABLE inst (instid number,name text,country text)CREATE TABLE authorship (authid number,instid number,paperid number,authorder number) | SELECT t2.title FROM authorship AS t1 JOIN papers AS t2 ON t1.paperid = t2.paperid WHERE t1.authorder = (SELECT MAX(authorder) FROM authorship) |
What rank had less than 200 laps with a finish of 26? | CREATE TABLE table_14819 ("Year" text,"Start" text,"Qual" text,"Rank" text,"Finish" text,"Laps" real) | SELECT "Rank" FROM table_14819 WHERE "Laps" < '200' AND "Finish" = '26' |
what is the mission when the location is rome? | CREATE TABLE table_60650 ("Mission" text,"Location" text,"Type" text,"Head of Mission" text,"Position" text,"List" text) | SELECT "Mission" FROM table_60650 WHERE "Location" = 'rome' |
Find the total amount claimed in the most recently created document. | CREATE TABLE claims_processing (claim_processing_id number,claim_id number,claim_outcome_code text,claim_stage_id number,staff_id number)CREATE TABLE policies (policy_id number,customer_id number,policy_type_code text,start_date time,end_date time)CREATE TABLE claims_documents (claim_id number,document_type_code text,c... | SELECT SUM(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id = t2.claim_id WHERE t2.created_date = (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1) |
What club did united states player ty harden play for? | CREATE TABLE table_44483 ("Season" real,"Player" text,"Club" text,"Nationality" text,"Goals" real) | SELECT "Club" FROM table_44483 WHERE "Nationality" = 'united states' AND "Player" = 'ty harden' |
What is the human gene that has a mouse ortholog of LIG1? | CREATE TABLE table_name_27 (human_gene__protein_ VARCHAR,mouse_ortholog VARCHAR) | SELECT human_gene__protein_ FROM table_name_27 WHERE mouse_ortholog = "lig1" |
In what week was the game on August 24, 1956 played in front of 40,175 fans? | CREATE TABLE table_33345 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT MAX("Week") FROM table_33345 WHERE "Date" = 'august 24, 1956' AND "Attendance" > '40,175' |
What date was Notts County the opponent and the league position was 1st? | CREATE TABLE table_9674 ("Date" text,"Opponents" text,"H / A" text,"Result F \u2013 A" text,"Attendance" real,"League position" text) | SELECT "Date" FROM table_9674 WHERE "Opponents" = 'notts county' AND "League position" = '1st' |
When the change (2011 to 2012) is +13.4% what is the country? | CREATE TABLE table_19572 ("Rank" real,"Country" text,"International tourist arrivals (2012)" text,"International tourist arrivals (2011)" text,"Change (2011 to 2012)" text,"Change (2010 to 2011)" text) | SELECT "Country" FROM table_19572 WHERE "Change (2011 to 2012)" = '+13.4%' |
get the number of patients diagnosed with acute pancreatitis who have main type drug prescription. | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Acute pancreatitis" AND prescriptions.drug_type = "MAIN" |
Find the number of the names of catalog entries with level number 8, list by the x axis in desc. | CREATE TABLE Catalog_Structure (catalog_level_number INTEGER,catalog_id INTEGER,catalog_level_name VARCHAR(50))CREATE TABLE Catalog_Contents_Additional_Attributes (catalog_entry_id INTEGER,catalog_level_number INTEGER,attribute_id INTEGER,attribute_value VARCHAR(255))CREATE TABLE Attribute_Definitions (attribute_id INT... | SELECT catalog_entry_name, COUNT(catalog_entry_name) FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id = t2.catalog_entry_id WHERE t2.catalog_level_number = "8" GROUP BY catalog_entry_name ORDER BY catalog_entry_name DESC |
calculate the two year survival rate of those who were diagnosed with valve replacement < 7days - mitral. | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname tex... | SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI... |
Show me the proportion on what are the names of the technicians and how many machines are they assigned to repair? | CREATE TABLE repair (repair_ID int,name text,Launch_Date text,Notes text)CREATE TABLE machine (Machine_ID int,Making_Year int,Class text,Team text,Machine_series text,value_points real,quality_rank int)CREATE TABLE technician (technician_id real,Name text,Team text,Starting_Year real,Age int)CREATE TABLE repair_assignm... | SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name |
Which buildings have more than one company offices? Give me the building names. | CREATE TABLE companies (id number,name text,headquarters text,industry text,sales_billion number,profits_billion number,assets_billion number,market_value_billion text)CREATE TABLE office_locations (building_id number,company_id number,move_in_year number)CREATE TABLE buildings (id number,name text,city text,height num... | SELECT T2.name FROM office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN companies AS T3 ON T1.company_id = T3.id GROUP BY T1.building_id HAVING COUNT(*) > 1 |
What is the number of air dates titled 'The Big Job'? | CREATE TABLE table_3518 ("Episode #" text,"Season Episode #" text,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Prod. code" text) | SELECT COUNT("Original air date") FROM table_3518 WHERE "Title" = 'The Big Job' |
What year was Caroline Medina Miss Fire (3rd Runner-up)? | CREATE TABLE table_13713 ("Year" real,"MISS EARTH" text,"Miss Air (1st Runner-up)" text,"Miss Water (2nd Runner-up)" text,"Miss Fire (3rd Runner-up)" text) | SELECT AVG("Year") FROM table_13713 WHERE "Miss Fire (3rd Runner-up)" = 'caroline medina' |
What opposition do 31.1% of Social Democrats have? | CREATE TABLE table_name_70 (opposition VARCHAR,social_democrats__a_ VARCHAR) | SELECT opposition FROM table_name_70 WHERE social_democrats__a_ = "31.1%" |
Return a pie chart showing how many members have visited for each college location. | CREATE TABLE member (Member_ID int,Name text,Country text,College_ID int)CREATE TABLE round (Round_ID int,Member_ID int,Decoration_Theme text,Rank_in_Round int)CREATE TABLE college (College_ID int,Name text,Leader_Name text,College_Location text) | SELECT College_Location, COUNT(College_Location) FROM college AS T1 JOIN member AS T2 ON T1.College_ID = T2.College_ID GROUP BY College_Location ORDER BY T2.Name |
What is the Nat with a mutual consent loan return and has a free transfer fee? | CREATE TABLE table_49583 ("Nat." text,"Name" text,"Moving to" text,"Type" text,"Transfer window" text,"Transfer fee" text,"Source" text) | SELECT "Nat." FROM table_49583 WHERE "Transfer fee" = 'free' AND "Type" = 'mutual consent loan return' |
What is the lowest draw that is greater than 0 and byes greater than 0? | CREATE TABLE table_name_8 (losses INTEGER,draws VARCHAR,byes VARCHAR) | SELECT MIN(losses) FROM table_name_8 WHERE draws > 0 AND byes > 0 |
What is the highest urban population for Guangxi province? | CREATE TABLE table_8969 ("City" text,"Chinese" text,"Pinyin" text,"Province" text,"Urban Population (2010)" real,"Administrative Population (2010)" real) | SELECT MAX("Urban Population (2010)") FROM table_8969 WHERE "Province" = 'guangxi' |
Which Channel has an Aspect of 4:3 and a Programming of me-tv? | CREATE TABLE table_8257 ("Channel" real,"Video" text,"Aspect" text,"PSIP Short Name" text,"Programming" text) | SELECT "Channel" FROM table_8257 WHERE "Aspect" = '4:3' AND "Programming" = 'me-tv' |
what is the number of patients whose age is less than 89 and drug code is meto10i? | CREATE TABLE diagnoses (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 tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "89" AND prescriptions.formulary_drug_cd = "METO10I" |
What are the names of all singers that are from the UK and released a song in English? | CREATE TABLE genre (g_name text,rating text,most_popular_in text)CREATE TABLE song (song_name text,artist_name text,country text,f_id number,genre_is text,rating number,languages text,releasedate time,resolution number)CREATE TABLE files (f_id number,artist_name text,file_size text,duration text,formats text)CREATE TAB... | SELECT artist_name FROM artist WHERE country = "UK" INTERSECT SELECT T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.languages = "english" |
Who was the Away captain for the Test match of Australia in England where the Result was AUS by 264 runs? | CREATE TABLE table_71660 ("Date" text,"Home captain" text,"Away captain" text,"Venue" text,"Result" text) | SELECT "Away captain" FROM table_71660 WHERE "Result" = 'aus by 264 runs' |
What was the Zakspeed 1500/4 1.5 l4 t chassis? | CREATE TABLE table_name_42 (chassis VARCHAR,engine VARCHAR) | SELECT chassis FROM table_name_42 WHERE engine = "zakspeed 1500/4 1.5 l4 t" |
what was the name of the organism that was found on the first blood, venipuncture microbiology test patient 031-16123 received since 09/2104? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,syst... | SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-16123')) AND microlab.culturesite = 'blood, venipuncture' AND STRFTIM... |
How many different combinations of scores by individual judges were given to the contestant competing against Mukul Dev? | CREATE TABLE table_18278508_6 (scores_by_each_individual_judge VARCHAR,co_contestant__yaar_vs_pyaar_ VARCHAR) | SELECT COUNT(scores_by_each_individual_judge) FROM table_18278508_6 WHERE co_contestant__yaar_vs_pyaar_ = "Mukul Dev" |
provide the number of patients whose ethnicity is black/cape verdean and lab test name is potassium, urine? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND lab.label = "Potassium, Urine" |
In the final against Ashley Harkleroad what was the score? | CREATE TABLE table_name_21 (score VARCHAR,opponent_in_the_final VARCHAR) | SELECT score FROM table_name_21 WHERE opponent_in_the_final = "ashley harkleroad" |
find the number of patients admitted in emergency whose drug route is ed. | CREATE TABLE diagnoses (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 demographic (subject_id text,hadm_id text,name text,marital... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND prescriptions.route = "ED" |
what is the difference between the population of ovada and the population of serravalle scrivia ? | CREATE TABLE table_203_413 (id number,"rank" text,"city" text,"population" number,"area\n(km2)" number,"density\n(inhabitants/km2)" number,"altitude\n(mslm)" number) | SELECT (SELECT "population" FROM table_203_413 WHERE "city" = 'ovada') - (SELECT "population" FROM table_203_413 WHERE "city" = 'serravalle scrivia') |
What was drawn for 6 bonus points and is against 410 points? | CREATE TABLE table_51026 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Points difference" text,"Bonus Points" text,"Points" text) | SELECT "Drawn" FROM table_51026 WHERE "Bonus Points" = '6' AND "Points against" = '410' |
what is the maximum total hospital cost to include a procedure called treatment of hypernatremia - desmopressin this year? | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyna... | SELECT MAX(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 treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'treatment of hypernatremia - desmopressin'))... |
What is the lowest To Par, when Player is 'Johnny Miller'? | CREATE TABLE table_name_76 (to_par INTEGER,player VARCHAR) | SELECT MIN(to_par) FROM table_name_76 WHERE player = "johnny miller" |
how many patients had the drug code syringes and lab test fluid other body fluid? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "SYRINGENS" AND lab.fluid = "Other Body Fluid" |
Is 633 offered next term ? | CREATE TABLE program_course (program_id int,course_id int,workload int,category varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comm... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 633 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 |
Top Average Answer Scores - Mathematica Tags. | CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)... | WITH scores AS (SELECT DISTINCT u.Id AS UserId, a.Title, a.Id AS "Post Link", a.Score FROM Posts AS q INNER JOIN PostTags AS xqt ON xqt.PostId = q.Id INNER JOIN Tags AS t ON t.Id = xqt.TagId AND t.TagName LIKE '%mathematica%' INNER JOIN Posts AS a ON a.ParentId = q.Id INNER JOIN PostTypes AS pt ON pt.Id = a.PostTypeId ... |
What was the score of the game that led to an 80-63 record? | CREATE TABLE table_5670 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text) | SELECT "Score" FROM table_5670 WHERE "Record" = '80-63' |
At which venue did the game on 28 october 2013 take place? | CREATE TABLE table_name_5 (venue VARCHAR,date VARCHAR) | SELECT venue FROM table_name_5 WHERE date = "28 october 2013" |
How many employees does each role have? Plot a bar chart listing role id and number of employees, and could you order Y in descending order? | CREATE TABLE Document_Drafts (document_id INTEGER,draft_number INTEGER,draft_details VARCHAR(255))CREATE TABLE Ref_Document_Types (document_type_code CHAR(15),document_type_description VARCHAR(255))CREATE TABLE Documents (document_id INTEGER,document_status_code CHAR(15),document_type_code CHAR(15),shipping_agent_code ... | SELECT T1.role_code, COUNT(*) FROM Roles AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code ORDER BY COUNT(*) DESC |
WHAT IS THE THIRD WITH LEAD CINDY SIMMONS? | CREATE TABLE table_name_76 (third VARCHAR,lead VARCHAR) | SELECT third FROM table_name_76 WHERE lead = "cindy simmons" |
What is set 3 on week 6? | CREATE TABLE table_name_1 (set_3 VARCHAR,week VARCHAR) | SELECT set_3 FROM table_name_1 WHERE week = 6 |
what is the name of the drug that patient 79348 was prescribed after the chf nos diagnosis in 08/this year, within 2 days? | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,chartti... | SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 79348 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'chf no... |
What is the sum amount of fall 05 when fall 08 is more than 5, fall 06 is more than 7, the state is Maryland, and fall 09 is more than 471? | CREATE TABLE table_name_31 (fall_05 VARCHAR,fall_09 VARCHAR,states VARCHAR,fall_08 VARCHAR,fall_06 VARCHAR) | SELECT COUNT(fall_05) FROM table_name_31 WHERE fall_08 > 5 AND fall_06 > 7 AND states = "maryland" AND fall_09 > 471 |
What was the role for Challenge TV? | CREATE TABLE table_14642 ("Year" text,"Title" text,"Role" text,"Episodes" text,"Broadcaster" text) | SELECT "Role" FROM table_14642 WHERE "Broadcaster" = 'challenge tv' |
count the number of patients whose insurance is medicare and diagnosis short title is chronic diastolic heart failure. | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.short_title = "Chr diastolic hrt fail" |
what are the three most frequently occurrences of output events this year? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature ... | SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY intakeoutput.celllabel) AS ... |
what is the earliest flight arriving in CHARLOTTE from ST. LOUIS on friday | 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 date_day (month_number int,day_number int,year int,day_name varchar)CR... | 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, date_day, days, flight WHERE (((((flight.departure_time > flight.arrival_time) AND date_day.day_number = 25 AND date_day.month_number = 6 AND date_day.year = 1991 AND days.da... |
current evidence or history in past two years of epilepsy, seizure, focal brain lesion, head injury with loss of consciousness or dsm iv criteria for any major psychiatric disorder including psychosis, major depression, bipolar disorder, severe alcohol or substance abuse. | CREATE TABLE table_train_124 ("id" int,"loss_of_consciousness" bool,"serum_glucose" bool,"myelosuppression" bool,"retinoids_hepatotoxic" bool,"pulmonary_disease" bool,"etiology" bool,"abnormal_thyroid_function" bool,"laboratory_abnormality" bool,"chest_pain" bool,"dsm_iv_criteria" bool,"neurodegenerative_disease" bool,... | SELECT * FROM table_train_124 WHERE epilepsy = 1 OR seizure_disorder = 1 OR focal_brain_lesion = 1 OR (head_injury = 1 AND loss_of_consciousness = 1) OR dsm_iv_criteria = 1 OR (major_psychiatric_disorder = 1 OR psychosis = 1 OR major_depression = 1 OR bipolar_disorder = 1 OR alcohol_abuse = 1 OR substance_dependence = ... |
What is the firefox value with a 1.8% opera on 30 July 2007? | CREATE TABLE table_name_22 (firefox VARCHAR,opera VARCHAR,date VARCHAR) | SELECT firefox FROM table_name_22 WHERE opera = "1.8%" AND date = "30 july 2007" |
provide the number of patients whose diagnoses icd9 code is 77089 and lab test fluid is other fluid. | 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 procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "77089" AND lab.fluid = "Other Body Fluid" |
What is the highest run currently since the last title in 2010, and a season in Esiliiga larger than 10? | CREATE TABLE table_41467 ("Club" text,"2012" text,"Seasons in Esiliiga" real,"Current run since" real,"Titles" real,"Last title" text) | SELECT MAX("Current run since") FROM table_41467 WHERE "Last title" = '2010' AND "Seasons in Esiliiga" > '10' |
so whats the first weight of patient 14749 in 03/2103? | CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE inputevents_cv... | 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 = 14749)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit wt'... |
How many patients have lab test abnormal status as delta and lab test name as folate? | 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 procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.flag = "delta" AND lab.label = "Folate" |
What are the names of players whose training hours is between 500 and 1500? | CREATE TABLE college (cname text,state text,enr number)CREATE TABLE tryout (pid number,cname text,ppos text,decision text)CREATE TABLE player (pid number,pname text,ycard text,hs number) | SELECT pname FROM player WHERE hs BETWEEN 500 AND 1500 |
how many patients whose insurance is private and discharge location is rehab/distinct part hosp? | 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 procedures (subject_id text,hadm_id te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.discharge_location = "REHAB/DISTINCT PART HOSP" |
What's the attendance when the opponents are cambridge united? | CREATE TABLE table_59499 ("Date" text,"Opponents" text,"H / A" text,"Result F \u2013 A" text,"Attendance" real) | SELECT "Attendance" FROM table_59499 WHERE "Opponents" = 'cambridge united' |
What was the original name of the ship 'Ajax'? | CREATE TABLE table_69335 ("Ship" text,"Builder" text,"Namesake" text,"Renamed" text,"Laid down" text,"Launched" text,"Commissioned or completed(*)" text) | SELECT "Renamed" FROM table_69335 WHERE "Ship" = 'ajax' |
What is the sum of points when Bruce Arena has 21 wins? | CREATE TABLE table_name_96 (pts INTEGER,wins VARCHAR,coach VARCHAR) | SELECT SUM(pts) FROM table_name_96 WHERE wins = 21 AND coach = "bruce arena" |
How many different professors are there for the different schools Show bar chart, sort bars from high to low order. | CREATE TABLE CLASS (CLASS_CODE varchar(5),CRS_CODE varchar(10),CLASS_SECTION varchar(2),CLASS_TIME varchar(20),CLASS_ROOM varchar(8),PROF_NUM int)CREATE TABLE COURSE (CRS_CODE varchar(10),DEPT_CODE varchar(10),CRS_DESCRIPTION varchar(35),CRS_CREDIT float(8))CREATE TABLE ENROLL (CLASS_CODE varchar(5),STU_NUM int,ENROLL_... | SELECT SCHOOL_CODE, COUNT(*) FROM DEPARTMENT AS T1 JOIN PROFESSOR AS T2 ON T1.DEPT_CODE = T2.DEPT_CODE GROUP BY T1.SCHOOL_CODE ORDER BY SCHOOL_CODE DESC |
what was the purse ($) in illinois? | CREATE TABLE table_name_80 (purse__ INTEGER,location VARCHAR) | SELECT MAX(purse__) AS $__ FROM table_name_80 WHERE location = "illinois" |
List all customers names in the alphabetical order. | CREATE TABLE checking (custid number,balance number)CREATE TABLE accounts (custid number,name text)CREATE TABLE savings (custid number,balance number) | SELECT name FROM accounts ORDER BY name |
Name the total number of opponent for october 3 | CREATE TABLE table_24126606_2 (opponent VARCHAR,date VARCHAR) | SELECT COUNT(opponent) FROM table_24126606_2 WHERE date = "October 3" |
When did the away team score 7.16 (58)? | CREATE TABLE table_58463 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Date" FROM table_58463 WHERE "Away team score" = '7.16 (58)' |
For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the sum of salary bin hire_date by time, sort total number in ascending order. | CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(... | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(SALARY) |
Which Species Specific has a Link of server/sourcecode? | CREATE TABLE table_name_53 (species_specific VARCHAR,link VARCHAR) | SELECT species_specific FROM table_name_53 WHERE link = "server/sourcecode" |
what is the number of patients whose primary disease is atrial septal defect\mitral valve replacement;repair atrial-septal defect/sda and year of birth is less than 2111? | 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 WHERE demographic.diagnosis = "ATRIAL SEPTAL DEFECT\MITRAL VALVE REPLACEMENT;REPAIR ATRIAL-SEPTAL DEFECT/SDA" AND demographic.dob_year < "2111" |
count the number of patients whose procedure short title is abdomen artery incision? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Abdomen artery incision" |
give me a flight from NEWARK to TAMPA on friday | CREATE TABLE airline (airline_code varchar,airline_name text,note text)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... | 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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TAMPA' AND date_day.day_number = 25 AND date_day.month_number = 6 AND dat... |
Which year had e34 Nimzo-Indian defence is the opening? | CREATE TABLE table_12941 ("White" text,"Black" text,"Year" real,"Result" text,"Moves" real,"Tournament" text,"Opening" text) | SELECT "Year" FROM table_12941 WHERE "Opening" = 'e34 nimzo-indian defence' |
which age range had the largest percentage for other religion ? | CREATE TABLE table_203_770 (id number,"ages attained (years)" text,"catholic" text,"protestant and other christian" text,"other religion" text,"none or not stated" text) | SELECT "ages attained (years)" FROM table_203_770 ORDER BY "other religion" DESC LIMIT 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.