instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Questions with a single tag. | CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Tags text,Ans... | SELECT Id AS "post_link", CreationDate, Score FROM Posts WHERE Tags = '<' + LOWER('##TagName:string##') + '>' ORDER BY CreationDate DESC LIMIT 100 |
Which are the 11 -credit upper-level classes ? | 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 varchar,friday varchar,saturday varchar,sunday varchar,has_final_project varchar,has_final_exam varchar,textbook varchar,class_address varch... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 11 AND program_course.category LIKE 'ULCS' |
What team scored 4 points? | CREATE TABLE table_20396_1 (team VARCHAR,points VARCHAR) | SELECT team FROM table_20396_1 WHERE points = "4" |
in the first hospital encounter what is patient 011-31229's age? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 num... | SELECT patient.age FROM patient WHERE patient.uniquepid = '011-31229' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1 |
What driver has 5 as the zan 2? | CREATE TABLE table_name_69 (driver VARCHAR,zan_2 VARCHAR) | SELECT driver FROM table_name_69 WHERE zan_2 = "5" |
When was the last year when Katharine Hepburn won? | CREATE TABLE table_54722 ("Superlative" text,"Actress" text,"Record Set" text,"Year" real,"Notes" text) | SELECT MAX("Year") FROM table_54722 WHERE "Actress" = 'katharine hepburn' |
RUSSIAN 550 has which courses as prerequisites ? | 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 gsi (course_offering_id int,student_id int)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE instructo... | SELECT DISTINCT COURSE_1.department, COURSE_1.name, COURSE_1.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.pre_course_id WHERE COURSE_0.department = 'RUSSIAN' AND COURSE_0.numb... |
Which home team's venue is junction oval? | CREATE TABLE table_name_71 (home_team VARCHAR,venue VARCHAR) | SELECT home_team FROM table_name_71 WHERE venue = "junction oval" |
Name the average attendance with result of won 2-0 on 2 november 2007 | CREATE TABLE table_name_82 (attendance__away_ INTEGER,result VARCHAR,date VARCHAR) | SELECT AVG(attendance__away_) FROM table_name_82 WHERE result = "won 2-0" AND date = "2 november 2007" |
since 1 year ago, patient 19144 has been admitted into the hospital? | 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 diagnoses_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_i... | SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 19144 AND DATETIME(admissions.admittime) >= DATETIME(CURRENT_TIME(), '-1 year') |
How many Wins have Losses larger than 2, and an Against of 73.3? | CREATE TABLE table_name_26 (wins INTEGER,loses VARCHAR,against VARCHAR) | SELECT SUM(wins) FROM table_name_26 WHERE loses > 2 AND against = "73.3" |
When was the station WLS-TV owned since? | CREATE TABLE table_2597 ("Market Rank & City of license /Market" text,"Station" text,"Channel TV / DT" text,"Owned since" real,"Affiliation" text) | SELECT "Owned since" FROM table_2597 WHERE "Station" = 'WLS-TV' |
When did Geelong play as the home team? | CREATE TABLE table_name_89 (date VARCHAR,home_team VARCHAR) | SELECT date FROM table_name_89 WHERE home_team = "geelong" |
le jour du mois o le plus grand nombre de question ont t pos es en octobre. | CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number... | SELECT Name FROM PostTypes |
i'd like to have some information on a ticket from DENVER to ATLANTA with a stop in PITTSBURGH | CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,fare_airline text,restriction_code text,one_direction_cost int,round_trip_cost int,round_trip_required varchar)CREATE TABLE city (city_code varchar... | 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 = 'ATLANTA' AND CITY_2.ci... |
Who was the outgoing manager who departed due to fc energie cottbus purchased rights? | CREATE TABLE table_47901 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Replaced by" text,"Date of appointment" text,"Position in table" text) | SELECT "Outgoing manager" FROM table_47901 WHERE "Manner of departure" = 'fc energie cottbus purchased rights' |
For each company, return the company name and the name of the building its office is located in. | CREATE TABLE companies (id number,name text,headquarters text,industry text,sales_billion number,profits_billion number,assets_billion number,market_value_billion text)CREATE TABLE office_locations (building_id number,company_id number,move_in_year number)CREATE TABLE buildings (id number,name text,city text,height num... | SELECT T3.name, T2.name FROM office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN companies AS T3 ON T1.company_id = T3.id |
What is the medal named fatuma roba category:articles with hcards for? | CREATE TABLE table_33801 ("Medal" text,"Name" text,"Games" text,"Sport" text,"Event" text) | SELECT "Medal" FROM table_33801 WHERE "Name" = 'fatuma roba category:articles with hcards' |
On what date does Essendon play as the away team? | CREATE TABLE table_74677 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Date" FROM table_74677 WHERE "Away team" = 'essendon' |
provide the number of patients whose death status is 0 and procedure long title is insertion of one vascular stent? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Insertion of one vascular stent" |
Who is the pick from the Purdue College? | CREATE TABLE table_name_90 (pick VARCHAR,college VARCHAR) | SELECT pick FROM table_name_90 WHERE college = "purdue" |
Name the party for bensalem | CREATE TABLE table_23332 ("District" real,"Representative" text,"Party" text,"Residence" text,"Counties represented" text,"Term ends" real,"First Elected" real) | SELECT "Party" FROM table_23332 WHERE "Residence" = 'Bensalem' |
Draw a bar chart about the distribution of meter_600 and meter_100 , and could you display x axis in descending order? | 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 record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Openin... | SELECT meter_600, meter_100 FROM swimmer ORDER BY meter_600 DESC |
What is the Away Team score of North Melbourne? | CREATE TABLE table_name_24 (away_team VARCHAR) | SELECT away_team AS score FROM table_name_24 WHERE away_team = "north melbourne" |
What was the score of the game played at Harmon Stadium on February 24? | CREATE TABLE table_42169 ("Date" text,"Opponent" text,"Score" text,"Site/Stadium" text,"Record" text) | SELECT "Score" FROM table_42169 WHERE "Site/Stadium" = 'harmon stadium' AND "Date" = 'february 24' |
What is the lowest score for a year before 2008 and had 3rd place? | CREATE TABLE table_45320 ("Year" real,"Program Title" text,"Placement" text,"Score" real,"Class" text) | SELECT MIN("Score") FROM table_45320 WHERE "Year" < '2008' AND "Placement" = '3rd' |
geriatric depression scale ( gds ) ( 62 ) score < 6 | CREATE TABLE table_train_111 ("id" int,"mini_mental_state_examination_mmse" int,"liver_disease" bool,"geriatric_depression_scale_gds" int,"rosen_modified_hachinski_ischemic_score" int,"plasma_creatinine" float,"NOUSE" float) | SELECT * FROM table_train_111 WHERE geriatric_depression_scale_gds < 6 |
What is the summary of the algorithm with a theta i of 0.43? | CREATE TABLE table_56059 ("\\theta_i" real,"Simulated datasets (step 2)" text,"Summary statistic \\omega_{S,i} (step 3)" real,"Distance \\rho(\\omega_{S,i},\\omega_E) (step 4)" real,"Outcome (step 4)" text) | SELECT "Summary statistic \\omega_{S,i} (step 3)" FROM table_56059 WHERE "\\theta_i" = '0.43' |
name a horse that placed after hello and was owned by more than one person . | CREATE TABLE table_204_13 (id number,"finished" text,"post" number,"horse" text,"jockey" text,"trainer" text,"owner" text,"time / behind" text) | SELECT "horse" FROM table_204_13 WHERE "finished" > (SELECT "finished" FROM table_204_13 WHERE "horse" = 'hello') AND "owner" > 1 ORDER BY "finished" LIMIT 1 |
How many terms did the governor that left office on August 4, 1825 serve? | CREATE TABLE table_name_46 (terms VARCHAR,left_office VARCHAR) | SELECT terms FROM table_name_46 WHERE left_office = "august 4, 1825" |
Which visitor has detroit as the home, and february 24 as the date? | CREATE TABLE table_6607 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text) | SELECT "Visitor" FROM table_6607 WHERE "Home" = 'detroit' AND "Date" = 'february 24' |
Give me a histogram to show the date and the amount for all the payments processed with Visa, and show Date_Payment_Made in ascending order please. | CREATE TABLE Customers (Customer_ID INTEGER,Customer_Details VARCHAR(255))CREATE TABLE Payments (Payment_ID INTEGER,Settlement_ID INTEGER,Payment_Method_Code VARCHAR(255),Date_Payment_Made DATE,Amount_Payment INTEGER)CREATE TABLE Settlements (Settlement_ID INTEGER,Claim_ID INTEGER,Date_Claim_Made DATE,Date_Claim_Settle... | SELECT Date_Payment_Made, Amount_Payment FROM Payments WHERE Payment_Method_Code = 'Visa' ORDER BY Date_Payment_Made |
Name the vacator for resigned february 26, 1836 because of ill health | CREATE TABLE table_25103 ("District" text,"Vacator" text,"Reason for change" text,"Successor" text,"Date successor seated" text) | SELECT "Vacator" FROM table_25103 WHERE "Reason for change" = 'Resigned February 26, 1836 because of ill health' |
hcv infection, active | CREATE TABLE table_train_57 ("id" int,"bleeding" int,"in_another_study" bool,"hiv_infection" bool,"hepatitis_c_infection" bool,"receiving_vasopressor" bool,"hypotension" bool,"NOUSE" float) | SELECT * FROM table_train_57 WHERE hepatitis_c_infection = 1 |
What tournament has a 2010 of 1r, and a 2008 of 1r? | CREATE TABLE table_name_4 (tournament VARCHAR) | SELECT tournament FROM table_name_4 WHERE 2010 = "1r" AND 2008 = "1r" |
What was the outcome of the game when the partner is Rafael Osuna? | CREATE TABLE table_2215159_2 (outcome VARCHAR,partner VARCHAR) | SELECT outcome FROM table_2215159_2 WHERE partner = "Rafael Osuna" |
Who wrote the episodes that were viewed by 2.12 million viewers? | CREATE TABLE table_11111116_8 (written_by VARCHAR,us_viewers__million_ VARCHAR) | SELECT written_by FROM table_11111116_8 WHERE us_viewers__million_ = "2.12" |
what is maximum age of patients whose gender is m and ethnicity is hispanic/latino - puerto rican? | 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 MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" |
How many elected catagories are there for the district with Saxby Chambliss as the incumbent? | CREATE TABLE table_28585 ("District" text,"Incumbent" text,"Party" text,"Elected" real,"Status" text,"Result" text) | SELECT COUNT("Elected") FROM table_28585 WHERE "Incumbent" = 'Saxby Chambliss' |
Show weight from each name | CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real)CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real) | SELECT Name, Weight FROM people |
What's the sum of Quantity for the Class of 1928 of CI-30? | CREATE TABLE table_name_1 (quantity INTEGER,class_from_1928 VARCHAR) | SELECT SUM(quantity) FROM table_name_1 WHERE class_from_1928 = "ci-30" |
What is the Selsdon for the 17:19 Coombe Road? | CREATE TABLE table_name_14 (selsdon VARCHAR,coombe_road VARCHAR) | SELECT selsdon FROM table_name_14 WHERE coombe_road = "17:19" |
What is the release Date for the Region in New Zealand ? | CREATE TABLE table_39389 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalogue" text) | SELECT "Date" FROM table_39389 WHERE "Region" = 'new zealand' |
How many drivers have 1942 points? | CREATE TABLE table_25750 ("Position" real,"Driver" text,"Points" real,"Starts" real,"Wins" real,"Top 5s" real,"Top 10s" real,"Winnings ($)" real) | SELECT COUNT("Driver") FROM table_25750 WHERE "Points" = '1942' |
daniel martin and joost posthuma both withdrew from the race because of what reason ? | CREATE TABLE table_204_530 (id number,"type" text,"stage" number,"cyclist" text,"team" text,"reason" text) | SELECT "reason" FROM table_204_530 WHERE "cyclist" = 'daniel martin' |
Where did Carlton play as the home team? | CREATE TABLE table_52552 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Venue" FROM table_52552 WHERE "Home team" = 'carlton' |
Get My Reputation and Location Data. | CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE Id = 1042848 |
What is the 2013 BAFA adult flag division in Aylesbury? | CREATE TABLE table_name_95 (location VARCHAR) | SELECT 2013 AS _bafa_adult_flag_division FROM table_name_95 WHERE location = "aylesbury" |
Name the series ^ when the CPU clock is 1500 and the model is t-52r | CREATE TABLE table_55084 ("Series ^" text,"Model" text,"CPU clock (MHz)" text,"CPU cores" real,"TDP (W)" text,"L2 cache (KiB)" text,"Radeon cores" real,"DDR3 speed" real) | SELECT "Series ^" FROM table_55084 WHERE "CPU clock ( MHz )" = '1500' AND "Model" = 't-52r' |
What is the I/O bus entry for the processor with a release price of $657? | CREATE TABLE table_66142 ("Model number" text,"sSpec number" text,"Cores" text,"Frequency" text,"Turbo" text,"L2 cache" text,"L3 cache" text,"GPU model" text,"GPU frequency" text,"Socket" text,"I/O bus" text,"Release date" text,"Part number(s)" text,"Release price (USD)" text) | SELECT "I/O bus" FROM table_66142 WHERE "Release price ( USD )" = '$657' |
Who did the Indians play on April 23? | CREATE TABLE table_name_89 (opponent VARCHAR,date VARCHAR) | SELECT opponent FROM table_name_89 WHERE date = "april 23" |
What is the average number of bronze medals for total of all nations? | CREATE TABLE table_76045 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT AVG("Bronze") FROM table_76045 WHERE "Nation" = 'total' |
what is the number of patients whose admission type is elective and item id is 51265? | 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.admission_type = "ELECTIVE" AND lab.itemid = "51265" |
What is the least total? | CREATE TABLE table_30711 ("Sl. No" real,"Category wise" text,"Single lane" real,"Intermediate lane" real,"Double lane" real,"Multi lane" real,"Total" real) | SELECT MIN("Total") FROM table_30711 |
Name the average bronze for total less than 1 | CREATE TABLE table_74518 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT AVG("Bronze") FROM table_74518 WHERE "Total" < '1' |
Which vocal type has the band mate with first name 'Solveig' played the most? | CREATE TABLE vocals (bandmate VARCHAR)CREATE TABLE band (id VARCHAR) | SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = "Solveig" GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1 |
Which title is in Portuguese? | CREATE TABLE table_name_28 (title VARCHAR,language VARCHAR) | SELECT title FROM table_name_28 WHERE language = "portuguese" |
What percentage of voters chose McCain in the county where 1.1% of voters voted third party? | CREATE TABLE table_23640 ("County" text,"Obama %" text,"Obama #" real,"McCain %" text,"McCain #" real,"Others %" text,"Others #" real) | SELECT "McCain %" FROM table_23640 WHERE "Others %" = '1.1%' |
What Branding does WRKO calls use? | CREATE TABLE table_10333757_1 (branding VARCHAR,calls VARCHAR) | SELECT branding FROM table_10333757_1 WHERE calls = "WRKO" |
count the number of patients that are prescribed 0.9% sodium chloride (mini bag plus) during the same hospital encounter after having been diagnosed with hy kid nos w cr kid i-iv. | CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE p... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title =... |
How may lecturers are there in the case when there are more than 8 assistant professors, fewer than 35 associate professors, more than 14 professors and total of more than 81? | CREATE TABLE table_name_71 (lecturers VARCHAR,total VARCHAR,associate_professors VARCHAR,assistant_professors VARCHAR,professors VARCHAR) | SELECT COUNT(lecturers) FROM table_name_71 WHERE assistant_professors > 8 AND professors > 14 AND associate_professors < 35 AND total > 81 |
what time was the last time patient 015-59552 had the maximum systemicsystolic value on this month/22? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,cultur... | 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 = '015-59552')) AND NOT vitalperiodic.systemicsystolic... |
What was his average finish when his average start was 27.7? | CREATE TABLE table_2169966_2 (avg_finish VARCHAR,avg_start VARCHAR) | SELECT avg_finish FROM table_2169966_2 WHERE avg_start = "27.7" |
what is the number of patients whose days of hospital stay is greater than 43 and drug name is bag? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "43" AND prescriptions.drug = "Bag" |
what series was on may 14 | CREATE TABLE table_34831 ("Game" real,"Date" text,"Opponent" text,"Score" text,"Series" text) | SELECT "Series" FROM table_34831 WHERE "Date" = 'may 14' |
What september has 10.35 in November? | CREATE TABLE table_1383 ("Year" real,"January" text,"February" text,"March" text,"April" text,"May" text,"June" text,"July" text,"August" text,"September" text,"October" text,"November" text,"December" text,"Annual Additions(in millions)" text,"Average Monthly Additions(in millions)" text) | SELECT "September" FROM table_1383 WHERE "November" = '10.35' |
Name the most copa del rey for karim benzema | CREATE TABLE table_25565 ("R" real,"Player" text,"Position" text,"League" real,"Champions League" real,"Copa del Rey" real,"Total" real) | SELECT MAX("Copa del Rey") FROM table_25565 WHERE "Player" = 'Karim Benzema' |
what was the first value of the arterial bp [diastolic] of patient 23070 on 12/04/this year. | CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE outputevents (row_id... | 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 = 23070)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ... |
when was the last time patient 015-58787 had sodium chloride 0.9% 1000 ml pb prescribed this month? | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dos... | SELECT medication.drugstarttime FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-58787')) AND medication.drugname = 'sodium chloride 0.9% 1... |
Which drives drove a lexus, made all rounds, had a tyre of B and was on the team of petronas toyota team tom's? | CREATE TABLE table_48884 ("Team" text,"Make" text,"Drivers" text,"Tyre" text,"Rounds" text) | SELECT "Drivers" FROM table_48884 WHERE "Rounds" = 'all' AND "Make" = 'lexus' AND "Tyre" = 'b' AND "Team" = 'petronas toyota team tom''s' |
For those employees who did not have any job in the past, show me about the distribution of job_id and the average of employee_id , and group by attribute job_id in a bar chart. | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID |
Who has 187kg and a Snatch of Clean & Jerk? | CREATE TABLE table_65876 ("World record" text,"Snatch" text,"Andrei Rybakou (BLR)" text,"187kg" text,"Chiang Mai,Thailand" text) | SELECT "187kg" FROM table_65876 WHERE "Snatch" = 'clean & jerk' |
how many more medals did india earn compared to pakistan ? | CREATE TABLE table_203_165 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT (SELECT "total" FROM table_203_165 WHERE "nation" = 'india') - (SELECT "total" FROM table_203_165 WHERE "nation" = 'pakistan') |
i would like an AA flight from TORONTO to SAN DIEGO with a stopover in DENVER please | 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 food_service (meal_code tex... | 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 = 'SAN DIEGO' AND CITY_2... |
What is the season with a Skip of Eve Muirhead and a third of Kerry Barr? | CREATE TABLE table_50534 ("Season" text,"Skip" text,"Third" text,"Second" text,"Lead" text) | SELECT "Season" FROM table_50534 WHERE "Skip" = 'eve muirhead' AND "Third" = 'kerry barr' |
WHAT IS THE SUM OF PICK WITH AN OVERALL LARGER THAN 250, AND FOR FLORIDA COLLEGE? | CREATE TABLE table_name_62 (pick INTEGER,overall VARCHAR,college VARCHAR) | SELECT SUM(pick) FROM table_name_62 WHERE overall > 250 AND college = "florida" |
What candidate is a member of the Republican party? | CREATE TABLE table_18298 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Candidates" FROM table_18298 WHERE "Party" = 'Republican' |
What is the venue when the away team scored 15.9 (99)? | CREATE TABLE table_52489 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Venue" FROM table_52489 WHERE "Away team score" = '15.9 (99)' |
What is Channel 4 and Channel 4+1's rating in E4 and E4+1 when the ratings were 780,200? | CREATE TABLE table_41882 ("Episode number" real,"Title" text,"Original airing on Channel 4" text,"Time of airing on Channel 4" text,"Original airing on E4" text,"Time of airing on E4" text,"Position in Channel 4 and Channel 4+1's ratings" text,"Position in E4 and E4+1's ratings" text) | SELECT "Position in Channel 4 and Channel 4+1's ratings" FROM table_41882 WHERE "Position in E4 and E4+1's ratings" = '780,200' |
Bad questions, based on vote score and closure and the like_title. | CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE Users (Id number,Reputation number... | SELECT Score, CASE WHEN NOT ClosedDate IS NULL THEN 'N' ELSE 'Er' END AS "closed?", Title AS "post_link" FROM Posts WHERE PostTypeId = 1 AND (NOT ClosedDate IS NULL OR Score < -3) ORDER BY Score LIMIT 500 |
What are the names of the heads who are born outside the California state? | CREATE TABLE head (name VARCHAR,born_state VARCHAR) | SELECT name FROM head WHERE born_state <> 'California' |
what is the yearly average dose of enteral tube intake: orogastric oral given to patient 015-94542 until 1967 days ago? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,g... | SELECT AVG(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 = '015-94542')) AND intakeoutput.celllabel = 'enter... |
provide the number of patients whose diagnoses long title is alkalosis and lab test abnormal status is abnormal? | 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 text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | 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 = "Alkalosis" AND lab.flag = "abnormal" |
SAN FRANCISCO to DENVER | CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE equipment_sequence (aircraft_code_s... | 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 = 'SAN FRANCISCO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... |
Which Altitude (mslm) is the highest one that has an Area (km 2) smaller than 13.01, and a Population of 74536, and a Density (inhabitants/km 2) larger than 5869? | CREATE TABLE table_name_20 (altitude__mslm_ INTEGER,density__inhabitants_km_2__ VARCHAR,area__km_2__ VARCHAR,population VARCHAR) | SELECT MAX(altitude__mslm_) FROM table_name_20 WHERE area__km_2__ < 13.01 AND population = 74536 AND density__inhabitants_km_2__ > 5869 |
What was the Against when the Opposing Team was sheffield wednesday? | CREATE TABLE table_name_24 (against VARCHAR,opposing_team VARCHAR) | SELECT against FROM table_name_24 WHERE opposing_team = "sheffield wednesday" |
Which Driver has a Grid smaller than 17, and Points larger than 0, and a Lapse of 87, and a Time/Retired of 1:48:11.023? | CREATE TABLE table_65671 ("Driver" text,"Team" text,"Laps" real,"Time/Retired" text,"Grid" real,"Points" real) | SELECT "Driver" FROM table_65671 WHERE "Grid" < '17' AND "Points" > '0' AND "Laps" = '87' AND "Time/Retired" = '1:48:11.023' |
give me the total doses of etoh grams/hour given to patient 27362. | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE procedures_icd (row_id number,subject_id numb... | SELECT SUM(inputevents_cv.amount) 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 = 27362)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... |
How many losses for the team with less than 4 wins, more than 0 byes and 2510 against? | CREATE TABLE table_62067 ("Mininera DFL" text,"Wins" real,"Byes" real,"Losses" real,"Draws" real,"Against" real) | SELECT AVG("Losses") FROM table_62067 WHERE "Wins" < '4' AND "Against" = '2510' AND "Byes" > '0' |
Show the names of climbers and the heights of mountains they climb by a bar chart, show from low to high by the Y-axis please. | CREATE TABLE mountain (Mountain_ID int,Name text,Height real,Prominence real,Range text,Country text)CREATE TABLE climber (Climber_ID int,Name text,Country text,Time text,Points real,Mountain_ID int) | SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID ORDER BY T2.Height |
Name the district for others being 18.3 | CREATE TABLE table_23214055_2 (district VARCHAR,others VARCHAR) | SELECT district FROM table_23214055_2 WHERE others = "18.3" |
When the team is yale what is max amount of times they placed fourth? | CREATE TABLE table_1313 ("Team" text,"Titles" real,"Runner-up" real,"Third place" real,"Fourth place" real,"Years participated" real) | SELECT MAX("Fourth place") FROM table_1313 WHERE "Team" = 'Yale' |
What is the average position of pilot petr krejcirik, who has less than 11 points? | CREATE TABLE table_49992 ("Position" real,"Pilot" text,"Country" text,"Glider" text,"Points" real) | SELECT AVG("Position") FROM table_49992 WHERE "Points" < '11' AND "Pilot" = 'petr krejcirik' |
Who is the director for the witman boys? | CREATE TABLE table_1151 ("Year (Ceremony)" text,"English title" text,"Hungarian title" text,"Director" text,"Result" text) | SELECT "Director" FROM table_1151 WHERE "English title" = 'The Witman Boys' |
A bar chart for showing the number of the countries that have managers of age above 50 or below 46, could you order x-axis from low to high order? | CREATE TABLE train (Train_ID int,Train_Num text,Name text,From text,Arrival text,Railway_ID int)CREATE TABLE railway_manage (Railway_ID int,Manager_ID int,From_Year text)CREATE TABLE railway (Railway_ID int,Railway text,Builder text,Built text,Wheels text,Location text,ObjectNumber text)CREATE TABLE manager (Manager_ID... | SELECT Country, COUNT(Country) FROM manager WHERE Age > 50 OR Age < 46 GROUP BY Country ORDER BY Country |
What were the years active of the player from New Zealand with more than 11 caps? | CREATE TABLE table_14622 ("Player" text,"Country" text,"Caps" real,"Goals" text,"Years Active" text) | SELECT "Years Active" FROM table_14622 WHERE "Caps" > '11' AND "Country" = 'new zealand' |
How many distinct students are enrolled in courses? | CREATE TABLE students (student_id number,date_of_registration time,date_of_latest_logon time,login_name text,password text,personal_name text,middle_name text,family_name text)CREATE TABLE subjects (subject_id number,subject_name text)CREATE TABLE student_course_enrolment (registration_id number,student_id number,cours... | SELECT COUNT(DISTINCT student_id) FROM student_course_enrolment |
What's the exponent field that has 255 exp and value of + ? | CREATE TABLE table_38686 ("Type" text,"Actual Exponent" text,"Exp (biased)" text,"Exponent field" text,"Significand (fraction field)" text,"Value" text) | SELECT "Exponent field" FROM table_38686 WHERE "Exp (biased)" = '255' AND "Value" = '+∞' |
may i see all the flights from CLEVELAND to DALLAS | CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)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 compartment_class (compartment varchar,class_ty... | 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 = 'CLEVELAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALL... |
Stack bar chart of team_id vs ACC_Home based on all home, and could you display Y in asc order please? | CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Perce... | SELECT All_Home, Team_ID FROM basketball_match GROUP BY ACC_Home, All_Home ORDER BY Team_ID |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.