instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What away team is based in moorabbin oval? | CREATE TABLE table_54703 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team" FROM table_54703 WHERE "Venue" = 'moorabbin oval' |
What was the surface of the match when the score was akgul amanmuradova chuang chia-jung? | CREATE TABLE table_name_60 (surface VARCHAR,score VARCHAR) | SELECT surface FROM table_name_60 WHERE score = "akgul amanmuradova chuang chia-jung" |
Return a bar chart about the number of counties for all appellations? | CREATE TABLE grapes (ID INTEGER,Grape TEXT,Color TEXT)CREATE TABLE appellations (No INTEGER,Appelation TEXT,County TEXT,State TEXT,Area TEXT,isAVA TEXT)CREATE TABLE wine (No INTEGER,Grape TEXT,Winery TEXT,Appelation TEXT,State TEXT,Name TEXT,Year INTEGER,Price INTEGER,Score INTEGER,Cases INTEGER,Drink TEXT) | SELECT County, COUNT(County) FROM appellations GROUP BY County |
until 4 years ago, has patient 41132 been ordered with calcium gluconate, lisinopril or iso-osmotic dextrose? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE d_icd_diagnoses (row_id ... | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 41132) AND prescriptions.drug IN ('calcium gluconate', 'lisinopril', 'iso-osmotic dextrose') AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-4 year') |
What is Another She's Label? | CREATE TABLE table_60264 ("Album#" text,"English Title" text,"Chinese (Traditional)" text,"Chinese (Simplified)" text,"Release date" text,"Label" text) | SELECT "Label" FROM table_60264 WHERE "English Title" = 'another she' |
Competition of u.s championships, and a Event of all around has what average year? | CREATE TABLE table_68641 ("Year" real,"Competition" text,"Location" text,"Event" text,"Final-Rank" real,"Final-Score" real) | SELECT AVG("Year") FROM table_68641 WHERE "Competition" = 'u.s championships' AND "Event" = 'all around' |
What are the dates of the latest logon of the students with family name 'Jaskolski' or 'Langosh', and count them by a bar chart, list in descending by the y-axis. | CREATE TABLE Student_Tests_Taken (registration_id INTEGER,date_test_taken DATETIME,test_result VARCHAR(255))CREATE TABLE Student_Course_Enrolment (registration_id INTEGER,student_id INTEGER,course_id INTEGER,date_of_enrolment DATETIME,date_of_completion DATETIME)CREATE TABLE Students (student_id INTEGER,date_of_registr... | SELECT date_of_latest_logon, COUNT(date_of_latest_logon) FROM Students WHERE family_name = "Jaskolski" OR family_name = "Langosh" ORDER BY COUNT(date_of_latest_logon) DESC |
When turquoise is the map colour what is the length? | CREATE TABLE table_21959 ("Name" text,"Map colour" text,"First operated" real,"Type" text,"Length" text,"No. Sta" real,"Current Stock" text,"Future Stock" text,"Trips per annum (\u00d71000)" real,"Avg. trips per mile (\u00d71000)" real) | SELECT "Length" FROM table_21959 WHERE "Map colour" = 'Turquoise' |
What was the score for the away team when the home team scored 31.9 (195)? | CREATE TABLE table_53443 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team" FROM table_53443 WHERE "Home team score" = '31.9 (195)' |
what is the number of patients whose item id is 51256 and lab test abnormal status is abnormal? | 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 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 lab.itemid = "51256" AND lab.flag = "abnormal" |
After the March 15 game, what was the team's record? | CREATE TABLE table_17340355_9 (record VARCHAR,date VARCHAR) | SELECT record FROM table_17340355_9 WHERE date = "March 15" |
who is the season result where margin is 51 | CREATE TABLE table_1139835_3 (season_result VARCHAR,margin VARCHAR) | SELECT season_result FROM table_1139835_3 WHERE margin = 51 |
What is the date of the match with west bromwich albion as the home team? | CREATE TABLE table_62306 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Date" FROM table_62306 WHERE "Home team" = 'west bromwich albion' |
Give me the comparison about School_ID over the All_Neutral by a bar chart. | 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_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En... | SELECT All_Neutral, School_ID FROM basketball_match |
is patient 021-69410's phosphate second measured on the first hospital visit less than first measured on the first hospital visit? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE lab (labid number,patientunitstayid num... | SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-69410' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi... |
What is the average opening at Stadyum Samsun with a capacity smaller than 34,658? | CREATE TABLE table_name_20 (opening INTEGER,stadium VARCHAR,capacity VARCHAR) | SELECT AVG(opening) FROM table_name_20 WHERE stadium = "stadyum samsun" AND capacity < 34 OFFSET 658 |
What is the minimum grid when there was more than 22 laps? | CREATE TABLE table_name_83 (grid INTEGER,laps INTEGER) | SELECT MIN(grid) FROM table_name_83 WHERE laps > 22 |
triglycerides < 150 mg / dl. | CREATE TABLE table_dev_9 ("id" int,"heart_disease" bool,"hba1c" float,"coronary_artery_disease_cad" bool,"triglyceride_tg" float,"hypertension" bool,"NOUSE" float) | SELECT * FROM table_dev_9 WHERE triglyceride_tg < 150 |
had patient 24268 had a normal arterial bp [systolic] on 03/19/last year? | CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE 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)CREA... | 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 = 24268)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [syst... |
Find the number of customers in total. | CREATE TABLE customers (Id VARCHAR) | SELECT COUNT(*) FROM customers |
yes i'd like to find a flight from MEMPHIS to TACOMA stopping in LOS ANGELES | CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int,dual_carrier text,flight_days text,flight_id i... | 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 = 'LOS ANGELES' AND CITY_... |
i'd like to fly between BOSTON and SAN FRANCISCO | CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,weight int,capacity int,pay_load int,cruising_speed int,range_miles int,pressurized varchar)CREATE TABLE airport_service (city_code ... | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRA... |
was there any organism found in patient 30460's first mrsa screen microbiological examination in 03/last year? | 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 microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30460) AND microbiologyevents.spec_type_desc = 'mrsa screen' AND NOT microbiologyevents.org_name IS NULL AND DATETIME(microbiologyevents.charttime, 'start of year') = ... |
How many millions of U.S. viewers watched the episode with the production code of 6AKY07? | CREATE TABLE table_30228 ("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 "U.S. viewers (millions)" FROM table_30228 WHERE "Production code" = '6AKY07' |
Which Fuel Propulsion has Numbers (Quantity Ordered) of 7124-7156 (33 buses)? | CREATE TABLE table_6427 ("Make/ Model" text,"length" text,"Year" real,"Numbers (Quantity Ordered)" text,"Fuel Propulsion" text) | SELECT "Fuel Propulsion" FROM table_6427 WHERE "Numbers (Quantity Ordered)" = '7124-7156 (33 buses)' |
What rank does Tatyana Lebedeva have? | CREATE TABLE table_64538 ("Rank" text,"Group" text,"Name" text,"Nationality" text,"Mark" text) | SELECT "Rank" FROM table_64538 WHERE "Name" = 'tatyana lebedeva' |
Return the lot details, group the lot details, and compute the number of each lot details, list X-axis from low to high order please. | CREATE TABLE Purchases (purchase_transaction_id INTEGER,purchase_details VARCHAR(255))CREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR(10),transaction_type_description VARCHAR(80))CREATE TABLE Sales (sales_transaction_id INTEGER,sales_details VARCHAR(255))CREATE TABLE Transactions (transaction_id INTEG... | SELECT lot_details, COUNT(lot_details) FROM Lots GROUP BY lot_details ORDER BY lot_details |
What studio is director Reginald Hudlin from? | CREATE TABLE table_name_85 (studio VARCHAR,director VARCHAR) | SELECT studio FROM table_name_85 WHERE director = "reginald hudlin" |
If the till agra is 1050, what is the max round trip? | CREATE TABLE table_23321 ("Vehicle Category" text,"Till Aligarh" real,"Till Mathura" real,"Till Agra" real,"For Round Trip" real) | SELECT MAX("For Round Trip") FROM table_23321 WHERE "Till Agra" = '1050' |
list types of aircraft that fly between BOSTON and SAN FRANCISCO | CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)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,departu... | SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_... |
What is the value in 2006 when Career Statistics is in Career W-L? | CREATE TABLE table_7312 ("Tournament" text,"1998" text,"1999" text,"2000" text,"2001" text,"2002" text,"2003" text,"2004" text,"2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"Career W-L" text) | SELECT "2006" FROM table_7312 WHERE "Career W-L" = 'career statistics' |
Is CMBIOL 682 taught only in the Summer ? | CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE requirement (requirement_id int,requirement var... | SELECT COUNT(*) > 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'CMBIOL' AND course.number = 682 AND semester.semester <> 'Summer' |
What was the highest position for the person who performed in 16 races? | CREATE TABLE table_2500 ("Season" real,"Series" text,"Team" text,"Races" real,"Wins" real,"Poles" real,"F/Laps" real,"Podiums" real,"Points" real,"Position" text) | SELECT "Position" FROM table_2500 WHERE "Races" = '16' |
provide the number of patients who have been in the hospital for more than 29 days and whose discharge location was home health care. | 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 procedures (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME HEALTH CARE" AND demographic.days_stay > "29" |
Which of my answers have helped the internet?. Shows you which questions you've answered that have significant view counts. | CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE PostNoticeTypes ... | SELECT q.ViewCount AS "views", ROUND(q.ViewCount / q.AnswerCount, 2) AS "views_per_answer", q.AnswerCount AS "answer_count", q.Id AS "post_link", a.Score AS "answer_score", (CASE WHEN q.AcceptedAnswerId = a.Id THEN 'Yes' ELSE NULL END) AS "accepted" FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId WHERE a.Own... |
IS ORTHO 763 available next semester ? | CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)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,... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'ORTHO' AND course.number = 763 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 |
Show the number of gas stations for each manager in a bar chart, I want to rank by the Y from low to high. | CREATE TABLE gas_station (Station_ID int,Open_Year int,Location text,Manager_Name text,Vice_Manager_Name text,Representative_Name text)CREATE TABLE station_company (Station_ID int,Company_ID int,Rank_of_the_Year int)CREATE TABLE company (Company_ID int,Rank int,Company text,Headquarters text,Main_Industry text,Sales_bi... | SELECT Manager_Name, COUNT(Manager_Name) FROM gas_station GROUP BY Manager_Name ORDER BY COUNT(Manager_Name) |
Which chassis was used in 1971? | CREATE TABLE table_name_1 (chassis VARCHAR,year VARCHAR) | SELECT chassis FROM table_name_1 WHERE year = 1971 |
When was the Titans founded? | CREATE TABLE table_30008 ("Institution" text,"Location" text,"Founded" real,"Type" text,"Enrollment" real,"Nickname" text,"Current Conference" text,"Pac-12 Sports" text) | SELECT MAX("Founded") FROM table_30008 WHERE "Nickname" = 'Titans' |
what is the total number of semi-finalist #2 where runner-up is east carolina | CREATE TABLE table_11214772_1 (semi_finalist__number2 VARCHAR,runner_up VARCHAR) | SELECT COUNT(semi_finalist__number2) FROM table_11214772_1 WHERE runner_up = "East Carolina" |
who finished with the least time ? | CREATE TABLE table_203_644 (id number,"pos." number,"driver" text,"co-driver" text,"car" text,"time" text,"difference" text,"points" number) | SELECT "driver" FROM table_203_644 ORDER BY "time" LIMIT 1 |
In what city is the Don Valley Stadium located? | CREATE TABLE table_name_61 (city VARCHAR,stadium VARCHAR) | SELECT city FROM table_name_61 WHERE stadium = "don valley stadium" |
When did the Club of western new york flash begin to play? | CREATE TABLE table_name_50 (began_play VARCHAR,club VARCHAR) | SELECT began_play FROM table_name_50 WHERE club = "western new york flash" |
count the number of patients whose marital status is single and diagnoses long title is malignant neoplasm of descending colon? | 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 diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.long_title = "Malignant neoplasm of descending colon" |
How many figures are there for wheels for LMS numbers 16377-9? | CREATE TABLE table_15412381_5 (wheels VARCHAR,lms_nos VARCHAR) | SELECT COUNT(wheels) FROM table_15412381_5 WHERE lms_nos = "16377-9" |
Which Circuit has the Winning Team of carlin motorsport, and the Winning Driver of oliver turvey, and a Date of 24 march? | CREATE TABLE table_49880 ("Round" real,"Circuit" text,"Date" text,"Pole Position" text,"Fastest Lap" text,"Winning Driver" text,"Winning Team" text) | SELECT "Circuit" FROM table_49880 WHERE "Winning Team" = 'carlin motorsport' AND "Winning Driver" = 'oliver turvey' AND "Date" = '24 march' |
How many PNC votes did the election before 1996 have? | CREATE TABLE table_44645 ("Election" real,"Number of PNC votes" text,"Share of votes" text,"Seats" text,"Outcome of election" text) | SELECT "Number of PNC votes" FROM table_44645 WHERE "Election" < '1996' |
calculate the difference between the total amount of input and the total output of patient 010-32430 on the first intensive care unit visit. | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid ... | SELECT (SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-32430') AND NOT patient.unitdischarg... |
give me the number of patients whose marital status is married and procedure long title is pericardiocentesis? | 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 lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.long_title = "Pericardiocentesis" |
What Fall PATH classes are offered ? | CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE course (course... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'PATH' AND semester.semester = 'Fall' |
What is the sum of the crowd when the away team score was 12.11 (83)? | CREATE TABLE table_52690 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT SUM("Crowd") FROM table_52690 WHERE "Away team score" = '12.11 (83)' |
What heat, semifinal or final has a time of 25.00? | CREATE TABLE table_64705 ("Date" text,"Event" text,"Heat/Semifinal/Final" text,"Nation" text,"Time" text) | SELECT "Heat/Semifinal/Final" FROM table_64705 WHERE "Time" = '25.00' |
Return the type code of the document named 'David CV'. | CREATE TABLE images (image_id number,image_alt_text text,image_name text,image_url text)CREATE TABLE roles (role_code text,role_description text)CREATE TABLE document_sections (section_id number,document_code text,section_sequence number,section_code text,section_title text)CREATE TABLE document_structures (document_st... | SELECT document_type_code FROM documents WHERE document_name = "David CV" |
Name the nato/ us dod code for sabbot | CREATE TABLE table_24197 ("Chinese industrial designation" text,"Export type designation" text,"NATO reporting name" text,"NATO/U.S DOD code" text,"Remarks" text) | SELECT "NATO/U.S DOD code" FROM table_24197 WHERE "NATO reporting name" = 'SABBOT' |
What was John Jones's pick#? | CREATE TABLE table_name_30 (pick INTEGER,player VARCHAR) | SELECT SUM(pick) FROM table_name_30 WHERE player = "john jones" |
What round has the highest Res loss, and a time of 40:00? | CREATE TABLE table_75527 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text) | SELECT MAX("Round") FROM table_75527 WHERE "Res." = 'loss' AND "Time" = '40:00' |
What is the Round with a Opponent with blackburn? | CREATE TABLE table_name_15 (round VARCHAR,opponent VARCHAR) | SELECT round FROM table_name_15 WHERE opponent = "blackburn" |
how many patients the previous year were prescribed fluoxetine hcl after venous cath nec during the same month? | 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 d_icd_procedures (row_id number,icd9_code text,short_title tex... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'venous cath... |
I want the region for ICAO of vmmc | CREATE TABLE table_name_28 (region VARCHAR,icao VARCHAR) | SELECT region FROM table_name_28 WHERE icao = "vmmc" |
what time did patient 31300 first had the minimum tacrofk value until 11/2103? | CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id nu... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31300) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'tacrofk') AND STRFTIME('%y-%m', labevents.charttime) <= '2103-11' ORDER BY labe... |
What is the sum of Year(s), when Championship is 'Australian Open', when Outcome is 'Runner-Up', and when Score in Final is 3-6, 6-3, 6-2? | CREATE TABLE table_name_36 (year INTEGER,score_in_final VARCHAR,championship VARCHAR,outcome VARCHAR) | SELECT SUM(year) FROM table_name_36 WHERE championship = "australian open" AND outcome = "runner-up" AND score_in_final = "3-6, 6-3, 6-2" |
What player has a score larger than 67? | CREATE TABLE table_49646 ("Place" text,"Player" text,"Country" text,"Score" real,"To par" text) | SELECT "Player" FROM table_49646 WHERE "Score" > '67' |
What was the Date of Country of United States? | CREATE TABLE table_name_97 (date VARCHAR,country VARCHAR) | SELECT date FROM table_name_97 WHERE country = "united states" |
what is the date of the lst player that joined ? | CREATE TABLE table_204_883 (id number,"pos." text,"name" text,"place of birth" text,"date of birth" text,"previous club" text,"date joined" text,"fee" text) | SELECT "date joined" FROM table_204_883 ORDER BY "date joined" LIMIT 1 |
How many first place participants where from croatia? | CREATE TABLE table_31430 ("Rank" real,"Country/Territory" text,"Manhunt International" real,"1st runner-up" real,"2nd runner-up" real,"3rd runner-up" real,"4th runner-up" real,"Semifinalists" real,"Total" real) | SELECT "3rd runner-up" FROM table_31430 WHERE "Country/Territory" = 'Croatia' |
What is the tie number when the home team was gillingham? | CREATE TABLE table_44771 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Tie no" FROM table_44771 WHERE "Home team" = 'gillingham' |
Show different locations and the number of performances at each location. | CREATE TABLE member_attendance (Member_ID int,Performance_ID int,Num_of_Pieces int)CREATE TABLE performance (Performance_ID real,Date text,Host text,Location text,Attendance int)CREATE TABLE member (Member_ID text,Name text,Nationality text,Role text) | SELECT Location, COUNT(*) FROM performance GROUP BY Location |
provide the number of patients whose diagnoses icd9 code is 2930 and lab test fluid is pleural? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "2930" AND lab.fluid = "Pleural" |
Who are the rowers ranked greater than 3 from Finland? | CREATE TABLE table_14281 ("Rank" real,"Rowers" text,"Country" text,"Time" text,"Notes" text) | SELECT "Rowers" FROM table_14281 WHERE "Rank" > '3' AND "Country" = 'finland' |
how many patients with admission location as phys refferal/normal deli were below the age of 48? | 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 demographic (subject_id text,hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.age < "48" |
i need a flight from ONTARIO to LOS ANGELES on a THURSDAY | CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE airport_service (city_code varchar,airport_code varchar,miles_distant int,direction varchar,minutes_distant int)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int,d... | 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, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LOS ANGELES' AND days.day_name = 'THURSDAY' AND flight.flight_days = days.days_code... |
What geographical region is contestant laura jim nez ynoa from? | CREATE TABLE table_24192031_2 (geographical_regions VARCHAR,contestant VARCHAR) | SELECT geographical_regions FROM table_24192031_2 WHERE contestant = "Laura Jiménez Ynoa" |
If the total number of seats is under 144, and the seats won is 32, which election is this? | CREATE TABLE table_10159 ("Election" text,"D\u00e1il" text,"Share of votes" text,"Seats" real,"Total seats" real) | SELECT "Election" FROM table_10159 WHERE "Total seats" < '144' AND "Seats" = '32' |
What is the average value of Bush# when the value for Others# is greater than 57, and the value for Bush% is 49.2%? | CREATE TABLE table_name_70 (bush_number INTEGER,others_number VARCHAR,bush_percentage VARCHAR) | SELECT AVG(bush_number) FROM table_name_70 WHERE others_number > 57 AND bush_percentage = "49.2%" |
Plot the total number by grouped by carrier as a bar graph, and I want to list in asc by the names. | CREATE TABLE market (Market_ID int,District text,Num_of_employees int,Num_of_shops real,Ranking int)CREATE TABLE phone (Name text,Phone_ID int,Memory_in_G int,Carrier text,Price real)CREATE TABLE phone_market (Market_ID int,Phone_ID text,Num_of_stock int) | SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier ORDER BY Carrier |
Visualize a bar chart about the distribution of Time and meter_100 , and show in ascending by the total number. | 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 event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year... | SELECT Time, meter_100 FROM swimmer ORDER BY meter_100 |
provide the number of patients whose diagnosis long title is osteoporosis, unspecified and lab test abnormal status is abnormal. | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Osteoporosis, unspecified" AND lab.flag = "abnormal" |
What party was re-elected as an incumbent of robert p. Kennedy? | CREATE TABLE table_name_69 (party VARCHAR,result VARCHAR,incumbent VARCHAR) | SELECT party FROM table_name_69 WHERE result = "re-elected" AND incumbent = "robert p. kennedy" |
What Team has Bob Wollek as a Driver with 76 Laps in C1 Class? | CREATE TABLE table_45655 ("Class" text,"Team" text,"Driver" text,"Chassis \u2013 Engine" text,"Laps" real) | SELECT "Team" FROM table_45655 WHERE "Class" = 'c1' AND "Laps" = '76' AND "Driver" = 'bob wollek' |
Which On demandhas a Free or pay of free and a Provider of freesat? | CREATE TABLE table_60013 ("Provider" text,"Years" text,"Free or pay" text,"Transmission" text,"On demand" text) | SELECT "On demand" FROM table_60013 WHERE "Free or pay" = 'free' AND "Provider" = 'freesat' |
what score did tiger woods achieve in his third round ? | CREATE TABLE table_203_230 (id number,"place" text,"player" text,"country" text,"score" text,"to par" number) | SELECT "score" FROM table_203_230 WHERE "player" = 'tiger woods' |
How many floors were there with a building rank of less than 3 and a height of 300 / 985 m (ft)? | CREATE TABLE table_name_3 (floors VARCHAR,rank VARCHAR,height VARCHAR,_m__ft_ VARCHAR) | SELECT COUNT(floors) FROM table_name_3 WHERE height * _m__ft_ = "300 / 985" AND rank < 3 |
What is the average number of losses when there are more than 0 ties? | CREATE TABLE table_name_49 (lost INTEGER,tied INTEGER) | SELECT AVG(lost) FROM table_name_49 WHERE tied > 0 |
what was the name of the drug, which patient 20801 had been prescribed two times until 09/2105? | CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid number,intime time,outtime time)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses_icd (row_id nu... | SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20801) AND STRFTIME('%y-%m', prescriptions.startdate) <= '2105-09' GROUP BY prescriptions.drug) AS t1 WHERE t1.c... |
What is every species when Afinsa is 639? | CREATE TABLE table_22196 ("Year" real,"Date" text,"Type" text,"Species" text,"Author Species" text,"Value" text,"Afinsa" real,"Scott" text,"Mitchell" real,"Yvert" text,"Sta. & Gib." real,"Order" text,"Family" text) | SELECT "Species" FROM table_22196 WHERE "Afinsa" = '639' |
The match against Mark Hunt had what result? | CREATE TABLE table_50245 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Res." FROM table_50245 WHERE "Opponent" = 'mark hunt' |
is there a flight around 3pm from CHARLOTTE to MINNEAPOLIS | CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE fare_basis (fare_basis_code text,booking_class text,class_type text,premium text,economy text,discounted text,night text,season text,basis_days text)CREATE TABLE equipment_sequence (aircraft_code_sequence varchar,aircraft_code varchar)CREATE TABLE aircr... | 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 ((flight.departure_time <= 1530 AND flight.departure_time >= 1430) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MINNEAPOLIS' AND fl... |
List all church names in descending order of opening date. | CREATE TABLE church (name VARCHAR,open_date VARCHAR) | SELECT name FROM church ORDER BY open_date DESC |
Where is Transocean Richardson, a semi entered into service in 1988? | CREATE TABLE table_38843 ("Name" text,"Type" text,"Entered service" text,"Water depth" text,"Location" text) | SELECT "Location" FROM table_38843 WHERE "Type" = 'semi' AND "Entered service" = '1988' AND "Name" = 'transocean richardson' |
For the teams that had more than 2 Byes, what was the highest number of Wins? | CREATE TABLE table_43364 ("Ballarat FL" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real) | SELECT MAX("Wins") FROM table_43364 WHERE "Byes" > '2' |
Which courses in Univ Chamber Choir will satisfy the ULCS requirement ? | CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREAT... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Univ Chamber Choir%' OR course.description LIKE '%Univ Chamber Choir%' OR course.name LIKE '%Uni... |
What is the Digital/analog signal with an Available interface with pci express, with Retail name with all-in-wonder x600 pro? | CREATE TABLE table_name_71 (digital_analog_signal VARCHAR,available_interface VARCHAR,retail_name VARCHAR) | SELECT digital_analog_signal FROM table_name_71 WHERE available_interface = "pci express" AND retail_name = "all-in-wonder x600 pro" |
What is Score, when Player is 'Ernie Els'? | CREATE TABLE table_name_15 (score VARCHAR,player VARCHAR) | SELECT score FROM table_name_15 WHERE player = "ernie els" |
When Karaorman is Team 1, what is the Agg.? | CREATE TABLE table_name_48 (agg VARCHAR,team_1 VARCHAR) | SELECT agg FROM table_name_48 WHERE team_1 = "karaorman" |
What is the name of the venue when the home team is Richmond? | CREATE TABLE table_54211 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Venue" FROM table_54211 WHERE "Home team" = 'richmond' |
What is the average grid number with a ferrari and a time or retired time of 1:32:35.101? | CREATE TABLE table_name_10 (grid INTEGER,constructor VARCHAR,time_retired VARCHAR) | SELECT AVG(grid) FROM table_name_10 WHERE constructor = "ferrari" AND time_retired = "1:32:35.101" |
Who was the home team when the away team was Telford United? | CREATE TABLE table_48917 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Home team" FROM table_48917 WHERE "Away team" = 'telford united' |
What is the total cloud cover rates of the dates (bin into year interval) that had the top 5 cloud cover rates? You can draw me a bar chart for this purpose, rank in descending by the Y-axis. | CREATE TABLE station (id INTEGER,name TEXT,lat NUMERIC,long NUMERIC,dock_count INTEGER,city TEXT,installation_date TEXT)CREATE TABLE status (station_id INTEGER,bikes_available INTEGER,docks_available INTEGER,time TEXT)CREATE TABLE weather (date TEXT,max_temperature_f INTEGER,mean_temperature_f INTEGER,min_temperature_f... | SELECT date, SUM(cloud_cover) FROM weather ORDER BY SUM(cloud_cover) DESC |
how many patients are with white ethnicity and with oral drug route? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE" AND prescriptions.route = "ORAL" |
count the number of patients whose admission location is emergency room admit and item id is 51375. | 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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND lab.itemid = "51375" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.