instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the start of the race with 676 laps? | CREATE TABLE table_name_29 (start VARCHAR,laps VARCHAR) | SELECT start FROM table_name_29 WHERE laps = "676" |
who is the web client when the client is x and the project is goto servers vnc java server (gsvncj)? | CREATE TABLE table_name_18 (Web VARCHAR,client VARCHAR,project VARCHAR) | SELECT Web AS client FROM table_name_18 WHERE client = "x" AND project = "goto servers vnc java server (gsvncj)" |
Name the least total apaps for txema | CREATE TABLE table_22542179_3 (total_apps INTEGER,player VARCHAR) | SELECT MIN(total_apps) FROM table_22542179_3 WHERE player = "Txema" |
Tag badges with links to tag edit history. | CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location text,AboutMe text,Views number,UpVotes number,DownVotes number,ProfileImageUrl text,EmailHash text,AccountId number)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,R... | SELECT UserId AS "user_link", Name, Date FROM Badges WHERE Badges.TagBased = 'true' AND Badges.Class <= 1 LIMIT 100 |
Who directed the episode written by patrick meighan? | CREATE TABLE table_24898 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text,"U.S. viewers (millions)" text) | SELECT "Directed by" FROM table_24898 WHERE "Written by" = 'Patrick Meighan' |
How many tries for were there 48 points? | CREATE TABLE table_12139 ("Club" text,"Played" text,"Drawn" text,"Lost" text,"Points for" text,"Points against" text,"Tries For" text,"Tries Against" text,"Try Bonus" text,"Losing Bonus" text,"Points" text) | SELECT "Tries For" FROM table_12139 WHERE "Points" = '48' |
the flights from ONTARIO to WESTCHESTER COUNTY that stop in CHICAGO | CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE state (state_cod... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CHICAGO' AND CITY_2.ci... |
What Rank is the director of maximilian jezo-parovsky? | CREATE TABLE table_38305 ("Rank" text,"Film" text,"Director(s)" text,"Country" text,"Prize" text) | SELECT "Rank" FROM table_38305 WHERE "Director(s)" = 'maximilian jezo-parovsky' |
Find the policy type used by more than 4 customers. | CREATE TABLE available_policies (policy_id number,policy_type_code text,customer_phone text)CREATE TABLE customers (customer_id number,customer_name text)CREATE TABLE customers_policies (customer_id number,policy_id number,date_opened time,date_closed time)CREATE TABLE services (service_id number,service_name text)CREA... | SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING COUNT(*) > 4 |
Show the number of documents. | CREATE TABLE Documents (Id VARCHAR) | SELECT COUNT(*) FROM Documents |
List all statement ids and statement details. | CREATE TABLE ref_document_types (document_type_code text,document_type_name text,document_type_description text)CREATE TABLE documents_with_expenses (document_id number,budget_type_code text,document_details text)CREATE TABLE ref_budget_codes (budget_type_code text,budget_type_description text)CREATE TABLE statements (... | SELECT statement_id, statement_details FROM statements |
Show the role code with the least employees. | CREATE TABLE all_documents (document_id number,date_stored time,document_type_code text,document_name text,document_description text,other_details text)CREATE TABLE document_locations (document_id number,location_code text,date_in_location_from time,date_in_locaton_to time)CREATE TABLE documents_to_be_destroyed (docume... | SELECT role_code FROM employees GROUP BY role_code ORDER BY COUNT(*) LIMIT 1 |
was normal the heart rate of patient 31482 since 09/08/2104? | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE d_items (row_id numbe... | SELECT COUNT(*) > 0 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 = 31482)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d... |
subjects who do not meet any of the following contraindications: spinal infection or inflammation, morbid obesity, mental illness, alcoholism, drug abuse, pregnancy, metal sensitivity, foreign body sensitivity, patients with inadequate tissue coverage over the operative site, open wounds local to the operative area, an... | CREATE TABLE table_test_30 ("id" int,"ejection_fraction_ef" int,"multiple_long_bone_fractures" bool,"extracellular_volume_expansion" bool,"pregnancy_or_lactation" bool,"bleeding" int,"serum_potassium" float,"prosthetic_heart_valve" bool,"hbg" int,"anticoagulation" bool,"incomplete_spinal_cord_injury" bool,"complex_pelv... | SELECT * FROM table_test_30 WHERE spinal_infection = 1 OR inflammation = 1 OR morbid_obesity = 1 OR mental_illness = 1 OR alcohol_abuse = 1 OR drug_abuse = 1 OR pregnancy_or_lactation = 1 OR metal_sensitivity = 1 OR foreign_body_sensitivity = 1 OR (inadequate_tissue_coverage = 1 AND operative_area = 1) OR (open_wounds ... |
Show the trend about the frequency of the claim dates, and I want to order in desc by the X. | CREATE TABLE Settlements (Settlement_ID INTEGER,Claim_ID INTEGER,Date_Claim_Made DATE,Date_Claim_Settled DATE,Amount_Claimed INTEGER,Amount_Settled INTEGER,Customer_Policy_ID INTEGER)CREATE TABLE Payments (Payment_ID INTEGER,Settlement_ID INTEGER,Payment_Method_Code VARCHAR(255),Date_Payment_Made DATE,Amount_Payment IN... | SELECT Date_Claim_Settled, COUNT(Date_Claim_Settled) FROM Settlements GROUP BY Date_Claim_Settled ORDER BY Date_Claim_Settled DESC |
Who is the athlete with a run 1 larger than 54.95 and a 56.19 run 2? | CREATE TABLE table_name_91 (athlete VARCHAR,run_1 VARCHAR,run_2 VARCHAR) | SELECT athlete FROM table_name_91 WHERE run_1 > 54.95 AND run_2 = 56.19 |
Which Drobo (2nd) has a Drobo FS of up to 32? | CREATE TABLE table_name_40 (drobo__2nd_ VARCHAR,drobo_fs VARCHAR) | SELECT drobo__2nd_ FROM table_name_40 WHERE drobo_fs = "up to 32" |
What is the Label that shows on april 7, 1967? | CREATE TABLE table_name_77 (label VARCHAR,date VARCHAR) | SELECT label FROM table_name_77 WHERE date = "april 7, 1967" |
What is the alternate of the nation with hubert gr ndhammer as the second? | CREATE TABLE table_36155 ("Nation" text,"Skip" text,"Third" text,"Second" text,"Lead" text,"Alternate" text) | SELECT "Alternate" FROM table_36155 WHERE "Second" = 'hubert gründhammer' |
Who directed the episode named 'Don't just do it'? | CREATE TABLE table_29264 ("No. in series" text,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text) | SELECT "Directed by" FROM table_29264 WHERE "Title" = 'Don''t Just Do It' |
What are the average points White made with 0 extra points? | CREATE TABLE table_name_14 (points INTEGER,extra_points VARCHAR,player VARCHAR) | SELECT AVG(points) FROM table_name_14 WHERE extra_points = 0 AND player = "white" |
when is the next wikimania 2014 ? | CREATE TABLE table_203_33 (id number,"conference" text,"date" text,"place" text,"attendance" number,"archive of presentations" text) | SELECT "date" FROM table_203_33 WHERE "conference" = 'wikimania 2014' |
For those employees who did not have any job in the past, return a bar chart about the distribution of job_id and the sum of salary , and group by attribute job_id, rank by the x axis from low to high. | CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),CO... | SELECT JOB_ID, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID |
What is the position for the player with cfl team Winnipeg blue bombers? | CREATE TABLE table_10812938_3 (position VARCHAR,cfl_team VARCHAR) | SELECT position FROM table_10812938_3 WHERE cfl_team = "Winnipeg Blue Bombers" |
i'd like information on a flight from ATLANTA to DENVER a morning flight | CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varcha... | 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 = 'ATLANTA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVE... |
Name the presentation of credentials for appointed by of grover cleveland and representative of charles w. buck | CREATE TABLE table_name_45 (presentation_of_credentials VARCHAR,appointed_by VARCHAR,representative VARCHAR) | SELECT presentation_of_credentials FROM table_name_45 WHERE appointed_by = "grover cleveland" AND representative = "charles w. buck" |
count the number of patients whose days of hospital stay is greater than 4 and procedure long title is angioplasty of other non-coronary vessel(s)? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "4" AND procedures.long_title = "Angioplasty of other non-coronary vessel(s)" |
Plot mean meter 100 by grouped by meter 200 as a bar graph, display in descending by the X-axis please. | CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text,Time text)CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Openin... | SELECT meter_200, AVG(meter_100) FROM swimmer GROUP BY meter_200 ORDER BY meter_200 DESC |
What place did jacky cupit take when his To par was under 13? | CREATE TABLE table_name_67 (place VARCHAR,to_par VARCHAR,player VARCHAR) | SELECT place FROM table_name_67 WHERE to_par < 13 AND player = "jacky cupit" |
are there any airlines that have flights from BOSTON to PHILADELPHIA that leave before 630 | CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE equipment_sequence (aircraft_code_sequence varchar,aircraft_code varchar)CREATE TABLE code_description (code varchar,description text)CREATE TABLE flight_leg (flight_id int,leg_number int,l... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.departure_time < 630 AND flight.to_airport = AIRPOR... |
Show the type of school and the number of buses for each type. | CREATE TABLE driver (driver_id number,name text,party text,home_city text,age number)CREATE TABLE school (school_id number,grade text,school text,location text,type text)CREATE TABLE school_bus (school_id number,driver_id number,years_working number,if_full_time others) | SELECT T2.type, COUNT(*) FROM school_bus AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id GROUP BY T2.type |
the first time patient 013-28507 was prescribed lidocaine and zofran at the same time this month? | 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 cost (costid number,uniquepid text,patienthealthsystemstayid number,eventt... | SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'zofran' AND patient.uniquepid = '013-28507' AND DATETIME(medication.drugstarttime, 'start of month') = DATETIME(CURRENT_T... |
what is the format of 'callanetics: 10 years younger in 10 hours'? | CREATE TABLE table_11222744_3 (format VARCHAR,title VARCHAR) | SELECT format FROM table_11222744_3 WHERE title = "Callanetics: 10 years Younger In 10 Hours" |
What is the maximum Obama supporters in Wayne county? | CREATE TABLE table_23820 ("County" text,"Obama%" text,"Obama#" real,"McCain%" text,"McCain#" real) | SELECT MAX("Obama#") FROM table_23820 WHERE "County" = 'Wayne' |
In the match where the venue was arden street oval, what was the crowd attendance? | CREATE TABLE table_name_88 (crowd INTEGER,venue VARCHAR) | SELECT SUM(crowd) FROM table_name_88 WHERE venue = "arden street oval" |
how many kilometers did number 4110 travel ? | CREATE TABLE table_203_27 (id number,"number" number,"serial no" number,"entered service" text,"withdrawn" text,"kilometres travelled" number) | SELECT "kilometres travelled" FROM table_203_27 WHERE "number" = 4110 |
i need a flight from BOSTON to SAN FRANCISCO via DALLAS FORT WORTH | CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE ground_service (c... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, flight, flight_stop AS FLIGHT_STOP_0, flight_stop AS FLIGHT_STOP_1... |
Find the average number of bedrooms of all the apartments. | CREATE TABLE view_unit_status (apt_id number,apt_booking_id number,status_date time,available_yn others)CREATE TABLE apartment_facilities (apt_id number,facility_code text)CREATE TABLE apartments (apt_id number,building_id number,apt_type_code text,apt_number text,bathroom_count number,bedroom_count number,room_count t... | SELECT AVG(bedroom_count) FROM apartments |
what is the number of patients whose admission year is less than 2164 and lab test name is lactate? | 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.admityear < "2164" AND lab.label = "Lactate" |
What is Instant Messaging, when Telephony is 'Yes with integrated Sametime'? | CREATE TABLE table_name_64 (instant_messaging VARCHAR,telephony VARCHAR) | SELECT instant_messaging FROM table_name_64 WHERE telephony = "yes with integrated sametime" |
Show me the average of weight by sex in a histogram, and show by the Y-axis from low to high. | CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real)CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real) | SELECT Sex, AVG(Weight) FROM people GROUP BY Sex ORDER BY AVG(Weight) |
what was the name of the procedure, which patient 41393 was last received until 2 years ago? | 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 d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE cost (row_i... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 41393) AND DATETIME(procedures_icd.charttime) <= DATETIME(CURRENT_TI... |
what is the total number of last names of all candidates?, and could you sort by the names in descending? | CREATE TABLE Courses (course_id VARCHAR(100),course_name VARCHAR(120),course_description VARCHAR(255),other_details VARCHAR(255))CREATE TABLE Student_Course_Attendance (student_id INTEGER,course_id INTEGER,date_of_attendance DATETIME)CREATE TABLE Candidate_Assessments (candidate_id INTEGER,qualification CHAR(15),assess... | SELECT last_name, COUNT(last_name) FROM People GROUP BY last_name ORDER BY last_name DESC |
which language does cynthia gomez understand? | CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT demographic.language FROM demographic WHERE demographic.name = "Cynthia Gomez" |
Who had a best time of 1:00.870? | CREATE TABLE table_43616 ("Name" text,"Team" text,"Qual 1" text,"Qual 2" text,"Best" text) | SELECT "Name" FROM table_43616 WHERE "Best" = '1:00.870' |
What is the pick number for tulane university? | CREATE TABLE table_37581 ("Pick" real,"Player" text,"Team" text,"Position" text,"School" text) | SELECT SUM("Pick") FROM table_37581 WHERE "School" = 'tulane university' |
what is admission time of subject name dona cole? | CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT demographic.admittime FROM demographic WHERE demographic.name = "Dona Cole" |
how many patients whose discharge location is rehab/distinct part hosp and procedure long title is incision of vessel, lower limb arteries? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "REHAB/DISTINCT PART HOSP" AND procedures.long_title = "Incision of vessel, lower limb arteries" |
When is the original air date written by sean whitesell? | CREATE TABLE table_25537 ("No." real,"#" real,"Title" text,"Directed by" text,"Written by" text,"U.S. viewers (million)" text,"Rank (week)" text,"Original air date" text) | SELECT "Original air date" FROM table_25537 WHERE "Written by" = 'Sean Whitesell' |
What is the report corresponding to the game that had the Townsville Crocodiles as home team? | CREATE TABLE table_name_59 (report VARCHAR,home_team VARCHAR) | SELECT report FROM table_name_59 WHERE home_team = "townsville crocodiles" |
What is the lowest against of the wimmera fl warrack eagles, which have less than 16 wins? | CREATE TABLE table_63957 ("Wimmera FL" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real) | SELECT MIN("Against") FROM table_63957 WHERE "Wins" < '16' AND "Wimmera FL" = 'warrack eagles' |
Name the railway when class is j19 | CREATE TABLE table_20187 ("Class" text,"Wheel Arrangement" text,"Railway" text,"Number at Doncaster" real,"Number at Pyewipe" real,"Number at March" real) | SELECT "Railway" FROM table_20187 WHERE "Class" = 'J19' |
Which party had a Retired Democratic hold? | CREATE TABLE table_name_97 (party VARCHAR,result VARCHAR) | SELECT party FROM table_name_97 WHERE result = "retired democratic hold" |
How many goals were achieved when Chievo was the club and the debut year was before 2002? | CREATE TABLE table_name_71 (goals VARCHAR,current_club VARCHAR,debut_year VARCHAR) | SELECT COUNT(goals) FROM table_name_71 WHERE current_club = "chievo" AND debut_year < 2002 |
count the number of patients less than 58 years who have drug code maal30l. | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "58" AND prescriptions.formulary_drug_cd = "MAAL30L" |
count the number of times patient 28099 received a lab test for bilirubin, direct since 2105. | CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE T... | SELECT COUNT(*) FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bilirubin, direct') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 28099) AND STRFTIME('%y', labevents.charttime) >= '2105' |
What 09-10 class, with a graduate percentage of 85% had the least amount of points? | CREATE TABLE table_32493 ("School" text,"09-10 FCAT" text,"09-10 Points" real,"09-10 Graduation" text,"08-09 FCAT" text) | SELECT MIN("09-10 Points") FROM table_32493 WHERE "09-10 Graduation" = '85%' |
When Annette Le took HEBREW 568 , who taught it ? | CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa float,entered_as varchar,admit_term int,predicted_graduation_semester int,degree varchar,minor varchar,internship varchar)CREATE TABLE comment_instructor (instructor_id int,student_id ... | SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN student_record ON student_record.offering_id = offering_instructor.offering_id INNER JOIN student ON student.student_id = student_record.student_id INNER JOIN course_... |
how many clubs had a positive goal difference ? | CREATE TABLE table_203_145 (id number,"position" number,"club" text,"played" number,"points" text,"wins" number,"draws" number,"losses" number,"goals for" number,"goals against" number,"goal difference" number) | SELECT COUNT("club") FROM table_203_145 WHERE "goals for" - "goals against" > 0 |
how many times do patient 033-3992's urine come out today. | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,syst... | SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-3992')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.cel... |
What is every part number with model number core i5-670? | CREATE TABLE table_25645 ("Model number" text,"sSpec number" text,"Frequency" text,"Turbo" text,"GPU frequency" text,"Cores" real,"L2 cache" text,"L3 cache" text,"I/O bus" text,"Mult." text,"Memory" text,"Voltage" text,"TDP" text,"Socket" text,"Release date" text,"Part number(s)" text,"Release price (USD)" text) | SELECT "Part number(s)" FROM table_25645 WHERE "Model number" = 'Core i5-670' |
please give me ground transportation information between DFW airport and downtown DALLAS | CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE equipment_sequence (aircraft_code_sequence varchar,aircraft_code varchar)CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,far... | SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city AS CITY_0, city AS CITY_1, ground_service WHERE airport.airport_code = airport_service.airport_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = airport_service.city_code AND CITY_1.city_name = 'DALLAS' AND ground_service.airpor... |
What is the 2010 total for ghana? | CREATE TABLE table_name_64 (country VARCHAR) | SELECT COUNT(2010) FROM table_name_64 WHERE country = "ghana" |
when they visited the hospital first time, has patient 022-89058 been ordered with acetaminophen, 50 ml vial : dextrose 50 % iv soln or acetaminophen (tylenol) tablet 650 mg? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissio... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-89058' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.... |
How many mystic arte have hisui (jadeite) hearts 1 as the character? | CREATE TABLE table_28178595_2 (mystic_arte VARCHAR,character VARCHAR) | SELECT COUNT(mystic_arte) FROM table_28178595_2 WHERE character = "Hisui (Jadeite) Hearts 1" |
what is the last diagnosed diagnosis of patient 96365 since 6 years ago? | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE procedures_icd (row_id number,subject_id numb... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT diagnoses_icd.icd9_code FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 96365) AND DATETIME(diagnoses_icd.charttime) >= DATETIME(CURRENT_TIME(), '... |
What's the Nordbayern with a W rttemberg of Union B ckingen in the year before 1932? | CREATE TABLE table_name_92 (nordbayern VARCHAR,year VARCHAR,württemberg VARCHAR) | SELECT nordbayern FROM table_name_92 WHERE year < 1932 AND württemberg = "union böckingen" |
What is the smallest lane number of Xue Ruipeng? | CREATE TABLE table_79600 ("Heat" real,"Lane" real,"Name" text,"Nationality" text,"Time" text) | SELECT MIN("Lane") FROM table_79600 WHERE "Name" = 'xue ruipeng' |
What round did the event UFC 86 take place? | CREATE TABLE table_62560 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" text,"Location" text) | SELECT "Round" FROM table_62560 WHERE "Event" = 'ufc 86' |
what is the number of patients whose admission location is transfer from hosp/extram and admission year is less than 2175? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.admityear < "2175" |
How many prizes were available in the competition where 696 people entered? | CREATE TABLE table_2715355_1 (winners VARCHAR,entrants VARCHAR) | SELECT COUNT(winners) AS Prize FROM table_2715355_1 WHERE entrants = 696 |
find the number of patients whose drug route is dialys and age under 83 years. | 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 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "83" AND prescriptions.route = "DIALYS" |
count the number of patients whose admission location is phys referral/normal deli and drig code is cefe 1i. | 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 procedures (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.admission_location = "PHYS REFERRAL/NORMAL DELI" AND prescriptions.formulary_drug_cd = "CEFE1I" |
who was the previous advisor before pete rouse ? | CREATE TABLE table_204_598 (id number,"name" text,"state of residence" text,"took office" text,"left office" text,"president served under" text) | SELECT "name" FROM table_204_598 WHERE "took office" < (SELECT "took office" FROM table_204_598 WHERE "name" = 'pete rouse') ORDER BY "took office" DESC LIMIT 1 |
For all employees who have the letters D or S in their first name, for manager_id, hire_date, visualize the trend, show by the x-axis in descending. | 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 departments (DEPARTMENT_ID decimal(... | SELECT HIRE_DATE, MANAGER_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE DESC |
What is the envelopment for the rhabdoviridae family? | CREATE TABLE table_43230 ("Family" text,"Baltimore group" text,"envelopment" text,"Virion shape" text,"Replication site" text) | SELECT "envelopment" FROM table_43230 WHERE "Family" = 'rhabdoviridae' |
What is the bore of the boat howitzers with a 12-pdr heavy designation? | CREATE TABLE table_name_8 (bore VARCHAR,designation VARCHAR) | SELECT bore FROM table_name_8 WHERE designation = "12-pdr heavy" |
What is the total pick numbers for the CFL team Edmonton Eskimos? | CREATE TABLE table_name_79 (pick__number INTEGER,cfl_team VARCHAR) | SELECT SUM(pick__number) FROM table_name_79 WHERE cfl_team = "edmonton eskimos" |
What was the date of appointment for the 10th person in position? | CREATE TABLE table_22133191_3 (date_of_appointment VARCHAR,position_in_table VARCHAR) | SELECT date_of_appointment FROM table_22133191_3 WHERE position_in_table = "10th" |
Name the chassis for sfacs ecurie france | CREATE TABLE table_74238 ("No" real,"Driver" text,"Entrant" text,"Constructor" text,"Chassis" text,"Engine" text) | SELECT "Chassis" FROM table_74238 WHERE "Entrant" = 'SFACS Ecurie France' |
Which Attendance has an Away of real juventud? | CREATE TABLE table_name_50 (attendance INTEGER,away VARCHAR) | SELECT SUM(attendance) FROM table_name_50 WHERE away = "real juventud" |
Most voted questions tagged with Ruby. | CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE Comments (Id number,PostId number,Score nu... | SELECT Id, * FROM Posts AS Question WHERE Tags LIKE '%ruby%' AND PostTypeId = 2 ORDER BY Score DESC LIMIT 150 |
What position did the palyer drafted out of Washington play? | CREATE TABLE table_name_34 (position VARCHAR,college VARCHAR) | SELECT position FROM table_name_34 WHERE college = "washington" |
How may drawn equal points against at 129? | CREATE TABLE table_20760802_1 (drawn VARCHAR,points_against VARCHAR) | SELECT drawn FROM table_20760802_1 WHERE points_against = "129" |
how many patients whose admission year is less than 2194 and procedure short title is form cutan ileoureterost? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2194" AND procedures.short_title = "Form cutan ileoureterost" |
Find the average of credits of courses that have more than one prerequisite for each department with a bar chart, and sort in desc by the Y please. | CREATE TABLE instructor (ID varchar(5),name varchar(20),dept_name varchar(20),salary numeric(8,2))CREATE TABLE department (dept_name varchar(20),building varchar(15),budget numeric(12,2))CREATE TABLE course (course_id varchar(8),title varchar(50),dept_name varchar(20),credits numeric(2,0))CREATE TABLE teaches (ID varch... | SELECT dept_name, AVG(credits) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY dept_name ORDER BY AVG(credits) DESC |
From which club is player C. Dickinson? | CREATE TABLE table_name_35 (loan_club VARCHAR,name VARCHAR) | SELECT loan_club FROM table_name_35 WHERE name = "c. dickinson" |
Name the D 48 when it has a D 44 of d 33 | CREATE TABLE table_78247 ("D 48" text,"D 47" text,"D 46" text,"D 45" text,"D 44" text,"D 43" text,"D 42" text,"D 41" text) | SELECT "D 48" FROM table_78247 WHERE "D 44" = 'd 33' |
what is the tournament when the outcome is winner and the opponents is kerry-anne guse corina morariu? | CREATE TABLE table_49534 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Partner" text,"Opponents" text,"Score" text) | SELECT "Tournament" FROM table_49534 WHERE "Outcome" = 'winner' AND "Opponents" = 'kerry-anne guse corina morariu' |
What is the example for the American of , , and a Semi-closed initial unstressed vowels of y / /? | CREATE TABLE table_61000 ("Semi-closed initial unstressed vowels" text,"17th c." text,"American" text,"Australian" text,"Examples" text) | SELECT "Examples" FROM table_61000 WHERE "American" = 'ɪ, ə' AND "Semi-closed initial unstressed vowels" = 'y /ɨ/' |
Can you tell me the highest Draws that has the Goal Difference smaller than 64, and the Played larger than 30? | CREATE TABLE table_60854 ("Position" real,"Club" text,"Played" real,"Wins" real,"Draws" real,"Losses" real,"Goals for" real,"Goals against" real,"Points" real,"Goal Difference" real) | SELECT MAX("Draws") FROM table_60854 WHERE "Goal Difference" < '64' AND "Played" > '30' |
How many overs did Oliver Hannon-Dalby have? | CREATE TABLE table_15893020_2 (overs VARCHAR,player VARCHAR) | SELECT overs FROM table_15893020_2 WHERE player = "Oliver Hannon-Dalby" |
What is the Ship Type of the Prize Disposition of ship and a tonnage less than 151? | CREATE TABLE table_name_47 (ship_type VARCHAR,disposition_of_ship VARCHAR,tonnage VARCHAR) | SELECT ship_type FROM table_name_47 WHERE disposition_of_ship = "prize" AND tonnage < 151 |
okay give me the flights that leave DENVER after 1900 next monday arriving in BOSTON | 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 dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE flight_fare (f... | 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 ((date_day.day_number = 21 AND date_day.month_number = 2 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time... |
upvote and downvote count broken down by post type. | CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserI... | SELECT COUNT(*), pt.Name, vt.Name FROM Votes AS v, Posts AS p, PostTypes AS pt, VoteTypes AS vt WHERE v.PostId = p.Id AND v.VoteTypeId IN (2, 3) AND p.PostTypeId IN (1, 2) AND pt.Id = p.PostTypeId AND vt.Id = v.VoteTypeId AND p.OwnerUserId = 5373 GROUP BY pt.Name, vt.Name ORDER BY pt.Name, vt.Name |
Which site has a Score of 0-1? | CREATE TABLE table_76692 ("Date" text,"Time" text,"Opponent" text,"Score" text,"Site" text,"City" text) | SELECT "Site" FROM table_76692 WHERE "Score" = '0-1' |
Achievement of m (ft), and a Type of mi-10r, and a Pilot of v.p. koloshenko, and a Date of 28 may 1965 had what record description? | CREATE TABLE table_75319 ("Date" text,"Type" text,"Record description" text,"Achievement" text,"Pilot" text) | SELECT "Record description" FROM table_75319 WHERE "Achievement" = 'm (ft)' AND "Type" = 'mi-10r' AND "Pilot" = 'v.p. koloshenko' AND "Date" = '28 may 1965' |
what is the average 60 to 64 when 50 to 54 is less than 2,054, 35 to 39 is more than 1,704, 30 to 34 is less than 1,381 and oblast\age is evenkia? | CREATE TABLE table_46411 ("C/W 15+" real,"Oblast\\Age" text,"15 to 17" real,"18 to 19" text,"20 to 24" real,"25 to 29" real,"30 to 34" real,"35 to 39" real,"40 to 44" real,"45 to 49" real,"50 to 54" real,"55 to 59" real,"60 to 64" real,"65 to 69" real) | SELECT AVG("60 to 64") FROM table_46411 WHERE "50 to 54" < '2,054' AND "35 to 39" > '1,704' AND "30 to 34" < '1,381' AND "Oblast\\Age" = 'evenkia' |
Name the L2 Cache which has a Clock Speed of 1.5 ghz? | CREATE TABLE table_name_10 (l2_cache VARCHAR,clock_speed VARCHAR) | SELECT l2_cache FROM table_name_10 WHERE clock_speed = "1.5 ghz" |
since 1652 days ago, had patient 006-13677 excreted any urinary catheter output: coude urethral 14 fr.? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage tex... | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-13677')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutpu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.