instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
what is the correct year for # / county of 09 cass? | CREATE TABLE table_69434 ("School" text,"Location" text,"Mascot" text,"# / County" text,"IHSAA Class" text,"Year Joined" real,"Previous Conference" text) | SELECT "Year Joined" FROM table_69434 WHERE "# / County" = '09 cass' |
5th career/salary of restaurant manager ($250,000) had what 2nd career/salary? | CREATE TABLE table_38694 ("Career Card" text,"Starting career/salary" text,"2nd career/salary" text,"3rd career/salary" text,"4th career/salary" text,"5th career/salary" text,"6th career/salary" text) | SELECT "2nd career/salary" FROM table_38694 WHERE "5th career/salary" = 'restaurant manager ($250,000)' |
What are the result description of the project whose detail is 'sint'? | CREATE TABLE Projects (project_id VARCHAR,project_details VARCHAR)CREATE TABLE Project_outcomes (outcome_code VARCHAR,project_id VARCHAR)CREATE TABLE Research_outcomes (outcome_description VARCHAR,outcome_code VARCHAR) | SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code = T2.outcome_code JOIN Projects AS T3 ON T2.project_id = T3.project_id WHERE T3.project_details = 'sint' |
What was the result from the 2000 asian cup qualification? | CREATE TABLE table_name_58 (result VARCHAR,competition VARCHAR) | SELECT result FROM table_name_58 WHERE competition = "2000 asian cup qualification" |
What city has larger than 94.1 as a frequency? | CREATE TABLE table_name_62 (city_of_license VARCHAR,frequency_mhz INTEGER) | SELECT city_of_license FROM table_name_62 WHERE frequency_mhz > 94.1 |
who is ranked # 1 ? | CREATE TABLE table_204_302 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT "nation" FROM table_204_302 WHERE "rank" = 1 |
What was the result for the fil Paljas? | CREATE TABLE table_38191 ("Year (Ceremony)" text,"Film title" text,"Language(s)" text,"Director" text,"Result" text) | SELECT "Result" FROM table_38191 WHERE "Film title" = 'paljas' |
In 2005-06 what was the disaster? | CREATE TABLE table_11649123_1 (disaster VARCHAR,year VARCHAR) | SELECT disaster FROM table_11649123_1 WHERE year = "2005-06" |
What is the place of Mark O'Meara? | CREATE TABLE table_name_28 (place VARCHAR,player VARCHAR) | SELECT place FROM table_name_28 WHERE player = "mark o'meara" |
For those records from the products and each product's manufacturer, give me the comparison about the average of code over the name , and group by attribute name by a bar chart, I want to show by the X-axis in descending. | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC |
who ranked number 8 after jose meolans finished in 7th ? | CREATE TABLE table_204_3 (id number,"rank" number,"name" text,"nationality" text,"time" number) | SELECT "name" FROM table_204_3 WHERE "rank" = 8 |
How many patients with morbid obesity/sda primary disease had a csf lab test? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND lab.fluid = "Cerebrospinal Fluid (CSF)" |
name the only team whose percentage change was positive . | CREATE TABLE table_203_561 (id number,"pos" number,"team" text,"total" number,"high" number,"low" number,"average" number,"change" text) | SELECT "team" FROM table_203_561 WHERE "change" > 0 |
What is the average total medals of the nation with 4 bronze and more than 1 silver medals? | CREATE TABLE table_name_94 (total INTEGER,bronze VARCHAR,silver VARCHAR) | SELECT AVG(total) FROM table_name_94 WHERE bronze = 4 AND silver > 1 |
what was the name of drug that was prescribed first to patient 021-111547 in 12/this year? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunits... | SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-111547')) AND DATETIME(medication.drugstarttime, 'start of year... |
List the names of buildings in descending order of building height. | CREATE TABLE buildings (id number,name text,city text,height number,stories number,status text)CREATE TABLE office_locations (building_id number,company_id number,move_in_year number)CREATE TABLE companies (id number,name text,headquarters text,industry text,sales_billion number,profits_billion number,assets_billion nu... | SELECT name FROM buildings ORDER BY height DESC |
What year was the race in Vienna, Austria? | CREATE TABLE table_67680 ("Year" real,"Tournament" text,"Venue" text,"Result" text,"Extra" text) | SELECT MIN("Year") FROM table_67680 WHERE "Venue" = 'vienna, austria' |
Name the 1st place for limoges csp | CREATE TABLE table_24144 ("Season" text,"1st Place" text,"2nd Place" text,"3rd Place" text,"4th Place" text) | SELECT "1st Place" FROM table_24144 WHERE "3rd Place" = 'Limoges CSP' |
What is average age for different job title Visualize by bar chart, I want to display by the job from high to low. | CREATE TABLE Person (name varchar(20),age INTEGER,city TEXT,gender TEXT,job TEXT)CREATE TABLE PersonFriend (name varchar(20),friend varchar(20),year INTEGER) | SELECT job, AVG(age) FROM Person GROUP BY job ORDER BY job DESC |
Which customer status code has least number of customers? | CREATE TABLE Customers (customer_status_code VARCHAR) | SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY COUNT(*) LIMIT 1 |
Give me a pie chart to reflect the proportion of All_Home and the sum of School_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_Home, SUM(School_ID) FROM basketball_match GROUP BY All_Home |
What is the grid total associated with 18 laps? | CREATE TABLE table_name_35 (grid VARCHAR,laps VARCHAR) | SELECT COUNT(grid) FROM table_name_35 WHERE laps = 18 |
what was the monthly maximum amount of urine catheter given to patient 009-12985 until 62 months ago? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicm... | SELECT MAX(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 = '009-12985')) AND intakeoutput.celllabel = 'urine... |
what is the language when the english translation is come to me? | CREATE TABLE table_62274 ("Draw" real,"Language" text,"Artist" text,"Song" text,"English translation" text,"National final" text,"Place" real,"Points" real) | SELECT "Language" FROM table_62274 WHERE "English translation" = 'come to me' |
What years did the Nashville Metros have Usisl Indoor League? | CREATE TABLE table_71360 ("Year" text,"Division" text,"League" text,"Regular Season" text,"Playoffs" text) | SELECT "Year" FROM table_71360 WHERE "League" = 'usisl indoor' |
Tell me the highest laps for time/retired of +2 laps and driver of felice bonetto | CREATE TABLE table_name_24 (laps INTEGER,time_retired VARCHAR,driver VARCHAR) | SELECT MAX(laps) FROM table_name_24 WHERE time_retired = "+2 laps" AND driver = "felice bonetto" |
Amount of unique users for a tag (or 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)... | SELECT Id FROM Tags WHERE TagName IN ('office-js') |
WHAT SEASON HAD COACH JONAS KAZLAUSKAS AT champions cup group stage? | CREATE TABLE table_60992 ("Season" text,"LKF Cup" text,"Regional Competitions" text,"Europe" text,"Head Coach" text) | SELECT "Season" FROM table_60992 WHERE "Head Coach" = 'jonas kazlauskas' AND "Europe" = 'champions cup group stage' |
what's last arterial bp [diastolic] value of patient 4368 on 05/28/2105? | CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE d_labitems (row_id number,itemid number,l... | 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 = 4368)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial b... |
What is the latest date with Cores per die / Dies per module of 2 / 1, and a Clock of 1.4-1.6ghz? | CREATE TABLE table_34691 ("Date" real,"Name" text,"Developer" text,"Clock" text,"Process" text,"Cores per die / Dies per module" text) | SELECT MAX("Date") FROM table_34691 WHERE "Cores per die / Dies per module" = '2 / 1' AND "Clock" = '1.4-1.6ghz' |
What competition has a goal number of 13? | CREATE TABLE table_name_49 (competition VARCHAR,goal VARCHAR) | SELECT competition FROM table_name_49 WHERE goal = 13 |
Which date had 67,472 in attendance? | CREATE TABLE table_name_73 (date VARCHAR,attendance VARCHAR) | SELECT date FROM table_name_73 WHERE attendance = "67,472" |
how much is the change of respiration of patient 006-36108 last measured on the first icu visit compared to the value first measured on the first icu visit? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE diagnosis (diagnosisid number,patientun... | SELECT (SELECT vitalperiodic.respiration FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-36108') AND NOT patient.unitdischargetime I... |
Which Date has a Crowd smaller than 4,485? | CREATE TABLE table_name_72 (date VARCHAR,crowd INTEGER) | SELECT date FROM table_name_72 WHERE crowd < 4 OFFSET 485 |
For those employees who did not have any job in the past, give me the trend about department_id over hire_date , display in ascending by the HIRE_DATE. | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,... | SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE |
What was the final score of the game against Lenka Novotn ? | CREATE TABLE table_name_29 (score VARCHAR,opponent_in_the_final VARCHAR) | SELECT score FROM table_name_29 WHERE opponent_in_the_final = "lenka novotná" |
first time patient 2514 got a procedure since 2103? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime t... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 2514) AND STRFTIME('%y', procedures_icd.charttime) >= '2103' ORDER BY procedures_icd.charttime LIMIT 1 |
What is the Opponent at the game with Attendance of 68,436? | CREATE TABLE table_name_97 (opponent VARCHAR,attendance VARCHAR) | SELECT opponent FROM table_name_97 WHERE attendance = "68,436" |
what's the date with tournament value of ford senior players championship | CREATE TABLE table_11621915_1 (date VARCHAR,tournament VARCHAR) | SELECT date FROM table_11621915_1 WHERE tournament = "Ford Senior Players Championship" |
what are the four drugs most frequently prescribed during the same hospital visit to the patients aged 60 or above after being diagnosed with neutropenia nos in 2100? | CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_icd_diagn... | SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_... |
What is the highest league up with less than 3 championships, a total less than 2, and a FA cup larger than 0? | CREATE TABLE table_62186 ("Name" text,"Championship" real,"League Cup" real,"FA Cup" real,"Total" real) | SELECT MAX("League Cup") FROM table_62186 WHERE "Championship" < '3' AND "Total" < '2' AND "FA Cup" > '0' |
how many procedures of ex cereb meningeal les have been performed in the previous year? | CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_icd_procedures (row_id num... | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'ex cereb meningeal les') AND DATETIME(procedures_icd.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') |
On what date was the result 106-105? | CREATE TABLE table_5050 ("Game" text,"Date" text,"Home Team" text,"Result" text,"Road Team" text) | SELECT "Date" FROM table_5050 WHERE "Result" = '106-105' |
What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment? | CREATE TABLE departments (department_id number,dept_store_id number,department_name text)CREATE TABLE customers (customer_id number,payment_method_code text,customer_code text,customer_name text,customer_address text,customer_phone text,customer_email text)CREATE TABLE product_suppliers (product_id number,supplier_id n... | SELECT customer_id, customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code <> "Credit Card" |
how much does it cost for patient 27591's hospital stay until 2102. | 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 text,ethnicity text,age number)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icust... | SELECT SUM(cost.cost) FROM cost WHERE cost.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27591) AND STRFTIME('%y', cost.chargetime) <= '2102' |
What is the largest 2000 GDP when the 2008 GDP is smaller than 3,632, 2010 GDP is 2,558 and 2009 GDP is larger than 2,239? | CREATE TABLE table_52806 ("Year" text,"2010" real,"2009" real,"2008" real,"2005" real,"2000" real,"1995" real,"1990" real,"1985" real) | SELECT MAX("2000") FROM table_52806 WHERE "2008" < '3,632' AND "2010" = '2,558' AND "2009" > '2,239' |
what is a procedure patient 006-181433 received for the first time on the current hospital visit? | 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 treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-181433' AND patient.hospitaldischargetime IS NULL)) ORDER BY ... |
What is Hasan Shah's hometown? | CREATE TABLE table_14757 ("Series" text,"Name" text,"Hometown" text,"Occupation" text,"Status" text) | SELECT "Hometown" FROM table_14757 WHERE "Name" = 'hasan shah' |
on how many dates was the sum of the scores at most 10 ? | CREATE TABLE table_204_418 (id number,"date" text,"opponent" text,"score" text,"overall record" text,"scba record" text) | SELECT COUNT("date") FROM table_204_418 WHERE "score" + "score" <= 10 |
Frequency MHz smaller than 95.3, and a Call sign of k234ag is what class? | CREATE TABLE table_75602 ("Call sign" text,"Frequency MHz" real,"City of license" text,"ERP W" real,"Class" text,"FCC info" text) | SELECT "Class" FROM table_75602 WHERE "Frequency MHz" < '95.3' AND "Call sign" = 'k234ag' |
what is admission type and admission location of subject name jerry deberry? | 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 demographic.admission_type, demographic.admission_location FROM demographic WHERE demographic.name = "Jerry Deberry" |
Was it a win or loss for Wanganui in round 3? | CREATE TABLE table_26847237_1 (win_loss VARCHAR,round__number VARCHAR) | SELECT win_loss FROM table_26847237_1 WHERE round__number = "Round 3" |
how many zogby international polls took place in the month of august ? | CREATE TABLE table_203_43 (id number,"polling firm" text,"month" text,"link" text,"favor" number,"oppose" number) | SELECT COUNT("polling firm") FROM table_203_43 WHERE "polling firm" = 'zogby international' AND "month" = 8 |
Who was the home team when the away team scored 5.9 (39)? | CREATE TABLE table_33414 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Home team score" FROM table_33414 WHERE "Away team score" = '5.9 (39)' |
Who was the Partner in the Algiers 2, Algeria Tournament? | CREATE TABLE table_62689 ("Date" text,"Tournament" text,"Surface" text,"Partner" text,"Opponents" text,"Score" text) | SELECT "Partner" FROM table_62689 WHERE "Tournament" = 'algiers 2, algeria' |
What is the Nationality of the Aracataca Ship? | CREATE TABLE table_49747 ("Date" text,"Ship" text,"Nationality" text,"Tonnage" real,"Fate" text) | SELECT "Nationality" FROM table_49747 WHERE "Ship" = 'aracataca' |
Which opponent has an attendance greater than 29,904 and 11-8 as the record? | CREATE TABLE table_80454 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text) | SELECT "Opponent" FROM table_80454 WHERE "Attendance" > '29,904' AND "Record" = '11-8' |
WHO DID THE RAPTORS PLAY ON JANUARY 9? | CREATE TABLE table_20342 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Team" FROM table_20342 WHERE "Date" = 'January 9' |
how many days have elapsed since the first time patient 10855 had an intake of .9% normal saline on the current icu visit? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost nu... | SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', inputevents_cv.charttime)) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10855) AND icustays.outtime IS NULL) ... |
the number of points daniel willemsen scored with his passenger | CREATE TABLE table_203_295 (id number,"position" number,"driver / passenger" text,"equipment" text,"points" number,"wins" number,"second" number,"third" number) | SELECT "points" FROM table_203_295 WHERE "driver / passenger" = 'daniel willemsen' |
Plot the total number by grouped by country as a bar graph, and order by the y axis from low to high please. | 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 Country, COUNT(*) FROM member GROUP BY Country ORDER BY COUNT(*) |
I want the lowest Laps for time/retired of engine and driver of charles de tornaco | CREATE TABLE table_10694 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT MIN("Laps") FROM table_10694 WHERE "Time/Retired" = 'engine' AND "Driver" = 'charles de tornaco' |
how many patients of black/cape verdean ethnicity are born before 2184? | 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 lab (subject_id text,hadm_id text,itemid text,charttime tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.dob_year < "2184" |
What is the score for Hawthorn as an away team? | CREATE TABLE table_32732 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team score" FROM table_32732 WHERE "Away team" = 'hawthorn' |
How many million viewers watched episode number 20? | CREATE TABLE table_21025437_5 (viewers__millions_ VARCHAR,episode_no VARCHAR) | SELECT viewers__millions_ FROM table_21025437_5 WHERE episode_no = 20 |
What was the installation date in El Paso, Texas? | CREATE TABLE table_73337 ("Chapter" text,"Installation Date" text,"Institution" text,"Location" text,"Inactive" text) | SELECT "Installation Date" FROM table_73337 WHERE "Location" = 'El Paso, Texas' |
What is the title when the series # is 7? | CREATE TABLE table_29747178_2 (title VARCHAR,series__number VARCHAR) | SELECT title FROM table_29747178_2 WHERE series__number = 7 |
The U.S. airdate of 8 august 2008 also had canadian airdates of what? | CREATE TABLE table_10935205_1 (canadian_airdate VARCHAR,us_airdate VARCHAR) | SELECT canadian_airdate FROM table_10935205_1 WHERE us_airdate = "8 August 2008" |
in 2103, what were the five most frequent medications prescribed to patients in the same hospital encounter after the diagnosis of pain? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime ti... | SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'pain' AND STRFT... |
What is Current Rank, when Ring Name is Tamaasuka Daisuke? | CREATE TABLE table_40074 ("Ring name" text,"Current rank" text,"Debut" text,"Stable" text,"Birthplace" text) | SELECT "Current rank" FROM table_40074 WHERE "Ring name" = 'tamaasuka daisuke' |
give me the number of patients with procedure icd9 code 966 who were admitted in hospital before 2138. | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2138" AND procedures.icd9_code = "966" |
Can you tell me the Attendance that has the Date of april 12? | CREATE TABLE table_67806 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text) | SELECT "Attendance" FROM table_67806 WHERE "Date" = 'april 12' |
Name the aircraft type for jagdgeschwader 6 | CREATE TABLE table_30482 ("Parent unit" text,"Geschwader Base" text,"Unit (Gruppe/Staffel)" text,"Aircraft Type" text,"Commanding Officer" text) | SELECT "Aircraft Type" FROM table_30482 WHERE "Parent unit" = 'Jagdgeschwader 6' |
What inclination has a semimajor axis of 20 au? | CREATE TABLE table_name_16 (inclination VARCHAR,semimajor_axis___au__ VARCHAR) | SELECT inclination FROM table_name_16 WHERE semimajor_axis___au__ = "20 au" |
since 5 years ago patient 16571 was diagnosed with a special symptom nec/nos? | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id ... | 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 = 'special symptom nec/nos') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16571) AND DATETIME(diagnoses... |
look for the route of drug administration and primary disease of patient marilyn norvell. | 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 text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd t... | SELECT demographic.diagnosis, prescriptions.route FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Marilyn Norvell" |
provide the number of patients whose diagnoses is crn ath atlg vn bps grft and lab test category is hematology. | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Crn ath atlg vn bps grft" AND lab."CATEGORY" = "Hematology" |
how much does the heartrate change of patient 031-19622 last measured on the last icu visit compared to the second to last value measured on the last icu visit? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature ... | SELECT (SELECT vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-19622') AND NOT patient.unitdischargetime IS ... |
What is the number of laps for Grid 14? | CREATE TABLE table_51665 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT COUNT("Laps") FROM table_51665 WHERE "Grid" = '14' |
what is the number of male patients who have ng route of drug administration? | 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.gender = "M" AND prescriptions.route = "NG" |
Stacked bar chart of school_id for with each ACC_Home in each acc road, rank by the Y-axis in asc. | 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 ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY School_ID |
What was the Independent Church's Split off/ Continuation? | CREATE TABLE table_name_44 (split_off___continuation_of VARCHAR,church_name VARCHAR) | SELECT split_off___continuation_of FROM table_name_44 WHERE church_name = "independent church" |
What is the average points value for a rank less than 12 for David Santee? | CREATE TABLE table_56976 ("Rank" real,"Name" text,"Nation" text,"SP+FS" real,"Points" real,"Placings" real) | SELECT AVG("Points") FROM table_56976 WHERE "Rank" < '12' AND "Name" = 'david santee' |
how much is the change in bicarbonate in patient 83182 last measured on the current hospital visit compared to the first value measured on the current hospital visit? | 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 outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE patients (row_... | SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 83182 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bicarbonate') ORDER BY labevents.chartt... |
which episode did sarah millican and grayson perry appear in | CREATE TABLE table_30969 ("Episode" real,"Broadcast date" text,"Guest(s)" text,"Singer(s)" text,"Ratings" text) | SELECT MIN("Episode") FROM table_30969 WHERE "Guest(s)" = 'Sarah Millican and Grayson Perry' |
How many rating/share values does the episode aired on Saturday, May 9, 2009? | CREATE TABLE table_1712 ("Episode #" real,"US air date" text,"Rating" text,"Share" text,"Rating/Share (18\u201349)" text,"Viewers (millions)" text) | SELECT COUNT("Rating/Share (18\u201349)") FROM table_1712 WHERE "US air date" = 'Saturday, May 9, 2009' |
Which city in Texas hosts the Frank Erwin center? | CREATE TABLE table_name_58 (city VARCHAR,state VARCHAR,venue VARCHAR) | SELECT city FROM table_name_58 WHERE state = "texas" AND venue = "frank erwin center" |
what is age and insurance of subject id 42067? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id tex... | SELECT demographic.age, demographic.insurance FROM demographic WHERE demographic.subject_id = "42067" |
how many office hospital admission patients had open and other sigmoidectomy? | 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.admission_location = "PHYS REFERRAL/NORMAL DELI" AND procedures.short_title = "Open sigmoidectomy NEC" |
What is the scoreof the away team Collingwood? | CREATE TABLE table_57691 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team score" FROM table_57691 WHERE "Away team" = 'collingwood' |
What is the total number of Total, when Gold is less than 1, when Silver is greater than 0, when Rank is 14, and when Nation is Afghanistan? | CREATE TABLE table_name_68 (total VARCHAR,nation VARCHAR,rank VARCHAR,gold VARCHAR,silver VARCHAR) | SELECT COUNT(total) FROM table_name_68 WHERE gold < 1 AND silver > 0 AND rank = "14" AND nation = "afghanistan" |
How many total events have cuts made over 12, more than 2 top-5s, and more than 11 top-10s? | CREATE TABLE table_name_66 (events INTEGER,top_10 VARCHAR,cuts_made VARCHAR,top_5 VARCHAR) | SELECT SUM(events) FROM table_name_66 WHERE cuts_made > 12 AND top_5 > 2 AND top_10 > 11 |
What was the fastest lap time in the Escort Radar Warning 200? | CREATE TABLE table_72112 ("Rd" real,"Name" text,"Pole Position" text,"Fastest Lap" text,"Winning driver" text,"Winning team" text,"Report" text) | SELECT "Fastest Lap" FROM table_72112 WHERE "Name" = 'Escort Radar Warning 200' |
how many times was hancock % considered when starky % was 20.96% | CREATE TABLE table_23141 ("County" text,"Starky #" real,"Starky %" text,"Hancock #" real,"Hancock %" text,"McCain #" real,"McCain %" text,"Total" real) | SELECT COUNT("Hancock %") FROM table_23141 WHERE "Starky %" = '20.96%' |
What were the total number of points when the amount of goals scored was less than 20? | CREATE TABLE table_name_39 (points VARCHAR,goals_scored INTEGER) | SELECT COUNT(points) FROM table_name_39 WHERE goals_scored < 20 |
Name the least wins of 56.25% | CREATE TABLE table_15829930_5 (wins INTEGER,success_rate VARCHAR) | SELECT MIN(wins) FROM table_15829930_5 WHERE success_rate = "56.25%" |
Name the segment c for pottery | CREATE TABLE table_15187735_3 (segment_c VARCHAR,segment_b VARCHAR) | SELECT segment_c FROM table_15187735_3 WHERE segment_b = "Pottery" |
What is the rank where the July 1, 2010 density equals 437? | CREATE TABLE table_59594 ("Rank" text,"County" text,"State" text,"Land area (km\u00b2)" text,"Land area (mi\u00b2)" text,"April 1,2010 census" text,"April 1,2010 density (/km\u00b2)" text,"April 1,2010 density (/mi\u00b2)" text,"July 1,2010 official estimate" text,"July 1,2010 density (/km\u00b2)" text,"July 1,2010 den... | SELECT "Rank" FROM table_59594 WHERE "July 1, 2010 density (/km\u00b2)" = '437' |
when did patient 029-27704 receive the last procedure during the first hospital visit? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text... | SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '029-27704' AND NOT patient.hospitaldischargetime IS NULL ORDER BY... |
How many distinct FDA approval statuses are there for the medicines? | CREATE TABLE medicine_enzyme_interaction (enzyme_id number,medicine_id number,interaction_type text)CREATE TABLE enzyme (id number,name text,location text,product text,chromosome text,omim number,porphyria text)CREATE TABLE medicine (id number,name text,trade_name text,fda_approved text) | SELECT COUNT(DISTINCT fda_approved) FROM medicine |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.