instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the most easy class I can take to fulfill the Other requirement . | 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 semester (semester_id int,semester varchar,year int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit i... | SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_c... |
For the item with a Prince XML value of 'font', what is the WebKit value? | CREATE TABLE table_49301 ("Trident" text,"Gecko" text,"WebKit" text,"KHTML" text,"Presto" text,"Prince XML" text) | SELECT "WebKit" FROM table_49301 WHERE "Prince XML" = 'font' |
What series number had an original airdate of March 1, 1991? | CREATE TABLE table_26540 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real) | SELECT MIN("No. in series") FROM table_26540 WHERE "Original air date" = 'March 1, 1991' |
what were the three most commonly performed procedures for patients 30s since 2102? | CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND STRFTIME('%y', treatment.treatmenttime) >= '2102' GROUP BY treatment.... |
on 09/08/last year, what was the last value of arterial bp [diastolic] for patient 15754? | CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE d_icd_diagn... | 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 = 15754)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ... |
impaired renal function defined as serum creatinine > 1.5 . | CREATE TABLE table_train_178 ("id" int,"gender" string,"pregnancy_or_lactation" bool,"hiv_infection" bool,"hepatitis_c" bool,"renal_disease" bool,"hypoglycemia" bool,"serum_creatinine" float,"seizure_disorder" bool,"body_mass_index_bmi" float,"NOUSE" float) | SELECT * FROM table_train_178 WHERE renal_disease = 1 OR serum_creatinine > 1.5 |
Which Years in Orlando has a Position of center, and a School/Club Team of louisiana state? | CREATE TABLE table_name_41 (years_in_orlando VARCHAR,position VARCHAR,school_club_team VARCHAR) | SELECT years_in_orlando FROM table_name_41 WHERE position = "center" AND school_club_team = "louisiana state" |
among pateints who had a hospital stay for more than 17 days, how many of them were discharged to snf? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "SNF" AND demographic.days_stay > "17" |
What is the average Bike No, when Driver / Passenger is Joris Hendrickx / Kaspars Liepins, and when Position is greater than 4? | CREATE TABLE table_48575 ("Position" real,"Driver / Passenger" text,"Equipment" text,"Bike No" real,"Points" real) | SELECT AVG("Bike No") FROM table_48575 WHERE "Driver / Passenger" = 'joris hendrickx / kaspars liepins' AND "Position" > '4' |
What is the number of finish of the Qual of 159.384? | CREATE TABLE table_name_11 (finish VARCHAR,qual VARCHAR) | SELECT finish FROM table_name_11 WHERE qual = "159.384" |
Who had the high assists while Erick Dampier (8) had the high rebounds? | CREATE TABLE table_17288869_7 (high_assists VARCHAR,high_rebounds VARCHAR) | SELECT high_assists FROM table_17288869_7 WHERE high_rebounds = "Erick Dampier (8)" |
What did the Melbourne team score in their away game? | CREATE TABLE table_name_3 (away_team VARCHAR) | SELECT away_team AS score FROM table_name_3 WHERE away_team = "melbourne" |
Return the apartment number and the number of rooms for each apartment, list in descending by the y-axis. | CREATE TABLE Apartments (apt_id INTEGER,building_id INTEGER,apt_type_code CHAR(15),apt_number CHAR(10),bathroom_count INTEGER,bedroom_count INTEGER,room_count CHAR(5))CREATE TABLE Apartment_Buildings (building_id INTEGER,building_short_name CHAR(15),building_full_name VARCHAR(80),building_description VARCHAR(255),build... | SELECT apt_number, room_count FROM Apartments ORDER BY room_count DESC |
What is the high capacity that has an average under 489 and a highest over 778? | CREATE TABLE table_53809 ("Team" text,"Stadium" text,"Capacity" real,"Highest" real,"Lowest" real,"Average" real) | SELECT MAX("Capacity") FROM table_53809 WHERE "Average" < '489' AND "Highest" > '778' |
who is pictured on top of the list ? | CREATE TABLE table_204_665 (id number,"rank" number,"name" text,"notability" text,"birthplace" text,"advocate" text) | SELECT "name" FROM table_204_665 WHERE id = 1 |
how many times has patient 20441 received a po intake since 1987 days ago? | CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE microbiologyevents (row_id number,subject_id number,had... | SELECT COUNT(*) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20441)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'po intake' A... |
How many losses have a draw greater than 0? | CREATE TABLE table_43193 ("Team" text,"Match" real,"Points" real,"Draw" real,"Lost" real) | SELECT SUM("Lost") FROM table_43193 WHERE "Draw" > '0' |
Report the number of patients who were admitted via physician referral/normal delivery and had a pleural fluid lab test done. | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND lab.fluid = "Pleural" |
What is Set 5, when Date is Jun 26, and when Set 2 is 25-22? | CREATE TABLE table_name_46 (set_5 VARCHAR,date VARCHAR,set_2 VARCHAR) | SELECT set_5 FROM table_name_46 WHERE date = "jun 26" AND set_2 = "25-22" |
who was the only rider with more points than doriano romboni ? | CREATE TABLE table_203_244 (id number,"pos" text,"rider" text,"manufacturer" text,"time/retired" text,"points" number) | SELECT "rider" FROM table_203_244 WHERE "points" > (SELECT "points" FROM table_203_244 WHERE "rider" = 'doriano romboni') |
Tell me the call sign which has a frequency Mhz more than 90.1 and ERP W of 1 | CREATE TABLE table_name_83 (call_sign VARCHAR,frequency_mhz VARCHAR,erp_w VARCHAR) | SELECT call_sign FROM table_name_83 WHERE frequency_mhz > 90.1 AND erp_w = 1 |
What venue has more than 50,715 attending? | CREATE TABLE table_name_45 (venue VARCHAR,attendance INTEGER) | SELECT venue FROM table_name_45 WHERE attendance > 50 OFFSET 715 |
What are the transit connections from Pioneer Square U? | CREATE TABLE table_22771048_2 (transit_connections VARCHAR,station VARCHAR) | SELECT transit_connections FROM table_22771048_2 WHERE station = "Pioneer Square U" |
Questions I've Answered with other answers. | CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidan... | SELECT Id AS "post_link", CreationDate, AnswerCount, Tags FROM Posts AS P WHERE P.Id IN (SELECT ParentId AS Post FROM Posts AS P WHERE OwnerUserId = '##UserId##' AND PostTypeId = 2) AND AnswerCount > 1 ORDER BY CreationDate DESC |
For the team whose shirt sponsor is Evonik, who is the kitmaker? | CREATE TABLE table_50360 ("Team" text,"Head Coach" text,"Team Captain" text,"Kitmaker" text,"Shirt sponsor" text) | SELECT "Kitmaker" FROM table_50360 WHERE "Shirt sponsor" = 'evonik' |
Which games had Philadelphia as home team? | CREATE TABLE table_name_20 (game VARCHAR,home_team VARCHAR) | SELECT game FROM table_name_20 WHERE home_team = "philadelphia" |
What is the maximum league cup goals when there has been 0 FA cup appearances, and MF is the position, with 1 league appearance, and smaller than 0 total goals? | CREATE TABLE table_name_23 (league_cup_goals INTEGER,total_goals VARCHAR,league_apps VARCHAR,fa_cup_apps VARCHAR,position VARCHAR) | SELECT MAX(league_cup_goals) FROM table_name_23 WHERE fa_cup_apps = "0" AND position = "mf" AND league_apps = "1" AND total_goals < 0 |
what was richie hearn 's race position ? | CREATE TABLE table_204_468 (id number,"pos" number,"no" number,"driver" text,"team" text,"laps" number,"time/retired" text,"grid" number,"points" number) | SELECT "pos" FROM table_204_468 WHERE "driver" = 'richie hearn' |
What venue is the home field of Richmond? | CREATE TABLE table_55574 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Venue" FROM table_55574 WHERE "Home team" = 'richmond' |
Show the smallest enrollment of each state, and I want to sort Y-axis in descending order please. | CREATE TABLE College (cName varchar(20),state varchar(2),enr numeric(5,0))CREATE TABLE Tryout (pID numeric(5,0),cName varchar(20),pPos varchar(8),decision varchar(3))CREATE TABLE Player (pID numeric(5,0),pName varchar(20),yCard varchar(3),HS numeric(5,0)) | SELECT state, MIN(enr) FROM College GROUP BY state ORDER BY MIN(enr) DESC |
For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons. Visualize by line chart. | CREATE TABLE all_star (player_id TEXT,year INTEGER,game_num INTEGER,game_id TEXT,team_id TEXT,league_id TEXT,gp NUMERIC,starting_pos NUMERIC)CREATE TABLE team (year INTEGER,league_id TEXT,team_id TEXT,franchise_id TEXT,div_id TEXT,rank INTEGER,g INTEGER,ghome NUMERIC,w INTEGER,l INTEGER,div_win TEXT,wc_win TEXT,lg_win ... | SELECT year, COUNT(*) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' GROUP BY T1.year |
If Internet Explorer is 47.22%, what is the Safari total? | CREATE TABLE table_1876262_10 (safari VARCHAR,internet_explorer VARCHAR) | SELECT safari FROM table_1876262_10 WHERE internet_explorer = "47.22%" |
What is the HDTV when the content shows a timeshift +1 di disney junior? | CREATE TABLE table_name_54 (hdtv VARCHAR,content VARCHAR) | SELECT hdtv FROM table_name_54 WHERE content = "timeshift +1 di disney junior" |
For the game played at Windy Hill, who was the away team? | CREATE TABLE table_name_4 (away_team VARCHAR,venue VARCHAR) | SELECT away_team FROM table_name_4 WHERE venue = "windy hill" |
how many patients went through a sputum, expectorated test in 2104? | CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'sputum, expectorated' AND STRFTIME('%y', microlab.culturetakentime) = '2104') |
What is the date with identifying number of No. 37817? | CREATE TABLE table_57923 ("Number & name" text,"Description" text,"Current status" text,"Livery" text,"Date" real) | SELECT "Date" FROM table_57923 WHERE "Number & name" = 'no. 37817' |
What is the name of the school that has the smallest enrollment in each state?, I want to list x-axis in ascending order. | CREATE TABLE Player (pID numeric(5,0),pName varchar(20),yCard varchar(3),HS numeric(5,0))CREATE TABLE College (cName varchar(20),state varchar(2),enr numeric(5,0))CREATE TABLE Tryout (pID numeric(5,0),cName varchar(20),pPos varchar(8),decision varchar(3)) | SELECT cName, MIN(enr) FROM College GROUP BY state ORDER BY cName |
What is 2003 when 1999 is 2.1? | CREATE TABLE table_27146868_1 (Id VARCHAR) | SELECT 2003 FROM table_27146868_1 WHERE 1999 = "2.1" |
what is the competition played in budva against italy? | CREATE TABLE table_name_56 (competition VARCHAR,town VARCHAR,opponent VARCHAR) | SELECT competition FROM table_name_56 WHERE town = "budva" AND opponent = "italy" |
what is the total number of pick # where nhl team is philadelphia flyers | CREATE TABLE table_1213511_7 (pick__number VARCHAR,nhl_team VARCHAR) | SELECT COUNT(pick__number) FROM table_1213511_7 WHERE nhl_team = "Philadelphia Flyers" |
what is minimum age of patients whose insurance is self pay and primary disease is left colon cancer? | 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 MIN(demographic.age) FROM demographic WHERE demographic.insurance = "Self Pay" AND demographic.diagnosis = "LEFT COLON CANCER" |
How many FA cups for the player with under 5 champs, 0 league cups, and over 3 total? | CREATE TABLE table_69698 ("Name" text,"Championship" real,"League Cup" real,"FA Cup" real,"Total" real) | SELECT SUM("FA Cup") FROM table_69698 WHERE "Championship" < '5' AND "League Cup" = '0' AND "Total" > '3' |
What's the title of the episode with series number 36? | CREATE TABLE table_30338 ("No. in series" real,"Title" text,"Directed by" text,"Story & Storyboards by" text,"Original air date" text,"U.S. viewers (millions)" text) | SELECT "Title" FROM table_30338 WHERE "No. in series" = '36' |
what is average age of patients whose primary disease is hypoxia and age is greater than or equal to 80? | 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 AVG(demographic.age) FROM demographic WHERE demographic.diagnosis = "HYPOXIA" AND demographic.age >= "80" |
What is the Date, when the home team is the NY Rangers? | CREATE TABLE table_name_22 (date VARCHAR,home VARCHAR) | SELECT date FROM table_name_22 WHERE home = "ny rangers" |
What was the score for t9 place for Harold Mcspaden? | CREATE TABLE table_78650 ("Place" text,"Player" text,"Country" text,"Score" text,"To Par" real,"Money ($)" text) | SELECT "Score" FROM table_78650 WHERE "Place" = 't9' AND "Player" = 'harold mcspaden' |
what are the five most frequently ordered procedures for patients that have previously been diagnosed with splenic trauma - with hematoma within 2 months in a year before? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,... | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'splenic trauma - with hematoma' AND DATE... |
what was the last value of a lab test of mpv when they came to the hospital first time for patient 022-163354? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosi... | 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 = '022-163354' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmi... |
What did the away team score when playing North Melbourne? | CREATE TABLE table_77739 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team score" FROM table_77739 WHERE "Home team" = 'north melbourne' |
What's the IS-3 when the KV-1S is 45? | CREATE TABLE table_14222 ("T-35" text,"T-100" text,"KV-1 M1940" text,"KV-1 M1941" text,"KV-1 M1942" text,"KV-1S M1942" text,"KV-85 M1943" text,"IS-2 M1945" text,"IS-3 M1945" text) | SELECT "IS-3 M1945" FROM table_14222 WHERE "KV-1S M1942" = '45' |
when did patient 017-88691 have the last systemicmean to be less than 91.0 since 12/31/2105? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE diagnosis (diagnosi... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '017-88691')) AND vitalperiodic.systemicmean < 91.0 ... |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the average of price , and group by attribute name, could you show in descending by the the average of price please? | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Price DESC |
What is the status of the junior coaster model that opened in 2008? | CREATE TABLE table_55047 ("Name" text,"Model" text,"Park" text,"Opened" text,"Status" text) | SELECT "Status" FROM table_55047 WHERE "Opened" = '2008' AND "Model" = 'junior coaster' |
show me flights from FORT WORTH to SAN JOSE | 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 aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body var... | 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 = 'FORT WORTH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN... |
What is the average number of years associated with 51 games tied and over 1184 total games? | CREATE TABLE table_name_60 (years INTEGER,tied VARCHAR,total_games VARCHAR) | SELECT AVG(years) FROM table_name_60 WHERE tied = 51 AND total_games > 1184 |
Name the score for washington | CREATE TABLE table_15872814_3 (score VARCHAR,team VARCHAR) | SELECT score FROM table_15872814_3 WHERE team = "Washington" |
Top 2500 SO Users from Germany. | CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,RevisionGUID other)CREATE TABLE PendingFlags (Id number... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%deutschland%' OR LOWER(Location) LIKE '%germany%' ORDER BY Reputation DESC LIMIT 2500 |
how many episodes aired originally but not in english ? | CREATE TABLE table_203_758 (id number,"no." number,"dub no." number,"english dubbed title / english subbed title\noriginal japanese title" text,"original air date" text,"english air date" text) | SELECT COUNT("english dubbed title / english subbed title\noriginal japanese title") FROM table_203_758 WHERE NOT "original air date" IS NULL AND "english air date" IS NULL |
Which Surface has an Opponent in the final of don mcneill, and a Year of 1940? | CREATE TABLE table_name_52 (surface VARCHAR,opponent_in_the_final VARCHAR,year VARCHAR) | SELECT surface FROM table_name_52 WHERE opponent_in_the_final = "don mcneill" AND year = 1940 |
give me the number of patients whose admission type is emergency and insurance is medicaid? | 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 WHERE demographic.admission_type = "EMERGENCY" AND demographic.insurance = "Medicaid" |
Name the report for 2003 | CREATE TABLE table_25208 ("Year" text,"Date" text,"Driver" text,"Team" text,"Manufacturer" text,"Laps" text,"Miles (km)" text,"Race time" text,"Average speed (mph)" text,"Report" text) | SELECT "Report" FROM table_25208 WHERE "Year" = '2003' |
What score has 15.0% as the 2012? | CREATE TABLE table_name_87 (score VARCHAR) | SELECT score FROM table_name_87 WHERE 2012 = "15.0%" |
Visualize a bar chart, count and group by nationality from the journalist table, list X in descending order please. | CREATE TABLE journalist (journalist_ID int,Name text,Nationality text,Age text,Years_working int)CREATE TABLE news_report (journalist_ID int,Event_ID int,Work_Type text)CREATE TABLE event (Event_ID int,Date text,Venue text,Name text,Event_Attendance int) | SELECT Nationality, COUNT(Nationality) FROM journalist GROUP BY Nationality ORDER BY Nationality DESC |
Who was the visiting team that played on September 15? | CREATE TABLE table_name_41 (visiting_team VARCHAR,date VARCHAR) | SELECT visiting_team FROM table_name_41 WHERE date = "september 15" |
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 phone_number , display by the x axis in asc. | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_... | SELECT PHONE_NUMBER, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER |
Who was the visiting team in the game against the Dallas Cowboys? | CREATE TABLE table_52747 ("Date" text,"Visiting Team" text,"Final Score" text,"Host Team" text,"Stadium" text) | SELECT "Visiting Team" FROM table_52747 WHERE "Host Team" = 'dallas cowboys' |
What is the average crowd size of the away team who scored 9.6 (60)? | CREATE TABLE table_78030 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT AVG("Crowd") FROM table_78030 WHERE "Away team score" = '9.6 (60)' |
Number of active users last month. | CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,... | SELECT COUNT(*) AS ActiveUsersLastMonth FROM Users WHERE LastAccessDate >= DATEADD(month, -1, (SELECT MAX(LastAccessDate) FROM Users)) |
What is the status of the Cub/John locomotive? | CREATE TABLE table_name_34 (status VARCHAR,name VARCHAR) | SELECT status FROM table_name_34 WHERE name = "the cub/john" |
A bar chart for what are the number of the descriptions of the categories that products with product descriptions that contain the letter t are in? | CREATE TABLE Product_Characteristics (product_id INTEGER,characteristic_id INTEGER,product_characteristic_value VARCHAR(50))CREATE TABLE Ref_Characteristic_Types (characteristic_type_code VARCHAR(15),characteristic_type_description VARCHAR(80))CREATE TABLE Characteristics (characteristic_id INTEGER,characteristic_type_... | SELECT product_category_description, COUNT(product_category_description) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY product_category_description |
For those employees who was hired before 2002-06-21, visualize a bar chart about the distribution of hire_date and the sum of manager_id bin hire_date by weekday, could you sort in asc by the total number? | CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPART... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(MANAGER_ID) |
What is the Staffel B that has Hallescher Fc Chemie as Staffel C? | CREATE TABLE table_43257 ("Season" text,"Staffel A" text,"Staffel B" text,"Staffel C" text,"Staffel D" text,"Staffel E" text) | SELECT "Staffel B" FROM table_43257 WHERE "Staffel C" = 'hallescher fc chemie' |
Which college has 41 picks? | CREATE TABLE table_name_86 (college VARCHAR,pick__number VARCHAR) | SELECT college FROM table_name_86 WHERE pick__number = 41 |
l'inganno innocente premiered in 1701 . what was the previous title released ? | CREATE TABLE table_204_104 (id number,"title" text,"genre" text,"sub\u00addivisions" text,"libretto" text,"premiere date" text,"place,theatre" text,"notes" text) | SELECT "title" FROM table_204_104 WHERE "premiere date" < (SELECT "premiere date" FROM table_204_104 WHERE "title" = "l'inganno innocente") ORDER BY "premiere date" DESC LIMIT 1 |
what are the top four most frequent procedures that patients received within the same hospital visit after they were diagnosed with av block in 2105? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,ob... | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'av bl... |
which Construction is named heng-hai? | CREATE TABLE table_64821 ("Name (pinyin)" text,"Name (Wade Giles)" text,"Characters" text,"Type" text,"Construction" text) | SELECT "Construction" FROM table_64821 WHERE "Name (Wade Giles)" = 'heng-hai' |
What are the home team scores when fremantle is the away team? | CREATE TABLE table_16388506_1 (home_team VARCHAR,away_team VARCHAR) | SELECT home_team AS score FROM table_16388506_1 WHERE away_team = "Fremantle" |
How many of the patients belonging to white russian ethnic origin were married? | 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 WHERE demographic.marital_status = "MARRIED" AND demographic.ethnicity = "WHITE - RUSSIAN" |
What is the Commissioned date of the ship in NVR Page MCM02? | CREATE TABLE table_name_29 (commissioned VARCHAR,nvr_page VARCHAR) | SELECT commissioned FROM table_name_29 WHERE nvr_page = "mcm02" |
Which Ipsos 5/16/09 has an Ifop- La Croix 5/15/09 of 26%? | CREATE TABLE table_name_89 (csa_5_20_09 VARCHAR,ifop__la_croix_5_15_09 VARCHAR) | SELECT csa_5_20_09 FROM table_name_89 WHERE ifop__la_croix_5_15_09 = "26%" |
Find the number of bands. | CREATE TABLE instruments (songid number,bandmateid number,instrument text)CREATE TABLE performance (songid number,bandmate number,stageposition text)CREATE TABLE songs (songid number,title text)CREATE TABLE band (id number,firstname text,lastname text)CREATE TABLE tracklists (albumid number,position number,songid numbe... | SELECT COUNT(*) FROM band |
What is the most recent season for the Prema Powerteam with a Masters of Formula Three series? | CREATE TABLE table_name_34 (season INTEGER,team VARCHAR,series VARCHAR) | SELECT MAX(season) FROM table_name_34 WHERE team = "prema powerteam" AND series = "masters of formula three" |
Which lead had a season of 2009-10? | CREATE TABLE table_name_40 (lead VARCHAR,season VARCHAR) | SELECT lead FROM table_name_40 WHERE season = "2009-10" |
What is the current club with more than 368 apps and a debut year earlier than 1994? | CREATE TABLE table_name_51 (current_club VARCHAR,apps VARCHAR,debut_year VARCHAR) | SELECT current_club FROM table_name_51 WHERE apps > 368 AND debut_year < 1994 |
What is the sum of Long for derrick locke? | CREATE TABLE table_name_30 (long INTEGER,name VARCHAR) | SELECT SUM(long) FROM table_name_30 WHERE name = "derrick locke" |
Which manufacturer has a grid of 6? | CREATE TABLE table_name_25 (manufacturer VARCHAR,grid VARCHAR) | SELECT manufacturer FROM table_name_25 WHERE grid = "6" |
How many attended the game with a Record of 21 22 2? | CREATE TABLE table_11667 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Decision" text,"Attendance" real,"Record" text) | SELECT COUNT("Attendance") FROM table_11667 WHERE "Record" = '21–22–2' |
Which courses are prerequisite to taking GEOSCI 109 ? | CREATE TABLE program_course (program_id int,course_id int,workload int,category varchar)CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits var... | SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT... |
How many opponents were there at the game with 64,087 people in attendance? | CREATE TABLE table_11465521_2 (opponent VARCHAR,attendance VARCHAR) | SELECT COUNT(opponent) FROM table_11465521_2 WHERE attendance = "64,087" |
What is the Place of the Player from Zimbabwe? | CREATE TABLE table_47797 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Place" FROM table_47797 WHERE "Country" = 'zimbabwe' |
How many points did the Club score that has a try bonus of 7 and 52 tries for ? | CREATE TABLE table_name_52 (points_for VARCHAR,tries_for VARCHAR,try_bonus VARCHAR) | SELECT points_for FROM table_name_52 WHERE tries_for = "52" AND try_bonus = "7" |
Name the result for new york 8 | CREATE TABLE table_73139 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Result" FROM table_73139 WHERE "District" = 'New York 8' |
What is the average attendance for matches where the home team was vida? | CREATE TABLE table_name_2 (attendance INTEGER,home VARCHAR) | SELECT AVG(attendance) FROM table_name_2 WHERE home = "vida" |
Name the highest Dist (f) with Odds of 11/4 and a Placing larger than 1? | CREATE TABLE table_name_74 (dist__f_ INTEGER,odds VARCHAR,placing VARCHAR) | SELECT MAX(dist__f_) FROM table_name_74 WHERE odds = "11/4" AND placing > 1 |
Visualize a bar chart about the distribution of date_address_from and the amount of date_address_from bin date_address_from by time. | CREATE TABLE Detention (detention_id INTEGER,detention_type_code VARCHAR(10),teacher_id INTEGER,datetime_detention_start DATETIME,datetime_detention_end DATETIME,detention_summary VARCHAR(255),other_details VARCHAR(255))CREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR(10),incident_type_description VARCHAR(80)... | SELECT date_address_from, COUNT(date_address_from) FROM Student_Addresses ORDER BY monthly_rental DESC |
What is the deficit (-surplus) of France? | CREATE TABLE table_1299 ("Country" text,"Uranium required 2006-08" text,"% of world demand" text,"Indigenous mining production 2006" text,"Deficit (-surplus)" text) | SELECT "Deficit (-surplus)" FROM table_1299 WHERE "Country" = 'France' |
With a gain of 1,380, what is the highest Avg/G? | CREATE TABLE table_name_35 (avg_g INTEGER,gain VARCHAR) | SELECT MAX(avg_g) FROM table_name_35 WHERE gain = 1 OFFSET 380 |
Find the ids and names of stations from which at least 200 trips started, and list y-axis in descending order please. | CREATE TABLE trip (id INTEGER,duration INTEGER,start_date TEXT,start_station_name TEXT,start_station_id INTEGER,end_date TEXT,end_station_name TEXT,end_station_id INTEGER,bike_id INTEGER,subscription_type TEXT,zip_code INTEGER)CREATE TABLE weather (date TEXT,max_temperature_f INTEGER,mean_temperature_f INTEGER,min_temp... | SELECT start_station_name, start_station_id FROM trip ORDER BY start_station_id DESC |
What is the Score for 09-oct-2006? | CREATE TABLE table_42549 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Opponent in the final" text,"Score" text) | SELECT "Score" FROM table_42549 WHERE "Date" = '09-oct-2006' |
How many trains leave from puri? | CREATE TABLE table_12095519_1 (train_name VARCHAR,origin VARCHAR) | SELECT COUNT(train_name) FROM table_12095519_1 WHERE origin = "Puri" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.