instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What will be the time for PERSIAN 102 lectures next semester ? | 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_offering.start_time FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'PERSIAN' AND course... |
Find the name and attribute ID of the attribute definitions with attribute value 0. | CREATE TABLE Attribute_Definitions (attribute_name VARCHAR,attribute_id VARCHAR)CREATE TABLE Catalog_Contents_Additional_Attributes (attribute_id VARCHAR,attribute_value VARCHAR) | SELECT t1.attribute_name, t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id = t2.attribute_id WHERE t2.attribute_value = 0 |
What losing team plays hockey? | CREATE TABLE table_11275 ("Year of award" real,"Date(s)" text,"Sport" text,"Winner" text,"Loser" text) | SELECT "Loser" FROM table_11275 WHERE "Sport" = 'hockey' |
what is the total number of states ? | CREATE TABLE table_203_190 (id number,"name" text,"type" text,"circle" text,"bench" text,"formed" number,"notes" text) | SELECT COUNT("name") FROM table_203_190 |
What is the party for district 27? | CREATE TABLE table_26129220_2 (party VARCHAR,district VARCHAR) | SELECT party FROM table_26129220_2 WHERE district = 27 |
What kind of competition was it at San Siro at 18:30 GMT? | CREATE TABLE table_72064 ("Date" text,"Time" text,"Competition" text,"Opponent" text,"Ground" text,"Score" text) | SELECT "Competition" FROM table_72064 WHERE "Ground" = 'san siro' AND "Time" = '18:30 gmt' |
If the longitude is -97.473110, what is the minimum geo id? | CREATE TABLE table_18600760_7 (geo_id INTEGER,longitude VARCHAR) | SELECT MIN(geo_id) FROM table_18600760_7 WHERE longitude = "-97.473110" |
What is the highest played when there was less than 74 goals against and points 1 of 36 2? | CREATE TABLE table_name_30 (played INTEGER,points_1 VARCHAR,goals_against VARCHAR) | SELECT MAX(played) FROM table_name_30 WHERE points_1 = "36 2" AND goals_against < 74 |
Overall of 62 is what average round? | CREATE TABLE table_name_42 (round INTEGER,overall VARCHAR) | SELECT AVG(round) FROM table_name_42 WHERE overall = 62 |
Which students are advised by Michael Goodrich? Give me their first and last names. | CREATE TABLE activity (actid number,activity_name text)CREATE TABLE participates_in (stuid number,actid number)CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_code text)CREATE TABLE faculty (facid number,lname text,fname text,rank text,sex text,phone number,... | SELECT T2.fname, T2.lname FROM faculty AS T1 JOIN student AS T2 ON T1.facid = T2.advisor WHERE T1.fname = "Michael" AND T1.lname = "Goodrich" |
How many incumbents were first elected in 1984? | CREATE TABLE table_1341453_40 (incumbent VARCHAR,first_elected VARCHAR) | SELECT COUNT(incumbent) FROM table_1341453_40 WHERE first_elected = "1984" |
Who was the partner where the score was 2 6, 3 6 and happened after 2007? | CREATE TABLE table_name_86 (partner VARCHAR,year VARCHAR,score_in_the_final VARCHAR) | SELECT partner FROM table_name_86 WHERE year > 2007 AND score_in_the_final = "2–6, 3–6" |
How did the ship named proletarij finish its service? | CREATE TABLE table_76360 ("Date" text,"Name of ship" text,"Flag" text,"Tonnage" real,"Fate" text) | SELECT "Fate" FROM table_76360 WHERE "Name of ship" = 'proletarij' |
What is Oriol Servia's average Grid on races with more than 43 laps? | CREATE TABLE table_66975 ("Driver" text,"Team" text,"Laps" real,"Time/Retired" text,"Grid" real,"Points" real) | SELECT AVG("Grid") FROM table_66975 WHERE "Laps" > '43' AND "Driver" = 'oriol servia' |
What is the original air date of the episode directed by Paul Marcus? | CREATE TABLE table_19807 ("#" real,"Episode" text,"Writer" text,"Director" text,"Original air date" text,"Viewing figure" text) | SELECT "Original air date" FROM table_19807 WHERE "Director" = 'Paul Marcus' |
Name the title with representative edward h. strobel | CREATE TABLE table_68283 ("Representative" text,"Title" text,"Presentation of credentials" text,"Termination of mission" text,"Appointed by" text) | SELECT "Title" FROM table_68283 WHERE "Representative" = 'edward h. strobel' |
Which city has a resolution that is negotiated exile in Austria? | CREATE TABLE table_18299148_1 (city VARCHAR,resolution VARCHAR) | SELECT city FROM table_18299148_1 WHERE resolution = "Negotiated exile in Austria" |
What is the sum of the gold medals of the total nation, which has more than 19 silver medals? | CREATE TABLE table_name_74 (gold INTEGER,nation VARCHAR,silver VARCHAR) | SELECT SUM(gold) FROM table_name_74 WHERE nation = "total" AND silver > 19 |
what is admission time and procedure icd9 code of subject id 2560? | 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 procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT demographic.admittime, procedures.icd9_code FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560" |
Name the margin of victory for jonas blixt | CREATE TABLE table_14807 ("Date" text,"Tournament" text,"Winning score" text,"Margin of victory" text,"Runner(s)-up" text) | SELECT "Margin of victory" FROM table_14807 WHERE "Runner(s)-up" = 'jonas blixt' |
in the drum module td-5 what are the tom-tom pads | CREATE TABLE table_30829 ("DrumSet Name" text,"Product Line" text,"Years Available" text,"Drum Module" text,"KickDrum Pad" text,"Snare Pad" text,"Tom-Tom Pads" text,"Hi-HatPad/ Controller" text,"CrashandRide CymbalPads" text,"DrumStand (oftenoptional)" text) | SELECT "Tom-Tom Pads" FROM table_30829 WHERE "Drum Module" = 'TD-5' |
When toronto blue jays are the mlb team who are the fscl team? | CREATE TABLE table_22299 ("Player" text,"FCSL Team" text,"Years Played" text,"Year Drafted" real,"Round" text,"MLB Team" text) | SELECT "FCSL Team" FROM table_22299 WHERE "MLB Team" = 'Toronto Blue Jays' |
What was the Forbers rank (all companies) in 2012 for cenovus energy? | CREATE TABLE table_23950611_2 (rank__all__2012 VARCHAR,name VARCHAR) | SELECT rank__all__2012 FROM table_23950611_2 WHERE name = "Cenovus Energy" |
What is the Format of FM 100.5 Licensed to Hope? | CREATE TABLE table_65751 ("Frequency" text,"Call sign" text,"Format" text,"Owner" text,"Notes" text) | SELECT "Format" FROM table_65751 WHERE "Notes" = 'licensed to hope' AND "Frequency" = 'fm 100.5' |
What Colors has a School of sesser high school? | CREATE TABLE table_name_61 (colors VARCHAR,school VARCHAR) | SELECT colors FROM table_name_61 WHERE school = "sesser high school" |
List the service id and details for the events. | CREATE TABLE services (service_id number,service_type_code text)CREATE TABLE participants (participant_id number,participant_type_code text,participant_details text)CREATE TABLE participants_in_events (event_id number,participant_id number)CREATE TABLE events (event_id number,service_id number,event_details text) | SELECT service_id, event_details FROM events |
On which date was the Dodge Dealers Grand Prix GTS class race? | CREATE TABLE table_name_46 (date VARCHAR,race VARCHAR,class VARCHAR) | SELECT date FROM table_name_46 WHERE race = "dodge dealers grand prix" AND class = "gts" |
What are the details of the journey for the episode titled 'Zambezi Express'? | CREATE TABLE table_19954 ("Episode No." text,"Episode Title" text,"UK Broadcast Date" text,"Presenter" text,"Details of Journey" text,"Countries Visited" text) | SELECT "Details of Journey" FROM table_19954 WHERE "Episode Title" = 'Zambezi Express' |
What is the lowest VIII Edition Gold with a Silver of 4? | CREATE TABLE table_name_33 (gold INTEGER,silver VARCHAR,edition VARCHAR) | SELECT MIN(gold) FROM table_name_33 WHERE silver = 4 AND edition = "viii" |
What was the average year that the Nashville Metros did not qualify for the Playoffs, did not qualify for the Open Cup, and had the Regular Season 7th, Southeast? | CREATE TABLE table_66953 ("Year" real,"Division" text,"League" text,"Regular Season" text,"Playoffs" text,"Open Cup" text) | SELECT AVG("Year") FROM table_66953 WHERE "Playoffs" = 'did not qualify' AND "Open Cup" = 'did not qualify' AND "Regular Season" = '7th, southeast' |
if Against is 20 how much is Won? | CREATE TABLE table_15352382_1 (won VARCHAR,against VARCHAR) | SELECT won FROM table_15352382_1 WHERE against = 20 |
What enrity is reponsible for managing the land at the point of origin of the most wildfires? | CREATE TABLE fires (fire_year number,discovery_date number,discovery_doy number,discovery_time text,stat_cause_code number,stat_cause_descr text,cont_date text,cont_doy text,cont_time text,fire_size number,fire_size_class text,latitude number,longitude number,owner_code number,owner_descr text,state text,county text,fi... | SELECT owner_descr FROM fires GROUP BY owner_descr ORDER BY COUNT(*) DESC LIMIT 1 |
what's the premiere with hk viewers of 2.09 million | CREATE TABLE table_151 ("Rank" real,"English title" text,"Chinese title" text,"Average" real,"Peak" real,"Premiere" real,"Finale" real,"HK viewers" text) | SELECT "Premiere" FROM table_151 WHERE "HK viewers" = '2.09 million' |
i would like a flight from NASHVILLE to ST. LOUIS that arrives in ST. LOUIS around 6pm and is nonstop | CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airlin... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (((flight.arrival_time <= 1830 AND flight.arrival_time >= 1730) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. LOUIS' AND flight.... |
Top 50 Biggest Favorite Lists. Shows the top 50 post favoriters, so that you can browse all those favorites. | CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoR... | SELECT Id AS "user_link", (SELECT COUNT(*) FROM Votes WHERE VoteTypeId = 5 AND UserId = Users.Id) AS Favorites FROM Users ORDER BY Favorites DESC LIMIT 50 |
What is the roll of the school in Oakura? | CREATE TABLE table_name_59 (roll INTEGER,area VARCHAR) | SELECT SUM(roll) FROM table_name_59 WHERE area = "oakura" |
Original airdate for #6 with 1.246 viewers? | CREATE TABLE table_name_73 (original_airdate VARCHAR,nightly_rank VARCHAR,viewers__millions_ VARCHAR) | SELECT original_airdate FROM table_name_73 WHERE nightly_rank = "#6" AND viewers__millions_ = 1.246 |
What is the Grade that has Turf 1600m? | CREATE TABLE table_name_27 (grade VARCHAR,priority_entry_rights_to_derby VARCHAR) | SELECT grade FROM table_name_27 WHERE priority_entry_rights_to_derby = "turf 1600m" |
Who was the opponent with a Loss of Leal (1 4)? | CREATE TABLE table_69541 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text) | SELECT "Opponent" FROM table_69541 WHERE "Loss" = 'leal (1–4)' |
how many patients of hispanic, or latino/puerto rican ethnicity are diagnosed with icd9 code 51889? | 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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND diagnoses.icd9_code = "51889" |
anemia ( hb < 8.5 mg / dl ) , thrombocytopenia ( < 100000 / ul ) | CREATE TABLE table_test_23 ("id" int,"previous_mi" bool,"anemia" bool,"left_ventricular_ejection_fraction_lvef" int,"tolerate_gadolinium_contrast_media" bool,"renal_disease" bool,"creatinine_clearance_cl" float,"estimated_glomerular_filtration_rate_egfr" int,"tolerate_magnetic_resonance_imaging" bool,"chronic_inflammat... | SELECT * FROM table_test_23 WHERE anemia = 1 OR hb < 8.5 OR thrombocytopenia = 1 OR platelet_count < 100000 |
What is the average conceded number of the team with a position lower than 8 and more than 2 wins? | CREATE TABLE table_name_68 (conceded INTEGER,position VARCHAR,wins VARCHAR) | SELECT AVG(conceded) FROM table_name_68 WHERE position > 8 AND wins > 2 |
Which opponent was a runner-up on 2 march 1998? | CREATE TABLE table_34467 ("Outcome" text,"Date" text,"Championship" text,"Surface" text,"Opponent in the final" text,"Score in the final" text) | SELECT "Opponent in the final" FROM table_34467 WHERE "Outcome" = 'runner-up' AND "Date" = '2 march 1998' |
List the name of all tracks in the playlists of Movies. | CREATE TABLE sqlite_sequence (name text,seq text)CREATE TABLE customers (id number,first_name text,last_name text,company text,address text,city text,state text,country text,postal_code text,phone text,fax text,email text,support_rep_id number)CREATE TABLE artists (id number,name text)CREATE TABLE employees (id number,... | SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies" |
What is the earliest year the world junior championships has 1500 m notes? | CREATE TABLE table_name_85 (year INTEGER,notes VARCHAR,competition VARCHAR) | SELECT MIN(year) FROM table_name_85 WHERE notes = "1500 m" AND competition = "world junior championships" |
Total weeks of 49,980 attendance? | CREATE TABLE table_40299 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT SUM("Week") FROM table_40299 WHERE "Attendance" = '49,980' |
What is the sum of the points of all teams that had against scores less than 14? | CREATE TABLE table_name_96 (points INTEGER,against INTEGER) | SELECT SUM(points) FROM table_name_96 WHERE against < 14 |
name the top three parties ? | CREATE TABLE table_202_191 (id number,"party" text,"votes" number,"%" number,"seats" number,"+/-" number) | SELECT "party" FROM table_202_191 ORDER BY "votes" DESC LIMIT 3 |
how many patients whose diagnoses short title is bmi less than 19,adult and drug type is additive? | 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_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "BMI less than 19,adult" AND prescriptions.drug_type = "ADDITIVE" |
Give me a bar chart with the headquarters and revenues for manufacturers, sorted by revenue descending. | 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 Headquarter, Revenue FROM Manufacturers ORDER BY Revenue DESC |
What to par has 65 as the score? | CREATE TABLE table_14017 ("Place" text,"Player" text,"Country" text,"Score" real,"To par" text) | SELECT "To par" FROM table_14017 WHERE "Score" = '65' |
What is the agg when team 2 was Cementarnica? | CREATE TABLE table_name_94 (agg VARCHAR,team_2 VARCHAR) | SELECT agg FROM table_name_94 WHERE team_2 = "cementarnica" |
What is the Report with a Score of 3 1, and Set 1 is 19 25? | CREATE TABLE table_name_12 (report VARCHAR,score VARCHAR,set_1 VARCHAR) | SELECT report FROM table_name_12 WHERE score = "3–1" AND set_1 = "19–25" |
Show all the faculty ranks and the number of students advised by each rank. | CREATE TABLE activity (actid number,activity_name text)CREATE TABLE participates_in (stuid number,actid number)CREATE TABLE faculty_participates_in (facid number,actid number)CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_code text)CREATE TABLE faculty (fac... | SELECT T1.rank, COUNT(*) FROM faculty AS T1 JOIN student AS T2 ON T1.facid = T2.advisor GROUP BY T1.rank |
which city had the least amount of surface area ? | CREATE TABLE table_203_731 (id number,"pos." text,"city" text,"population\n(ab)" number,"surface\n(km2)" number,"density\n(ab/km2)" number,"altitude\n(mslm)" number) | SELECT "city" FROM table_203_731 ORDER BY "surface\n(km2)" LIMIT 1 |
What is the sum pick # of the player from round 4? | CREATE TABLE table_41037 ("Round" real,"Pick #" real,"Player" text,"Position" text,"College" text) | SELECT SUM("Pick #") FROM table_41037 WHERE "Round" = '4' |
What venue had a Score of 120-108? | CREATE TABLE table_name_1 (venue VARCHAR,score VARCHAR) | SELECT venue FROM table_name_1 WHERE score = "120-108" |
Compare the number of winery of the wines whose price is bigger than 100, I want to show by the y axis from high to low. | CREATE TABLE appellations (No INTEGER,Appelation TEXT,County TEXT,State TEXT,Area TEXT,isAVA TEXT)CREATE TABLE grapes (ID INTEGER,Grape TEXT,Color TEXT)CREATE TABLE wine (No INTEGER,Grape TEXT,Winery TEXT,Appelation TEXT,State TEXT,Name TEXT,Year INTEGER,Price INTEGER,Score INTEGER,Cases INTEGER,Drink TEXT) | SELECT Winery, COUNT(Winery) FROM wine WHERE Price > 100 GROUP BY Winery ORDER BY COUNT(Winery) DESC |
What was the record at WEC 24? | CREATE TABLE table_4404 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Record" FROM table_4404 WHERE "Event" = 'wec 24' |
What was the time when the score was 0 3? | CREATE TABLE table_name_67 (time VARCHAR,score VARCHAR) | SELECT time FROM table_name_67 WHERE score = "0–3" |
Is 542 available to undergrads ? | CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa float,entered_as varchar,admit_term int,predicted_graduation_semester int,degree varchar,minor varchar,internship varchar)CREATE TABLE instructor (instructor_id int,name varchar,uniqna... | SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 542 |
Name the date for Loss of schilling (5 2) | CREATE TABLE table_53904 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text,"Record" text) | SELECT "Date" FROM table_53904 WHERE "Loss" = 'schilling (5–2)' |
what were the three most frequently diagnosed diagnoses for patients who had been diagnosed with preterm nec 2000-2499g before within the same month, since 5 years ago? | 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 d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions... |
Which tonnage has a Date of 26 september 1940, and a Ship Name of ashantian? | CREATE TABLE table_name_84 (tonnage___grt__ INTEGER,date VARCHAR,ship_name VARCHAR) | SELECT MIN(tonnage___grt__) FROM table_name_84 WHERE date = "26 september 1940" AND ship_name = "ashantian" |
during this year, patient 031-17228 visited an er? | 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(*) > 0 FROM patient WHERE patient.uniquepid = '031-17228' AND patient.hospitaladmitsource = 'emergency department' AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') |
What is the Aspect of Channel 26.5? | CREATE TABLE table_57378 ("Channel" real,"Video" text,"Aspect" text,"PSIP Short Name" text,"Programming" text) | SELECT "Aspect" FROM table_57378 WHERE "Channel" = '26.5' |
What show comes on at 21:00 when Dot Above I comes on at 20:00? | CREATE TABLE table_59072 ("WEEKDAYS" text,"5:55" text,"10:00" text,"15:00" text,"16:00" text,"17:30" text,"18:00" text,"19:15" text,"19:26" text,"20:00" text,"20:30" text,"21:00" text,"21:30" text,"22:00" text,"23:00" text) | SELECT "21:00" FROM table_59072 WHERE "20:00" = 'dot above i' |
What year was the Guernsey record of 2-3-12 set? | CREATE TABLE table_name_75 (year VARCHAR,guernsey_record VARCHAR) | SELECT year FROM table_name_75 WHERE guernsey_record = "2-3-12" |
Show me manager_id by last name in a histogram, could you show MANAGER_ID in descending order please? | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE employees (EMPLO... | SELECT LAST_NAME, MANAGER_ID FROM employees ORDER BY MANAGER_ID DESC |
What is the highest week with a w 33-14 result? | CREATE TABLE table_13300 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real) | SELECT MAX("Week") FROM table_13300 WHERE "Result" = 'w 33-14' |
what are the three most commonly ordered procedures for patients who previously received therapeutic antibacterials - clindamycin within 2 months? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE medication (medicationid number,patientunitstayi... | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'therapeutic antibacterials - clindamycin... |
What is the average enrollment that has hot dogs as the mascot, with a year joined later than 1926? | CREATE TABLE table_79248 ("School" text,"Location" text,"Mascot" text,"# / County" text,"Enrollment" real,"IHSAA Class /Football/Soccer" text,"Year joined" real,"Previous Conference" text,"Year Left" real,"Conference Joined" text) | SELECT AVG("Enrollment") FROM table_79248 WHERE "Mascot" = 'hot dogs' AND "Year joined" > '1926' |
In which city is MUB located? | CREATE TABLE table_name_29 (city VARCHAR,abbr VARCHAR) | SELECT city FROM table_name_29 WHERE abbr = "mub" |
List all the possible ways to get to attractions, together with the number of attractions accessible by these methods in a bar chart. | CREATE TABLE Theme_Parks (Theme_Park_ID INTEGER,Theme_Park_Details VARCHAR(255))CREATE TABLE Locations (Location_ID INTEGER,Location_Name VARCHAR(255),Address VARCHAR(255),Other_Details VARCHAR(255))CREATE TABLE Tourist_Attraction_Features (Tourist_Attraction_ID INTEGER,Feature_ID INTEGER)CREATE TABLE Ref_Hotel_Star_Ra... | SELECT How_to_Get_There, COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There |
what is the number of patients whose primary disease is syncope;telemetry? | 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.diagnosis = "SYNCOPE;TELEMETRY" |
how many patients have received a vaccination nec procedure two times the previous year? | CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'vaccination nec') AND... |
How many 2007s have 0.2 as a 2006, with a 2010 less than 0.1? | CREATE TABLE table_61012 ("2006" real,"2007" real,"2008" real,"2009" real,"2010" real) | SELECT SUM("2007") FROM table_61012 WHERE "2006" = '0.2' AND "2010" < '0.1' |
what is the number of patients whose insurance is private and with hospital stay above 6 days? | 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 WHERE demographic.insurance = "Private" AND demographic.days_stay > "6" |
What is the number of players who have points less than 30 for each position? | CREATE TABLE club_rank (rank number,club_id number,gold number,silver number,bronze number,total number)CREATE TABLE club (club_id number,name text,region text,start_year text)CREATE TABLE player (player_id number,name text,position text,club_id number,apps number,tries number,goals text,points number)CREATE TABLE comp... | SELECT COUNT(*), position FROM player WHERE points < 30 GROUP BY position |
What episode number in the season had 1.05 million U.S. viewers? | CREATE TABLE table_28325 ("Series No." real,"Episode No." real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. viewers (millions)" text) | SELECT MAX("Episode No.") FROM table_28325 WHERE "U.S. viewers (millions)" = '1.05' |
Who performed the song recorded at the Cabin in the Woods Studio with a Time of 3:16? | CREATE TABLE table_66015 ("Title" text,"Time" text,"Writer(s)" text,"Performer(s)" text,"Producer(s)" text,"Recorded at" text) | SELECT "Performer(s)" FROM table_66015 WHERE "Recorded at" = 'the cabin in the woods studio' AND "Time" = '3:16' |
how many methylprednisolone 125 mg inj prescriptions took place until 1 year ago? | 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 cost (costid number,uniquepid text,patienthealthsystemstayid number,... | SELECT COUNT(*) FROM medication WHERE medication.drugname = 'methylprednisolone 125 mg inj' AND DATETIME(medication.drugstarttime) <= DATETIME(CURRENT_TIME(), '-1 year') |
What is the highest Drawn when the lost is 7 and the points are more than 4, and the against is less than 22? | CREATE TABLE table_name_12 (drawn INTEGER,against VARCHAR,lost VARCHAR,points VARCHAR) | SELECT MAX(drawn) FROM table_name_12 WHERE lost = 7 AND points > 4 AND against < 22 |
Which Year To has an Engine of 119.972, and a Chassis smaller than 129.067? | CREATE TABLE table_78991 ("Model" text,"Chassis" real,"Engine" real,"Year From" real,"Year To" real) | SELECT MIN("Year To") FROM table_78991 WHERE "Engine" = '119.972' AND "Chassis" < '129.067' |
What is the highest episode of Wood Flutes segment c? | CREATE TABLE table_5112 ("Series Ep." text,"Episode" real,"Segment A" text,"Segment B" text,"Segment C" text,"Segment D" text) | SELECT MAX("Episode") FROM table_5112 WHERE "Segment C" = 'wood flutes' |
Which Second has a Nation of latvia? | CREATE TABLE table_name_16 (second VARCHAR,nation VARCHAR) | SELECT second FROM table_name_16 WHERE nation = "latvia" |
Name the year for #16 roush racing for poles less than smaller 1.0 | CREATE TABLE table_2187333_1 (year VARCHAR,team_s_ VARCHAR,poles VARCHAR) | SELECT year FROM table_2187333_1 WHERE team_s_ = "#16 Roush Racing" AND poles < 1.0 |
what is drug type and drug dose of drug name amaryl? | 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 prescriptions.drug_type, prescriptions.drug_dose FROM prescriptions WHERE prescriptions.drug = "Amaryl" |
how many schools left in 1960 ? | CREATE TABLE table_203_591 (id number,"high school" text,"join\nyear" text,"from" text,"left" text,"league left to" text) | SELECT COUNT("high school") FROM table_203_591 WHERE "left" = 1960 |
history of human immunodeficiency virus ( hiv ) antibody positive | CREATE TABLE table_train_276 ("id" int,"hbv" bool,"systolic_blood_pressure_sbp" int,"hiv_infection" bool,"hcv" bool,"diastolic_blood_pressure_dbp" int,"body_mass_index_bmi" float,"hypertension" bool,"NOUSE" float) | SELECT * FROM table_train_276 WHERE hiv_infection = 1 |
What is the smallest total score for the Pasodoble style? | CREATE TABLE table_28677723_9 (total INTEGER,style VARCHAR) | SELECT MIN(total) FROM table_28677723_9 WHERE style = "Pasodoble" |
What is the usage for the f136e engline? | CREATE TABLE table_14100 ("Engine" text,"Displacement" text,"Years" text,"Usage" text,"Power" text) | SELECT "Usage" FROM table_14100 WHERE "Engine" = 'f136e' |
What year was Larry combest elected | CREATE TABLE table_1341472_45 (first_elected VARCHAR,incumbent VARCHAR) | SELECT first_elected FROM table_1341472_45 WHERE incumbent = "Larry Combest" |
What was the little league team from Kentucky when the little league team from Illinois was Rock Falls LL Rock Falls? | CREATE TABLE table_18461045_1 (kentucky VARCHAR,illinois VARCHAR) | SELECT kentucky FROM table_18461045_1 WHERE illinois = "Rock Falls LL Rock Falls" |
how many episodes has been directed by Mark K. Samuels ? | CREATE TABLE table_2226817_12 (no_in_series VARCHAR,directed_by VARCHAR) | SELECT COUNT(no_in_series) FROM table_2226817_12 WHERE directed_by = "Mark K. Samuels" |
What is the tournament called for the Big Sky Conference? | CREATE TABLE table_3026 ("Conference" text,"Regular Season Winner" text,"Conference Player of the Year" text,"Conference Tournament" text,"Tournament Venue (City)" text,"Tournament Winner" text) | SELECT "Conference Tournament" FROM table_3026 WHERE "Conference" = 'Big Sky Conference' |
What is the To par when Lanny Wadkins is the player? | CREATE TABLE table_name_66 (to_par VARCHAR,player VARCHAR) | SELECT to_par FROM table_name_66 WHERE player = "lanny wadkins" |
Which Score has a Losing Team of sydney roosters, and a Total of 88? | CREATE TABLE table_7896 ("Total" real,"Score" text,"Winning Team" text,"Losing Team" text,"Venue" text,"Date" text) | SELECT "Score" FROM table_7896 WHERE "Losing Team" = 'sydney roosters' AND "Total" = '88' |
Find the number of students who took some course and got A or C and group by last name in a pie chart. | CREATE TABLE CLASS (CLASS_CODE varchar(5),CRS_CODE varchar(10),CLASS_SECTION varchar(2),CLASS_TIME varchar(20),CLASS_ROOM varchar(8),PROF_NUM int)CREATE TABLE DEPARTMENT (DEPT_CODE varchar(10),DEPT_NAME varchar(30),SCHOOL_CODE varchar(8),EMP_NUM int,DEPT_ADDRESS varchar(20),DEPT_EXTENSION varchar(4))CREATE TABLE EMPLOY... | SELECT STU_LNAME, COUNT(STU_LNAME) FROM STUDENT AS T1 JOIN ENROLL AS T2 ON T1.STU_NUM = T2.STU_NUM WHERE T2.ENROLL_GRADE = 'C' OR T2.ENROLL_GRADE = 'A' GROUP BY STU_LNAME |
A line chart for finding the number of the enrollment date for all the tests that have 'Pass' result, and could you order x axis from high to low order please? | CREATE TABLE Student_Tests_Taken (registration_id INTEGER,date_test_taken DATETIME,test_result VARCHAR(255))CREATE TABLE Courses (course_id INTEGER,author_id INTEGER,subject_id INTEGER,course_name VARCHAR(120),course_description VARCHAR(255))CREATE TABLE Course_Authors_and_Tutors (author_id INTEGER,author_tutor_ATB VAR... | SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Pass" GROUP BY date_of_enrolment ORDER BY date_of_enrolment DESC |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.