instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
what's the score where record is 0 2 | CREATE TABLE table_11964047_5 (score VARCHAR,record VARCHAR) | SELECT score FROM table_11964047_5 WHERE record = "0–2" |
Show me the number of born state by born state in a histogram | CREATE TABLE management (department_ID int,head_ID int,temporary_acting text)CREATE TABLE head (head_ID int,name text,born_state text,age real)CREATE TABLE department (Department_ID int,Name text,Creation text,Ranking int,Budget_in_Billions real,Num_Employees real) | SELECT born_state, COUNT(born_state) FROM head GROUP BY born_state |
What is who-two where you and i is ng ban? | CREATE TABLE table_15992 ("Case/Suffix" text,"we two" text,"you and I" text,"you two" text,"them two (the two)" text,"who-two" text) | SELECT "who-two" FROM table_15992 WHERE "you and I" = 'ngœban' |
What is Notes, when App(L/C/E) is 13 (7/2/4)? | CREATE TABLE table_name_89 (notes VARCHAR,app_l_c_e_ VARCHAR) | SELECT notes FROM table_name_89 WHERE app_l_c_e_ = "13 (7/2/4)" |
how many hours has it been since the first time patient 027-61708 was diagnosed during their current hospital encounter with obstructive sleep apnea? | CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientu... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnosis.diagnosistime)) FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-61708... |
When was the first UK broadcast for the episode with an official TNS Gallup rating of 1575000? | CREATE TABLE table_26591309_2 (first_broadcast_uk___bbc_four__ VARCHAR,official_tns_gallup_ratings VARCHAR) | SELECT first_broadcast_uk___bbc_four__ FROM table_26591309_2 WHERE official_tns_gallup_ratings = 1575000 |
What language is the film Karnal in? | CREATE TABLE table_name_22 (language VARCHAR,original_title VARCHAR) | SELECT language FROM table_name_22 WHERE original_title = "karnal" |
what is the total amount of gammagard s/d that patient 32606 has been prescribed during their first hospital visit? | 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 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,inti... | SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 32606 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND prescriptions.drug = 'gammagard s/d' |
How many tickets are sold for the Carver-Hawkeye Arena? | CREATE TABLE table_18277458_2 (ticket_sold___available VARCHAR,venue VARCHAR) | SELECT ticket_sold___available FROM table_18277458_2 WHERE venue = "Carver-Hawkeye Arena" |
What is the latest year? | CREATE TABLE table_2199290_1 (year INTEGER) | SELECT MAX(year) FROM table_2199290_1 |
during this year did patient 3097 visit the hospital? | 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 number,icd9_code text,charttime time)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueu... | SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 3097 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') |
Stacked bar of class and the number of class colored by Rank, and display in asc by the x axis please. | CREATE TABLE Ship (Ship_ID int,Name text,Type text,Built_Year real,Class text,Flag text)CREATE TABLE captain (Captain_ID int,Name text,Ship_ID int,age text,Class text,Rank text) | SELECT Class, COUNT(Class) FROM captain GROUP BY Rank, Class ORDER BY Class |
get the number of patients admitted before the year 2182 who were on non-invasive mechanical ventilation. | 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.admityear < "2182" AND procedures.short_title = "Non-invasive mech vent" |
What is the location of the Kkspe Foundation? | CREATE TABLE table_61912 ("Name in English" text,"Name in Malay" text,"Acronym" text,"Foundation" text,"Location" text) | SELECT "Location" FROM table_61912 WHERE "Foundation" = 'kkspe' |
Who was the director of the episode called 'If I had a hammer'? | CREATE TABLE table_26612 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. viewers (millions)" text) | SELECT "Directed by" FROM table_26612 WHERE "Title" = 'If I Had a Hammer' |
What is the sum of againsts the team with less than 38 played had? | CREATE TABLE table_name_86 (against INTEGER,played INTEGER) | SELECT SUM(against) FROM table_name_86 WHERE played < 38 |
What was the Attendance high on August 28? | CREATE TABLE table_name_26 (attendance INTEGER,date VARCHAR) | SELECT MAX(attendance) FROM table_name_26 WHERE date = "august 28" |
For those employees who did not have any job in the past, show me about the change of salary over hire_date in a line chart. | 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),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,... | SELECT HIRE_DATE, SALARY FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) |
Find the number of routes operated by American Airlines. | CREATE TABLE airlines (alid number,name text,iata text,icao text,callsign text,country text,active text)CREATE TABLE airports (apid number,name text,city text,country text,x number,y number,elevation number,iata text,icao text)CREATE TABLE routes (rid number,dst_apid number,dst_ap text,src_apid number,src_ap text,alid ... | SELECT COUNT(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines' |
In the past , who taught WOMENSTD 300 ? | CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE course_offering (offering_id int,course_id int,semester int,section_number int,start_time time,end_time time,monday varchar,tuesday varchar,wednesday varchar,thursday v... | SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN semester... |
Name the loss for the angels opponent | CREATE TABLE table_name_10 (loss VARCHAR,opponent VARCHAR) | SELECT loss FROM table_name_10 WHERE opponent = "angels" |
List all the MCs with peak ranking of 6 who were inducted in 2007. | CREATE TABLE table_29160596_1 (top_mc VARCHAR,year_inducted VARCHAR,peak_ranking VARCHAR) | SELECT top_mc FROM table_29160596_1 WHERE year_inducted = 2007 AND peak_ranking = 6 |
Which Away has a Home of 2 2? | CREATE TABLE table_name_84 (away VARCHAR,home VARCHAR) | SELECT away FROM table_name_84 WHERE home = "2–2" |
What was the gp/gs when the assists was 1? | CREATE TABLE table_name_4 (gp_gs VARCHAR,assists VARCHAR) | SELECT gp_gs FROM table_name_4 WHERE assists = "1" |
How many wins did he have when he made over 2 cuts and had under 2 top 10s? | CREATE TABLE table_14930 ("Tournament" text,"Wins" real,"Top-10" real,"Events" real,"Cuts made" real) | SELECT AVG("Wins") FROM table_14930 WHERE "Cuts made" > '2' AND "Top-10" < '2' |
What was the away team for the match at Punt Road Oval? | CREATE TABLE table_name_39 (away_team VARCHAR,venue VARCHAR) | SELECT away_team FROM table_name_39 WHERE venue = "punt road oval" |
Who won the Food World 250? | CREATE TABLE table_45158 ("Date" text,"Race" text,"Track" text,"Winner" text,"Reports" text) | SELECT "Winner" FROM table_45158 WHERE "Race" = 'food world 250' |
how many 'Party' are in district south carolina 2? | CREATE TABLE table_28864 ("District" text,"Incumbent" text,"Party" text,"First elected" text,"Result" text,"Candidates" text) | SELECT COUNT("Party") FROM table_28864 WHERE "District" = 'South Carolina 2' |
what is gender and procedure long title of subject id 2560? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT demographic.gender, procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" |
What is the agg when team 1 is Milan? | CREATE TABLE table_name_70 (agg VARCHAR,team_1 VARCHAR) | SELECT agg FROM table_name_70 WHERE team_1 = "milan" |
What day in November has the game less than 12? | CREATE TABLE table_49415 ("Game" real,"November" real,"Opponent" text,"Score" text,"Record" text) | SELECT "November" FROM table_49415 WHERE "Game" < '12' |
i want to fly DALLAS to SAN FRANCISCO on monday 7 8 | CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE code_description (code varchar,description text)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE compartment_class (compartment varchar,class... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 8 AND date_day.month_number = 7 ... |
Who is the directed by when the production code is 67425? | CREATE TABLE table_28379 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real) | SELECT "Directed by" FROM table_28379 WHERE "Production code" = '67425' |
Who won women's double in 2002, the year that Kenneth Vella won men's singles? | CREATE TABLE table_6653 ("Year" text,"Men's singles" text,"Women's singles" text,"Men's doubles" text,"Women's doubles" text,"Mixed doubles" text) | SELECT "Women's doubles" FROM table_6653 WHERE "Men's singles" = 'kenneth vella' AND "Year" = '2002' |
What is the highest Pick # when the CFL Team is the Toronto Argonauts? | CREATE TABLE table_39808 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text) | SELECT MAX("Pick #") FROM table_39808 WHERE "CFL Team" = 'toronto argonauts' |
What company was the constructor when Nick Heidfeld was the driver/ | CREATE TABLE table_name_50 (constructor VARCHAR,driver VARCHAR) | SELECT constructor FROM table_name_50 WHERE driver = "nick heidfeld" |
How many byes for the team with more than 14 losses and more than 0 wins? | CREATE TABLE table_name_92 (byes INTEGER,losses VARCHAR,wins VARCHAR) | SELECT AVG(byes) FROM table_name_92 WHERE losses > 14 AND wins > 0 |
What is the outgoing manager when the incoming manager is tefan tarkovi ? | CREATE TABLE table_27683516_3 (outgoing_manager VARCHAR,incoming_manager VARCHAR) | SELECT outgoing_manager FROM table_27683516_3 WHERE incoming_manager = "Štefan Tarkovič" |
What laps did Honda do with a time of +1:38.407? | CREATE TABLE table_name_39 (laps VARCHAR,manufacturer VARCHAR,time VARCHAR) | SELECT laps FROM table_name_39 WHERE manufacturer = "honda" AND time = "+1:38.407" |
among patients tested for creatine kinase, mb isoenzyme, how many of them were english speaking? | 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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.language = "ENGL" AND lab.label = "Creatine Kinase, MB Isoenzyme" |
What is the location for the win against Johan Mparmpagiannis? | CREATE TABLE table_name_78 (location VARCHAR,result VARCHAR,opponent VARCHAR) | SELECT location FROM table_name_78 WHERE result = "win" AND opponent = "johan mparmpagiannis" |
Which Comparative has a Name of pictar? | CREATE TABLE table_36081 ("Name" text,"Species Specific" text,"Intra-molecular structure" text,"Comparative" text,"Link" text) | SELECT "Comparative" FROM table_36081 WHERE "Name" = 'pictar' |
Compare the prices of each manufacturer's most expensive product with a bar chart, and could you display by the Y in ascending? | 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, MAX(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY MAX(T1.Price) |
What was Robert Doornbos' Best? | CREATE TABLE table_name_47 (best VARCHAR,name VARCHAR) | SELECT best FROM table_name_47 WHERE name = "robert doornbos" |
What is Years, when Nationality is United States, and when Position is PG / SG? | CREATE TABLE table_48197 ("Player" text,"Nationality" text,"Jersey Number(s)" real,"Position" text,"Years" text,"From" text) | SELECT "Years" FROM table_48197 WHERE "Nationality" = 'united states' AND "Position" = 'pg / sg' |
What is the silver number when gold is more than 4, and the total is less than 24? | CREATE TABLE table_name_54 (silver INTEGER,gold VARCHAR,total VARCHAR) | SELECT AVG(silver) FROM table_name_54 WHERE gold > 4 AND total < 24 |
What was the score of the game on May 26? | CREATE TABLE table_37710 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Decision" text,"Attendance" real) | SELECT "Score" FROM table_37710 WHERE "Date" = 'may 26' |
Which Genre has a Game of tony hawk's pro skater 2? | CREATE TABLE table_79585 ("Year" real,"Game" text,"Genre" text,"Platform" text,"Publisher" text) | SELECT "Genre" FROM table_79585 WHERE "Game" = 'tony hawk''s pro skater 2' |
What are the torque characteristics of the model made in 1996? | CREATE TABLE table_20007413_6 (torque VARCHAR,year VARCHAR) | SELECT torque FROM table_20007413_6 WHERE year = "1996" |
count the number of patients whose admission year is less than 2200 and item id is 51222? | 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 < "2200" AND lab.itemid = "51222" |
When curtis strange had a to par +1, what was his score? | CREATE TABLE table_50055 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Score" FROM table_50055 WHERE "To par" = '+1' AND "Player" = 'curtis strange' |
how much does the arterial bp [diastolic] change of patient 8908 last measured on the last icu visit compared to the first value measured on the last icu visit? | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)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 admissions (row_id number,subje... | SELECT (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 = 8908) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents.... |
give me the flights from KANSAS CITY to CHICAGO leaving next wednesday arriving at CHICAGO at about 7pm | 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 code_description (code varc... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((flight.arrival_time <= 1930 AND flight.arrival_time >= 1830) AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 19... |
Name the most fa cup apps for league apps being 27 | CREATE TABLE table_2979789_1 (fa_cup_apps INTEGER,league_apps VARCHAR) | SELECT MAX(fa_cup_apps) FROM table_2979789_1 WHERE league_apps = 27 |
Which courses are SI 6 -credit courses ? | CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,repeat_term varchar,test_id varchar)CREATE TABLE course_tags_count (course_id int,clear_grading int,pop_quiz int,group_projects int,inspirational int,long_lectures int,extra_credi... | SELECT DISTINCT name, number FROM course WHERE department = 'SI' AND credits = 6 |
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about commission_pct over the last_name , display in asc by the X-axis. | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))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 jobs (JOB_ID var... | SELECT LAST_NAME, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME |
How many instances is paris the unlock? | CREATE TABLE table_24463470_1 (unlock_order VARCHAR,unlocks VARCHAR) | SELECT COUNT(unlock_order) FROM table_24463470_1 WHERE unlocks = "Paris" |
For all employees who have the letters D or S in their first name, give me the comparison about the average of department_id over the hire_date bin hire_date by weekday, and display Y-axis in desc order. | 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(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID ... | SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(DEPARTMENT_ID) DESC |
how many tournaments were in 1967 ? | CREATE TABLE table_204_621 (id number,"no." number,"date" text,"tournament" text,"winning score" text,"margin\nof victory" text,"runner(s)-up" text) | SELECT COUNT("tournament") FROM table_204_621 WHERE "date" = 1967 |
What team has 59.372 for qual 1? | CREATE TABLE table_name_37 (team VARCHAR,qual_1 VARCHAR) | SELECT team FROM table_name_37 WHERE qual_1 = "59.372" |
count the number of patients whose admission type is emergency and diagnoses long title is other specified disorders of esophagus? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Other specified disorders of esophagus" |
how many patients were diagnosed with a congenital heart anomaly nos and an abnormal lab test? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Cong heart anomaly NOS" AND lab.flag = "abnormal" |
Stacked bar chart of the total number for with each Sex in each rank, could you rank in asc by the Y-axis? | CREATE TABLE Faculty_Participates_in (FacID INTEGER,actid INTEGER)CREATE TABLE Participates_in (stuid INTEGER,actid INTEGER)CREATE TABLE Activity (actid INTEGER,activity_name varchar(25))CREATE TABLE Faculty (FacID INTEGER,Lname VARCHAR(15),Fname VARCHAR(15),Rank VARCHAR(15),Sex VARCHAR(1),Phone INTEGER,Room VARCHAR(5)... | SELECT Rank, COUNT(*) FROM Faculty GROUP BY Sex, Rank ORDER BY COUNT(*) |
What is the description for the livery Br Grey? | CREATE TABLE table_name_81 (description VARCHAR,livery VARCHAR) | SELECT description FROM table_name_81 WHERE livery = "br grey" |
What is Time, when Speed is 87.49mph? | CREATE TABLE table_name_15 (time VARCHAR,speed VARCHAR) | SELECT time FROM table_name_15 WHERE speed = "87.49mph" |
What is the total number of playoffs held in exactly 2006? | CREATE TABLE table_2205 ("Year" real,"Division" real,"League" text,"Regular Season" text,"Playoffs" text,"Open Canada Cup" text) | SELECT COUNT("Playoffs") FROM table_2205 WHERE "Year" = '2006' |
Name the ebit for eps being 10.6 | CREATE TABLE table_22242 ("Year to April" real,"Revenue (\u00a3million)" text,"EBIT (\u00a3m)" text,"Net profit (\u00a3m)" text,"Earnings per share (p)" text) | SELECT "EBIT (\u00a3m)" FROM table_22242 WHERE "Earnings per share (p)" = '10.6' |
When will Intensive Latin be offered ? | CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varch... | SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_o... |
What opponent has a record of 6-9? | CREATE TABLE table_name_27 (opponent VARCHAR,record VARCHAR) | SELECT opponent FROM table_name_27 WHERE record = "6-9" |
how many patients whose gender is m and drug code is mido5? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "M" AND prescriptions.formulary_drug_cd = "MIDO5" |
Which home team has a home team 14.12 (96)? | CREATE TABLE table_78491 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Home team" FROM table_78491 WHERE "Home team score" = '14.12 (96)' |
What year is the 2007 big red? | CREATE TABLE table_name_96 (year VARCHAR) | SELECT year FROM table_name_96 WHERE 2007 = "big red" |
What was the lowest round for a tight end position? | CREATE TABLE table_36195 ("Round" real,"Pick" text,"Name" text,"Position" text,"College" text) | SELECT MIN("Round") FROM table_36195 WHERE "Position" = 'tight end' |
What is the sum of cents that has 53ET cents less than 113.21, and a harmonic more than 1? | CREATE TABLE table_62396 ("Harmonic" real,"Ratio" text,"Cents" real,"12ET Cents" text,"53ET Commas" real,"53ET Cents" real) | SELECT SUM("Cents") FROM table_62396 WHERE "53ET Cents" < '113.21' AND "Harmonic" > '1' |
what is the score on february 18? | CREATE TABLE table_8874 ("Game" real,"Date" text,"Opponent" text,"Score" text,"Location/Attendance" text,"Record" text) | SELECT "Score" FROM table_8874 WHERE "Date" = 'february 18' |
what is the lowest round pole position of satoshi motoyama | CREATE TABLE table_name_22 (round INTEGER,pole_position VARCHAR) | SELECT MIN(round) FROM table_name_22 WHERE pole_position = "satoshi motoyama" |
Name the artist for 1595 televotes | CREATE TABLE table_21378339_5 (artist VARCHAR,televotes VARCHAR) | SELECT artist FROM table_21378339_5 WHERE televotes = 1595 |
What is Score, when Opponent Team is Belgium, and when Opponent is Kirsten Flipkens? | CREATE TABLE table_name_83 (score VARCHAR,opponent_team VARCHAR,opponent VARCHAR) | SELECT score FROM table_name_83 WHERE opponent_team = "belgium" AND opponent = "kirsten flipkens" |
What is the First Issue date of Soul Eater? | CREATE TABLE table_63810 ("Title" text,"Author" text,"First Issue" text,"Last Issue" text,"Completed?" text) | SELECT "First Issue" FROM table_63810 WHERE "Title" = 'soul eater' |
WHAT SCORE WAS ON SEPTEMBER 21? | CREATE TABLE table_47867 ("Date" text,"Opponent" text,"Score" text,"Result" text,"Record" text) | SELECT "Score" FROM table_47867 WHERE "Date" = 'september 21' |
What Surface had a Rally HQ of salou? | CREATE TABLE table_64381 ("Round" real,"Dates" text,"Rally Name" text,"Rally HQ" text,"Support Category" text,"Surface" text) | SELECT "Surface" FROM table_64381 WHERE "Rally HQ" = 'salou' |
What is the name, address, and number of students in the departments that have the 3 most students? | CREATE TABLE employee (emp_num number,emp_lname text,emp_fname text,emp_initial text,emp_jobcode text,emp_hiredate time,emp_dob time)CREATE TABLE enroll (class_code text,stu_num number,enroll_grade text)CREATE TABLE course (crs_code text,dept_code text,crs_description text,crs_credit number)CREATE TABLE student (stu_nu... | SELECT T2.dept_name, T2.dept_address, COUNT(*) FROM student AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code GROUP BY T1.dept_code ORDER BY COUNT(*) DESC LIMIT 3 |
Number of comments by user. | CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId n... | SELECT UserId AS "user_link", COUNT(*) FROM Comments WHERE CreationDate BETWEEN '##fromDate:string##' AND '##tillDate:string##' GROUP BY UserId ORDER BY COUNT(*) DESC |
List the name of technicians whose team is not 'NYY'. | CREATE TABLE technician (technician_id number,name text,team text,starting_year number,age number)CREATE TABLE repair (repair_id number,name text,launch_date text,notes text)CREATE TABLE repair_assignment (technician_id number,repair_id number,machine_id number)CREATE TABLE machine (machine_id number,making_year number... | SELECT name FROM technician WHERE team <> "NYY" |
Progression of comments referring to CodeReview. See how many posts per day with comments referring to CodeReview. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE... | SELECT DATE(CreationDate) AS CreationDate, COUNT(pp.CAmount) AS Amount FROM (SELECT PostId, COUNT(*) AS CAmount FROM Comments WHERE UPPER(Text) LIKE '%CODEREVIEW%' GROUP BY PostId) AS pp RIGHT OUTER JOIN Posts ON pp.PostId = Posts.Id GROUP BY DATE(CreationDate) ORDER BY CreationDate |
Name the episode for viewers bigger than 5.63 and the households rating is 4.5/7 | CREATE TABLE table_name_62 (episode VARCHAR,viewers__m_ VARCHAR,households__rating_share_ VARCHAR) | SELECT episode FROM table_name_62 WHERE viewers__m_ > 5.63 AND households__rating_share_ = "4.5/7" |
What is Years, when Jersey Number(s) is 21, and when Position is SG? | CREATE TABLE table_name_97 (years VARCHAR,jersey_number_s_ VARCHAR,position VARCHAR) | SELECT years FROM table_name_97 WHERE jersey_number_s_ = "21" AND position = "sg" |
What is the total number of losses for teams with more than 0 byes? | CREATE TABLE table_name_43 (losses VARCHAR,byes INTEGER) | SELECT COUNT(losses) FROM table_name_43 WHERE byes > 0 |
How many poles does status grand prix have? | CREATE TABLE table_name_57 (poles VARCHAR,racing_team VARCHAR) | SELECT poles FROM table_name_57 WHERE racing_team = "status grand prix" |
Which Call sign has a Branding of cbc radio one? | CREATE TABLE table_43448 ("Frequency" text,"Call sign" text,"Branding" text,"Format" text,"Owner" text) | SELECT "Call sign" FROM table_43448 WHERE "Branding" = 'cbc radio one' |
What were the Points on December 13? | CREATE TABLE table_49959 ("Game" real,"Date" text,"Opponent" text,"Score" text,"Location" text,"Attendance" real,"Record" text,"Points" real) | SELECT MAX("Points") FROM table_49959 WHERE "Date" = 'december 13' |
count the number of patients who received a thoracentesis procedure during the same month after they were diagnosed with asymp hiv infectn status until 2 years ago. | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime 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_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'asymp hiv infectn ... |
What type of cartridge is used by a Winchester? | CREATE TABLE table_20468 ("Cartridge" text,"Bullet weight" text,"Muzzle velocity" text,"Muzzle energy" text,"Source" text) | SELECT "Cartridge" FROM table_20468 WHERE "Source" = 'Winchester' |
what were the top three most common procedures that followed in the same hospital visit for patients that received a oxygen therapy (40% to 60%) since 2105? | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunit... | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'oxyge... |
Who was the winning team of the game that was contested on February 1, 2009? | CREATE TABLE table_10548224_1 (winning_team VARCHAR,date_contested VARCHAR) | SELECT winning_team FROM table_10548224_1 WHERE date_contested = "February 1, 2009" |
indicate the daily maximum amount of arterial bp [systolic] for patient 6725 until 12/07/2105. | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)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 prescriptio... | SELECT MAX(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 = 6725)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arter... |
Where was the 05/09/1973 venue? | CREATE TABLE table_46508 ("Opposing Team" text,"Against" real,"Date" text,"Venue" text,"Status" text) | SELECT "Venue" FROM table_46508 WHERE "Date" = '05/09/1973' |
Who was the opponent for the game played with 54,136 people in attendance? | CREATE TABLE table_name_38 (opponent VARCHAR,attendance VARCHAR) | SELECT opponent FROM table_name_38 WHERE attendance = "54,136" |
How many Big 12 teams made it to the Final Four? | CREATE TABLE table_4605 ("Conference" text,"# of Bids" real,"Record" text,"Win %" text,"Round of 32" text,"Sweet Sixteen" text,"Elite Eight" text,"Final Four" text,"Championship Game" text) | SELECT "Final Four" FROM table_4605 WHERE "Conference" = 'big 12' |
Which charts had debut sales of of more than 339333.011497678? | CREATE TABLE table_23180638_1 (oricon_albums_chart VARCHAR,debut_sales__copies_ INTEGER) | SELECT oricon_albums_chart FROM table_23180638_1 WHERE debut_sales__copies_ > 339333.011497678 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.