instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is Anna Rogowska's average result? | CREATE TABLE table_name_7 (result INTEGER,name VARCHAR) | SELECT AVG(result) FROM table_name_7 WHERE name = "anna rogowska" |
What is the position of john charles? | CREATE TABLE table_441 ("Overall Pick #" real,"AFL Team" text,"Player" text,"Position" text,"College" text) | SELECT "Position" FROM table_441 WHERE "Player" = 'John Charles' |
Which is less demanding out of EECS 545 and EECS 562 ? | CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE course_tags_count (course_id int,clear_grading int,pop_quiz int,group_projects int,inspirational int,long_lectures int,extra_credit int,few_tests int,good_feedback int,tough_tests int,heavy_papers int,cares_for_students int,heavy_assignments ... | SELECT DISTINCT course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (course.number = 545 OR course.number = 562) AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_course AS PROGRAM_COURSEalias1 INNER JOIN course AS COURSEalias1 ON ... |
when was the last time patient 035-2057 had intake on the first icu visit? | 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 intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-2057') AND NOT patient.unitdischargetime IS NULL ... |
Are upper-level classes all 12 credits ? | CREATE TABLE ta (campus_job_id int,student_id int,location varchar)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 ... | SELECT COUNT(*) = 0 FROM course, program_course WHERE course.credits <> 12 AND course.department = 'EECS' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id |
How many pages does the story h 87112 have? | CREATE TABLE table_4635 ("Date" text,"Pages" text,"Hero" text,"Story" text,"Story code" text) | SELECT "Pages" FROM table_4635 WHERE "Story code" = 'h 87112' |
Next semester , which classes are Dr. Zehra Igsiz teaching ? | CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement varchar,enforced_requirement varchar,description varchar,num_semesters int,num_enrolled int,has_discussion varchar,has_lab varchar,has_projects varchar,has_exams varchar,num_reviews int,clarity_score i... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Zehra Igsiz%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offer... |
Who were the scorers in the game against neuch tel xamax played on 10 December 1985? | CREATE TABLE table_name_64 (scorers VARCHAR,opponent VARCHAR,date VARCHAR) | SELECT scorers FROM table_name_64 WHERE opponent = "neuchâtel xamax" AND date = "10 december 1985" |
Who has published both in ICML and ACL ? | CREATE TABLE writes (paperid int,authorid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE ... | SELECT DISTINCT writes.authorid FROM paper, venue, writes WHERE venue.venueid = paper.venueid AND venue.venuename IN ('ICML', 'ACL') AND writes.paperid = paper.paperid GROUP BY writes.authorid HAVING COUNT(DISTINCT venue.venueid) = 2 |
What position is the player whose first year is 2014 | CREATE TABLE table_20173 ("Club" text,"Position in 2013" text,"First season" real,"First season of current spell" real,"Number of seasons in Superettan" real,"Number of seasons in second tier" text) | SELECT "Position in 2013" FROM table_20173 WHERE "First season" = '2014' |
Name the most game for us airways center 16,470 | CREATE TABLE table_29958 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT MIN("Game") FROM table_29958 WHERE "Location Attendance" = 'US Airways Center 16,470' |
What is the ERP W number where the frequency is smaller than 91.1? | CREATE TABLE table_57470 ("Call sign" text,"Frequency MHz" real,"City of license" text,"ERP W" real,"Class" text,"FCC info" text) | SELECT MAX("ERP W") FROM table_57470 WHERE "Frequency MHz" < '91.1' |
In what year is the notes distance 1.83m? | CREATE TABLE table_name_82 (year VARCHAR,notes VARCHAR) | SELECT year FROM table_name_82 WHERE notes = "1.83m" |
What is the lowest run 2 of the athlete with a run 1 of 52.44 and a run 3 less than 52.35? | CREATE TABLE table_name_90 (run_2 INTEGER,run_1 VARCHAR,run_3 VARCHAR) | SELECT MIN(run_2) FROM table_name_90 WHERE run_1 = 52.44 AND run_3 < 52.35 |
Which Date has a Catalog of vcrt 106? | CREATE TABLE table_7380 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Date" FROM table_7380 WHERE "Catalog" = 'vcrt 106' |
Which model has a top speed of 231km/h (143mph)? | CREATE TABLE table_61049 ("Model" text,"Years" text,"Engine" text,"Power" text,"0\u2013100km/h (62mph)" text,"Top Speed" text) | SELECT "Model" FROM table_61049 WHERE "Top Speed" = '231km/h (143mph)' |
platelet count < 100000 / mm3 | CREATE TABLE table_test_7 ("id" int,"bleeding" int,"left_ventricular_ejection_fraction_lvef" int,"intra_aortic_balloon_pump_iabp" bool,"systolic_blood_pressure_sbp" int,"dialysis" bool,"intravenous_pressors" bool,"non_infarct_related_vessel" bool,"heart_disease" bool,"body_weight" float,"creatinine_clearance_cl" float,... | SELECT * FROM table_test_7 WHERE platelet_count < 100000 |
Activity tab for top users. | CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate... | SELECT Id AS "user_link", Reputation, activity = 'site://users/' + CAST(Id AS TEXT) + '?tab=topactivity|Activity', profile = 'site://users/' + CAST(Id AS TEXT) + '?tab=profile|Profile' FROM Users ORDER BY Reputation DESC LIMIT 200 |
What is the average Bronze, when Rank is greater than 6, when Nation is Italy (ITA), and when Total is less than 1? | CREATE TABLE table_name_78 (bronze INTEGER,total VARCHAR,rank VARCHAR,nation VARCHAR) | SELECT AVG(bronze) FROM table_name_78 WHERE rank > 6 AND nation = "italy (ita)" AND total < 1 |
Which city does the student whose last name is 'Kim' live in? | CREATE TABLE allergy_type (allergy text,allergytype text)CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_code text)CREATE TABLE has_allergy (stuid number,allergy text) | SELECT city_code FROM student WHERE lname = "Kim" |
Bar graph to show the number of booking end date from different booking end date, could you list in desc by the how many booking end date? | CREATE TABLE Apartment_Facilities (apt_id INTEGER,facility_code CHAR(15))CREATE TABLE Guests (guest_id INTEGER,gender_code CHAR(1),guest_first_name VARCHAR(80),guest_last_name VARCHAR(80),date_of_birth DATETIME)CREATE TABLE View_Unit_Status (apt_id INTEGER,apt_booking_id INTEGER,status_date DATETIME,available_yn BIT)CR... | SELECT booking_end_date, COUNT(booking_end_date) FROM Apartment_Bookings ORDER BY COUNT(booking_end_date) DESC |
What is the maximum download speed for the Internet premium 3G plan? | CREATE TABLE table_15240 ("Company" text,"Plan name" text,"Technology" text,"Maximum download speed/ kbps" text,"Data limit/ GB" text,"Monthly price incl. VAT/ CZK" text) | SELECT "Maximum download speed/ kbps" FROM table_15240 WHERE "Technology" = '3g' AND "Plan name" = 'internet premium' |
Which Competition has a Venue of hong kong? | CREATE TABLE table_name_53 (competition VARCHAR,venue VARCHAR) | SELECT competition FROM table_name_53 WHERE venue = "hong kong" |
What is Player, when Score is '68-67-75-70=280'? | CREATE TABLE table_name_71 (player VARCHAR,score VARCHAR) | SELECT player FROM table_name_71 WHERE score = 68 - 67 - 75 - 70 = 280 |
What are the names of all tracks that belong to the Rock genre and whose media type is MPEG? | CREATE TABLE invoices (id number,customer_id number,invoice_date time,billing_address text,billing_city text,billing_state text,billing_country text,billing_postal_code text,total number)CREATE TABLE artists (id number,name text)CREATE TABLE invoice_lines (id number,invoice_id number,track_id number,unit_price number,q... | SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file" |
What was the poll source when Democrat Carl Levin had 54% and the lead margin was 28? | CREATE TABLE table_21056 ("Poll Source" text,"Dates administered" text,"Democrat: Carl Levin" text,"Republican: Jack Hoogendyk" text,"Lead Margin" real) | SELECT "Poll Source" FROM table_21056 WHERE "Democrat: Carl Levin" = '54%' AND "Lead Margin" = '28' |
the previous day, was patient 739's arterial bp mean ever greater than 78.0? | CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE procedures_icd (row_i... | SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 739)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp mean' A... |
What is the position of Dale Craigwell? | CREATE TABLE table_37432 ("Round" real,"Player" text,"Position" text,"Nationality" text,"College/Junior/Club Team" text) | SELECT "Position" FROM table_37432 WHERE "Player" = 'dale craigwell' |
What is the Akira when Prince Devitt is Devitt (7:20)? | CREATE TABLE table_52615 ("Block A" text,"Akira" text,"Atsushi Aoki" text,"Black Tiger V" text,"Jado" text,"Milano Collection A.T." text,"Prince Devitt" text,"Tiger Mask IV" text) | SELECT "Akira" FROM table_52615 WHERE "Prince Devitt" = 'devitt (7:20)' |
show me the flights from PHILADELPHIA to ATLANTA | CREATE TABLE code_description (code varchar,description text)CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE flight_stop (flight_id int,stop_numbe... | 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 = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'A... |
WHAT IS THE MOVING TO LOCATION WITH BEL AS COUNTRY? | CREATE TABLE table_name_27 (moving_to VARCHAR,country VARCHAR) | SELECT moving_to FROM table_name_27 WHERE country = "bel" |
What was the final score of a baseball game that happened before 2005? | CREATE TABLE table_32187 ("Year" real,"Date contested" text,"Sport" text,"Winning team" text,"Losing team" text,"Final score" text) | SELECT "Final score" FROM table_32187 WHERE "Sport" = 'baseball' AND "Year" < '2005' |
How many television service are in italian and n is greater than 856.0? | CREATE TABLE table_72731 ("N\u00b0" real,"Television service" text,"Country" text,"Language" text,"Content" text,"DAR" text,"HDTV" text,"Package/Option" text) | SELECT "Television service" FROM table_72731 WHERE "Language" = 'Italian' AND "N\u00b0" > '856.0' |
Name the number of episode for phyllo dough | CREATE TABLE table_15187735_3 (episode VARCHAR,segment_c VARCHAR) | SELECT COUNT(episode) FROM table_15187735_3 WHERE segment_c = "Phyllo Dough" |
A scatter chart shows the correlation between School_ID and All_Games_Percent . | 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 School_ID, All_Games_Percent FROM basketball_match |
how many incumbent with first elected being 1932 | CREATE TABLE table_18664 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT COUNT("Incumbent") FROM table_18664 WHERE "First elected" = '1932' |
What is the total frequency have a Status of owned by cumulus media, and a Format of news? | CREATE TABLE table_14923 ("Station" text,"Frequency" real,"Network Affiliation" text,"Format" text,"City of License" text,"Status" text) | SELECT SUM("Frequency") FROM table_14923 WHERE "Status" = 'owned by cumulus media' AND "Format" = 'news' |
how many times did the usl a league reach the quarterfinals ? | CREATE TABLE table_204_590 (id number,"year" number,"division" number,"league" text,"regular season" text,"playoffs" text,"open cup" text,"avg. attendance" number) | SELECT COUNT(*) FROM table_204_590 WHERE "league" = 'usl a-league' AND "playoffs" = 'quarterfinals' |
Return the number of the completion date for all the tests that have 'Fail' result, and rank by the bar in asc. | CREATE TABLE Students (student_id INTEGER,date_of_registration DATETIME,date_of_latest_logon DATETIME,login_name VARCHAR(40),password VARCHAR(10),personal_name VARCHAR(40),middle_name VARCHAR(40),family_name VARCHAR(40))CREATE TABLE Course_Authors_and_Tutors (author_id INTEGER,author_tutor_ATB VARCHAR(3),login_name VAR... | SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" GROUP BY date_of_completion ORDER BY date_of_completion |
Who was drafted from the school Mountain Pointe High School? | CREATE TABLE table_17039 ("Player" text,"Position" text,"School" text,"Hometown" text,"MLB Draft" text) | SELECT "MLB Draft" FROM table_17039 WHERE "School" = 'Mountain Pointe High School' |
What are the names of those who made less than 3 wins in 15 matches? | CREATE TABLE table_name_90 (name VARCHAR,wins VARCHAR,matches VARCHAR) | SELECT name FROM table_name_90 WHERE wins < 3 AND matches < 15 |
What was the Winning score for the Mynavi ABC Championship Tournament? | CREATE TABLE table_name_55 (winning_score VARCHAR,tournament VARCHAR) | SELECT winning_score FROM table_name_55 WHERE tournament = "mynavi abc championship" |
What is the length for a diameter totaling 450 mm? | CREATE TABLE table_17918238_1 (length VARCHAR,maximum_diameter VARCHAR) | SELECT length FROM table_17918238_1 WHERE maximum_diameter = "450 mm" |
give me the number of patients whose admission location is emergency room admit and primary disease is atrial septal defect\mitral valve replacement;repair atrial-septal defect/sda? | 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 lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.diagnosis = "ATRIAL SEPTAL DEFECT\MITRAL VALVE REPLACEMENT;REPAIR ATRIAL-SEPTAL DEFECT/SDA" |
What is the home team of the game where Geelong was the away team? | CREATE TABLE table_53170 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Date" text) | SELECT "Home team" FROM table_53170 WHERE "Away team" = 'geelong' |
What are the names of all tracks that are on the Movies playlist but not in the music playlist? | CREATE TABLE artists (id number,name text)CREATE TABLE playlists (id number,name text)CREATE TABLE invoices (id number,customer_id number,invoice_date time,billing_address text,billing_city text,billing_state text,billing_country text,billing_postal_code text,total number)CREATE TABLE playlist_tracks (playlist_id numbe... | SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T2.playlist_id = T3.id WHERE T3.name = 'Music' |
What is the e/vap value for a turnout of exactly 85.7%? | CREATE TABLE table_2683116_1 (E VARCHAR,vap VARCHAR,turnout VARCHAR) | SELECT E / vap FROM table_2683116_1 WHERE turnout = "85.7%" |
how many years did william r poage serve ? | CREATE TABLE table_204_145 (id number,"representative" text,"state" text,"district(s)" text,"served" text,"party" text,"date of birth" text,"date of death" text,"age" text) | SELECT "served" - "served" FROM table_204_145 WHERE "representative" = 'william r. poage' |
Which party had a Retired Democratic hold? | CREATE TABLE table_35060 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text) | SELECT "Party" FROM table_35060 WHERE "Result" = 'retired democratic hold' |
how many patients whose drug type is main and lab test name is lipase? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.drug_type = "MAIN" AND lab.label = "Lipase" |
When has a Centerfold model of pilar lastra? | CREATE TABLE table_40540 ("Date" text,"Cover model" text,"Centerfold model" text,"Interview subject" text,"20 Questions" text) | SELECT "Date" FROM table_40540 WHERE "Centerfold model" = 'pilar lastra' |
Which division in the AFC Conference had a total of 10 wins and appeared more than 18 times? | CREATE TABLE table_53798 ("Conference" text,"Division" text,"Appearances" real,"Wins" real,"Losses" real) | SELECT "Division" FROM table_53798 WHERE "Conference" = 'afc' AND "Wins" = '10' AND "Appearances" > '18' |
Get all users of provided location. | 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 Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,Content... | SELECT Id, DisplayName FROM Users WHERE Location IN (SELECT DISTINCT (Location) FROM Users WHERE Location LIKE '%urgaon%') |
calculate the average age of living patients who had home health care discharge. | 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 AVG(demographic.age) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.discharge_location = "HOME HEALTH CARE" |
Which classrooms are used by grade 5? | CREATE TABLE list (classroom VARCHAR,grade VARCHAR) | SELECT DISTINCT classroom FROM list WHERE grade = 5 |
how many people work with N Rawiller | CREATE TABLE table_13498403_1 (trainer VARCHAR,jockey VARCHAR) | SELECT COUNT(trainer) FROM table_13498403_1 WHERE jockey = "N Rawiller" |
What is the average lane of the athlete from japan with a time of 4:37.35 and a heat less than 3? | CREATE TABLE table_63042 ("Heat" real,"Lane" real,"Name" text,"Nationality" text,"Time" text) | SELECT AVG("Lane") FROM table_63042 WHERE "Nationality" = 'japan' AND "Time" = '4:37.35' AND "Heat" < '3' |
What are the number of the names of photos taken with the lens brand 'Sigma' or 'Olympus'?, could you list by the name in ascending? | CREATE TABLE photos (id int,camera_lens_id int,mountain_id int,color text,name text)CREATE TABLE mountain (id int,name text,Height real,Prominence real,Range text,Country text)CREATE TABLE camera_lens (id int,brand text,name text,focal_length_mm real,max_aperture real) | SELECT T1.name, COUNT(T1.name) FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' GROUP BY T1.name ORDER BY T1.name |
what topics does oren etzioni write about most ? | CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE paperkeyphrase (paperid int,keyphraseid in... | SELECT DISTINCT COUNT(paperkeyphrase.keyphraseid), paperkeyphrase.keyphraseid FROM author, paper, paperkeyphrase, writes WHERE author.authorname = 'oren etzioni' AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid GROUP BY paperkeyphrase.keyphraseid ORDER ... |
Name the language that has number of 14 | CREATE TABLE table_70373 ("Language" text,"Number" text,"percentage (%)" text,"males" text,"females" text) | SELECT "Language" FROM table_70373 WHERE "Number" = '14' |
What are the names of all songs that are approximately 4 minutes long or are in English? | CREATE TABLE files (f_id number,artist_name text,file_size text,duration text,formats text)CREATE TABLE artist (artist_name text,country text,gender text,preferred_genre text)CREATE TABLE song (song_name text,artist_name text,country text,f_id number,genre_is text,rating number,languages text,releasedate time,resolutio... | SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id = T2.f_id WHERE T1.duration LIKE "4:%" UNION SELECT song_name FROM song WHERE languages = "english" |
What is the Home team on April 2? | CREATE TABLE table_49522 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text) | SELECT "Home" FROM table_49522 WHERE "Date" = 'april 2' |
is us US | CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE month (month_number int,month_name text)CREATE TABLE equipment_sequence (aircraft_code_sequence varchar,aircraft_code varchar)CREATE TABLE compartment_class (compartment varchar,class_type ... | SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'US' AND airline_name LIKE 'USAIR' |
Which company's type is joint venture, and has principle activities listed as Cargo Airline and an incorporation of China? | CREATE TABLE table_75184 ("Company" text,"Type" text,"Principal activities" text,"Incorporated in" text,"Group's Equity Shareholding (10 March 2010)" text) | SELECT "Company" FROM table_75184 WHERE "Type" = 'joint venture' AND "Principal activities" = 'cargo airline' AND "Incorporated in" = 'china' |
If the POS is 3, what is the 08 points? | CREATE TABLE table_24708 ("Pos" real,"Team" text,"07 Pts" real,"08 Pts" real,"09 Pts" real,"Total Pts" real,"Total Pld" real,"Avg" text) | SELECT "08 Pts" FROM table_24708 WHERE "Pos" = '3' |
Which week was the game against the San Diego Chargers? | CREATE TABLE table_52463 ("Week" text,"Date" text,"Opponent" text,"Result" text,"Kickoff [a ]" text,"Game site" text,"Attendance" text,"Record" text) | SELECT "Week" FROM table_52463 WHERE "Opponent" = 'san diego chargers' |
Who is the opponent on the game that will be played at metropolitan stadium? | CREATE TABLE table_56108 ("Week" text,"Date" text,"Opponent" text,"Result" text,"Kickoff [a ]" text,"Game site" text,"Attendance" text,"Record" text) | SELECT "Opponent" FROM table_56108 WHERE "Game site" = 'metropolitan stadium' |
how many patients use the neonatal syringe? | 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 procedures (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 prescriptions.drug = "Syringe (Neonatal)" |
Team 2 Al-Ain played in what venue? | CREATE TABLE table_45738 ("Season" text,"Team 1" text,"Score" text,"Team 2" text,"Venue" text) | SELECT "Venue" FROM table_45738 WHERE "Team 2" = 'al-ain' |
how many rebounds were there total , according to this table , in 1978 ? | CREATE TABLE table_203_532 (id number,"rebounds" number,"off" number,"def" number,"player" text,"team" text,"date" text,"opponent" text,"score" text,"minutes played" text,"points" number,"assists" number,"steals" number,"blocks" number,"20-20" text,"led the league in rebounding" text,"notes" text) | SELECT SUM("rebounds") FROM table_203_532 WHERE "date" = 1978 |
Name the starts for 2009 | CREATE TABLE table_2725949_6 (starts VARCHAR,season VARCHAR) | SELECT starts FROM table_2725949_6 WHERE season = 2009 |
Name the winning score for jim barnes and year of 1924 | CREATE TABLE table_name_24 (winning_score VARCHAR,runner_up VARCHAR,year VARCHAR) | SELECT winning_score FROM table_name_24 WHERE runner_up = "jim barnes" AND year = 1924 |
Which away team scored at 15.17 (107) at an away game? | CREATE TABLE table_53353 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team" FROM table_53353 WHERE "Away team score" = '15.17 (107)' |
What is the high earnings for players with 34 events and over 2 wins? | CREATE TABLE table_name_90 (earnings___ INTEGER,events VARCHAR,wins VARCHAR) | SELECT MAX(earnings___) AS $__ FROM table_name_90 WHERE events = 34 AND wins > 2 |
What is the digital reaction for week of top 5 for Taylor Hicks? | CREATE TABLE table_name_20 (hot_digital_songs_reaction VARCHAR,week VARCHAR,performer_s_ VARCHAR) | SELECT hot_digital_songs_reaction FROM table_name_20 WHERE week = "top 5" AND performer_s_ = "taylor hicks" |
tell me the number of patients who were born in or before 2132. | 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.dod_year <= "2132.0" |
do you have a flight from ATLANTA to BOSTON that will stop in WASHINGTON | CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE month (month_number int,month_name text)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE days (days_code varchar,day_name varcha... | 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 = 'BOSTON' AND CITY_2.cit... |
For player Les Ames, what was the venue? | CREATE TABLE table_name_29 (venue VARCHAR,player VARCHAR) | SELECT venue FROM table_name_29 WHERE player = "les ames" |
Which Works number has a Number larger than 807, and a Type of 0-6-0, and a Date of 1920? | CREATE TABLE table_name_1 (works_number INTEGER,date VARCHAR,number VARCHAR,type VARCHAR) | SELECT AVG(works_number) FROM table_name_1 WHERE number > 807 AND type = "0-6-0" AND date = 1920 |
What is the debut album for the artist with the winning song kemenangan hati? | CREATE TABLE table_1461 ("Season" text,"Winner" text,"Winning Song" text,"Winning Song (English Title)" text,"Debut Album" text) | SELECT "Debut Album" FROM table_1461 WHERE "Winning Song" = 'Kemenangan Hati' |
Average round for 22 pick that is overall smaller than 229? | CREATE TABLE table_50452 ("Round" real,"Pick" real,"Overall" real,"Name" text,"Position" text,"College" text) | SELECT AVG("Round") FROM table_50452 WHERE "Pick" = '22' AND "Overall" < '229' |
Find the number of students living in each city with a bar chart, I want to show by the city_code in ascending please. | CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Dorm (dormid INTEGER,dorm_name VARCHAR(20),student_capacity INTEGER,gender VARCHAR(1))CREATE TABLE Lives_in (stuid INTEGER,dormid INTEGER,room_number INTEGER... | SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY city_code |
What is the city where the Telstra Dome is? | CREATE TABLE table_51875 ("Stadium" text,"Games" real,"City" text,"State" text,"Capacity" real,"Best Crowd" text) | SELECT "City" FROM table_51875 WHERE "Stadium" = 'telstra dome' |
let me know the number of government health insurance patients who have ntprobnp lab test. | 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.insurance = "Government" AND lab.label = "NTproBNP" |
What's the total population when there are 5.7% Asian American and fewer than 126,965 Asian American Population? | CREATE TABLE table_name_88 (total_population__2010_ INTEGER,_percentage_asian_american VARCHAR,asian_american_population__2010_ VARCHAR) | SELECT MIN(total_population__2010_) FROM table_name_88 WHERE _percentage_asian_american = 5.7 AND asian_american_population__2010_ < 126 OFFSET 965 |
provide the number of patients whose insurance is private and procedure icd9 code is 8968. | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.icd9_code = "8968" |
How do you say Friday in Polish? | CREATE TABLE table_17781 ("Day (see Irregularities)" text,"Monday First Day" text,"Tuesday Second Day" text,"Wednesday Third Day" text,"Thursday Fourth Day" text,"Friday Fifth Day" text,"Saturday Sixth Day" text,"Sunday Seventh Day" text) | SELECT "Friday Fifth Day" FROM table_17781 WHERE "Day (see Irregularities )" = 'Polish' |
Which location has the date of October 28? | CREATE TABLE table_23612439_2 (location VARCHAR,date VARCHAR) | SELECT location FROM table_23612439_2 WHERE date = "October 28" |
Who directed the episode that had 3.55 million viewers? | CREATE TABLE table_29897962_1 (directed_by VARCHAR,us_viewers__million_ VARCHAR) | SELECT directed_by FROM table_29897962_1 WHERE us_viewers__million_ = "3.55" |
What is the lowest year that has edmonton, canada as the venue with a weight class (kg) greater than 100? | CREATE TABLE table_79534 ("Year" real,"Event" text,"Venue" text,"Place" text,"Weight class (kg)" real) | SELECT MIN("Year") FROM table_79534 WHERE "Venue" = 'edmonton, canada' AND "Weight class (kg)" > '100' |
What is the highest Kuala Lumpur value with a Durban value less than 1 and a Mar Del Plata value greater than 0? | CREATE TABLE table_name_82 (kuala_lumpur INTEGER,durban VARCHAR,mar_del_plata VARCHAR) | SELECT MAX(kuala_lumpur) FROM table_name_82 WHERE durban < 1 AND mar_del_plata > 0 |
give the total number of riders listed . | CREATE TABLE table_204_162 (id number,"team" text,"constructor" text,"motorcycle" text,"tyres" text,"no" number,"rider" text,"rounds" text) | SELECT COUNT("rider") FROM table_204_162 |
How many times did the team achieve an overrall record of mu, 21-19? | CREATE TABLE table_20606 ("Missouri vs." text,"Overall Record" text,"at Columbia" text,"at Opponents Venue" text,"at Neutral Site" text,"Last 5 Meetings" text,"Last 10 Meetings" text,"Current Streak" text) | SELECT COUNT("Last 5 Meetings") FROM table_20606 WHERE "Overall Record" = 'MU, 21-19' |
On what date did the woman married to Louis II become consort? | CREATE TABLE table_name_86 (became_consort VARCHAR,spouse VARCHAR) | SELECT became_consort FROM table_name_86 WHERE spouse = "louis ii" |
Who drove for Arciero Racing? | CREATE TABLE table_4763 ("Team" text,"Chassis" text,"Engine" text,"Tires" text,"Drivers" text) | SELECT "Drivers" FROM table_4763 WHERE "Team" = 'arciero racing' |
What was the score in a place of t5 in the United States? | CREATE TABLE table_36067 ("Place" text,"Player" text,"Nation" text,"Score" text,"To par" text,"Money ($)" real) | SELECT "Score" FROM table_36067 WHERE "Place" = 't5' AND "Nation" = 'united states' |
If points against was 371, what is the drawn? | CREATE TABLE table_name_51 (drawn VARCHAR,points_against VARCHAR) | SELECT drawn FROM table_name_51 WHERE points_against = "371" |
Return the number of the claim start date for the claims whose claimed amount is no more than the average | CREATE TABLE Claims (Claim_ID INTEGER,Policy_ID INTEGER,Date_Claim_Made DATE,Date_Claim_Settled DATE,Amount_Claimed INTEGER,Amount_Settled INTEGER)CREATE TABLE Customers (Customer_ID INTEGER,Customer_Details VARCHAR(255))CREATE TABLE Customer_Policies (Policy_ID INTEGER,Customer_ID INTEGER,Policy_Type_Code CHAR(15),Sta... | SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Claims WHERE Amount_Settled <= (SELECT AVG(Amount_Settled) FROM Claims) |
Show the budget type code and description and the corresponding document id. | CREATE TABLE projects (project_id number,project_details text)CREATE TABLE ref_document_types (document_type_code text,document_type_name text,document_type_description text)CREATE TABLE ref_budget_codes (budget_type_code text,budget_type_description text)CREATE TABLE accounts (account_id number,statement_id number,acc... | SELECT T2.budget_type_code, T2.budget_type_description, T1.document_id FROM documents_with_expenses AS T1 JOIN ref_budget_codes AS T2 ON T1.budget_type_code = T2.budget_type_code |
Draw a bar chart for what is the average age for each gender? | CREATE TABLE PersonFriend (name varchar(20),friend varchar(20),year INTEGER)CREATE TABLE Person (name varchar(20),age INTEGER,city TEXT,gender TEXT,job TEXT) | SELECT gender, AVG(age) FROM Person GROUP BY gender |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.