instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
List of tags of users' questions and their count. | CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE PostFeedback (Id number,PostId num... | SELECT OuterUsers.DisplayName, OuterUsers.Id, (SELECT Tags.TagName FROM Users INNER JOIN Posts ON Posts.OwnerUserId = OuterUsers.Id INNER JOIN PostTags ON PostTags.PostId = Posts.Id INNER JOIN Tags ON PostTags.TagId = Tags.Id GROUP BY Tags.TagName ORDER BY COUNT(*) DESC LIMIT 1) AS TopTag FROM Users AS OuterUsers WHERE... |
Who scored the high points on the date November 2? | CREATE TABLE table_17058116_5 (high_points VARCHAR,date VARCHAR) | SELECT high_points FROM table_17058116_5 WHERE date = "November 2" |
count the number of patients whose admission type is elective and admission location is phys referral/normal deli? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" |
What is the highest lane for heat 6 with a time of dns? | CREATE TABLE table_70812 ("Heat" real,"Lane" real,"Name" text,"Nationality" text,"Time" text) | SELECT MAX("Lane") FROM table_70812 WHERE "Heat" = '6' AND "Time" = 'dns' |
What are the names of mountains that have a height of over 5000 or a prominence of over 1000? | CREATE TABLE climber (climber_id number,name text,country text,time text,points number,mountain_id number)CREATE TABLE mountain (mountain_id number,name text,height number,prominence number,range text,country text) | SELECT name FROM mountain WHERE height > 5000 OR prominence > 1000 |
What is the L2 cache with ec number of slbmm(c2)slbsr(k0)? | CREATE TABLE table_13612 ("Model number" text,"sSpec number" text,"Frequency" text,"Turbo" text,"GPU frequency" text,"Cores" text,"L2 cache" text,"L3 cache" text,"I/O bus" text,"Mult." text,"Memory" text,"Voltage" text,"Socket" text,"Release date" text,"Part number(s)" text,"Release price (USD)" text) | SELECT "L2 cache" FROM table_13612 WHERE "sSpec number" = 'slbmm(c2)slbsr(k0)' |
What's the Proto-Germanic when the German is /t/? | CREATE TABLE table_66291 ("Proto-Germanic" text,"West Germanic" text,"Old English" text,"German" text,"Dutch" text) | SELECT "Proto-Germanic" FROM table_66291 WHERE "German" = '/t/' |
Which Type has a Fleet numbers of 2 8, 91 92, 97 100? | CREATE TABLE table_14767 ("Class" text,"Type" text,"Fleet numbers" text,"Quantity made" real,"Manufacturer" text,"Date made" text,"1958 CI\u00c9" text,"1958 UTA" text,"Date withdrawn" text,"Notes" text) | SELECT "Type" FROM table_14767 WHERE "Fleet numbers" = '2–8, 91–92, 97–100' |
What are the types of film market estimations in year 1995? | CREATE TABLE film_market_estimation (estimation_id number,low_estimate number,high_estimate number,film_id number,type text,market_id number,year number)CREATE TABLE film (film_id number,title text,studio text,director text,gross_in_dollar number)CREATE TABLE market (market_id number,country text,number_cities number) | SELECT type FROM film_market_estimation WHERE year = 1995 |
Name the 3rd for season less than 4 and lost of 61 | CREATE TABLE table_name_19 (season VARCHAR,lost VARCHAR) | SELECT 3 AS _rd FROM table_name_19 WHERE season < 4 AND lost = 61 |
How many Points against has Tries for smaller than 14, and a Team of llanelli? | CREATE TABLE table_name_13 (points_against INTEGER,tries_for VARCHAR,team VARCHAR) | SELECT AVG(points_against) FROM table_name_13 WHERE tries_for < 14 AND team = "llanelli" |
What competition was the World Championships before 2011? | CREATE TABLE table_31874 ("Year" real,"Competition" text,"Venue" text,"Position" text,"Event" text) | SELECT "Event" FROM table_31874 WHERE "Competition" = 'world championships' AND "Year" < '2011' |
what is the party when candidates is jim demint (r) 80%? | CREATE TABLE table_1341423_40 (party VARCHAR,candidates VARCHAR) | SELECT party FROM table_1341423_40 WHERE candidates = "Jim DeMint (R) 80%" |
What is the comissioned for 4 may 1943? | CREATE TABLE table_1220125_4 (commissioned VARCHAR,laid_down VARCHAR) | SELECT commissioned FROM table_1220125_4 WHERE laid_down = "4 May 1943" |
How many Tries against has a Try diff of 17 and Points for smaller than 80? | CREATE TABLE table_name_30 (tries_against VARCHAR,try_diff VARCHAR,points_for VARCHAR) | SELECT COUNT(tries_against) FROM table_name_30 WHERE try_diff = "–17" AND points_for < 80 |
Which Score has a Competition of uefa euro 2012 qualifying? | CREATE TABLE table_10046 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Score" FROM table_10046 WHERE "Competition" = 'uefa euro 2012 qualifying' |
Where did South Melbourne go to play a team at home? | CREATE TABLE table_name_98 (home_team VARCHAR,away_team VARCHAR) | SELECT home_team FROM table_name_98 WHERE away_team = "south melbourne" |
Show me the number of card type code by card type code in a histogram, sort X-axis in ascending order. | CREATE TABLE Financial_Transactions (transaction_id INTEGER,previous_transaction_id INTEGER,account_id INTEGER,card_id INTEGER,transaction_type VARCHAR(15),transaction_date DATETIME,transaction_amount DOUBLE,transaction_comment VARCHAR(255),other_transaction_details VARCHAR(255))CREATE TABLE Accounts (account_id INTEGE... | SELECT card_type_code, COUNT(card_type_code) FROM Customers_Cards GROUP BY card_type_code ORDER BY card_type_code |
What is the catalogue number for the song that is 3:17 and was released 9/21/71? | CREATE TABLE table_name_94 (catalogue VARCHAR,release_date VARCHAR,time VARCHAR) | SELECT catalogue FROM table_name_94 WHERE release_date = "9/21/71" AND time = "3:17" |
If the team in the New England Patriots, what is the super bowl championship minimum number? | CREATE TABLE table_23061 ("Team" text,"Division Titles" real,"Playoff Berths" real,"AFL Titles" real,"AFC Championships" real,"Super Bowl Championships" real) | SELECT MIN("Super Bowl Championships") FROM table_23061 WHERE "Team" = 'New England Patriots' |
What is the score of the game on November 10, 2006? | CREATE TABLE table_name_17 (score VARCHAR,date VARCHAR) | SELECT score FROM table_name_17 WHERE date = "november 10, 2006" |
What year did Bryant Heating enter? | CREATE TABLE table_15376 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real) | SELECT SUM("Year") FROM table_15376 WHERE "Entrant" = 'bryant heating' |
what is drug dose of drug name ciprofloxacin hcl? | 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 prescriptions.drug_dose FROM prescriptions WHERE prescriptions.drug = "Ciprofloxacin HCl" |
select top(50) * from posts ORDER BY posts.ViewCount DESC. | CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE Review... | SELECT TOP(50000) AS Id, Score, ViewCount, OwnerUserId FROM Posts WHERE Posts.ViewCount < 14597 ORDER BY Posts.ViewCount DESC |
What was the swimsuit score for Illinois? | CREATE TABLE table_17521433_1 (swimsuit VARCHAR,country VARCHAR) | SELECT swimsuit FROM table_17521433_1 WHERE country = "Illinois" |
What is the Original Artis of the Track with a Length of 2:38? | CREATE TABLE table_64502 ("Track" text,"Song Title" text,"Writer(s)" text,"Original Artist" text,"Original Release" real,"Length" text) | SELECT "Original Artist" FROM table_64502 WHERE "Length" = '2:38' |
What are the requirements for a CS-LSA degree ? | CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE gsi (course_offering_id int,student_id int)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_... | SELECT DISTINCT program_requirement.additional_req, program_requirement.category, program_requirement.min_credit, program.name FROM program, program_requirement WHERE program.name LIKE '%CS-LSA%' AND program.program_id = program_requirement.program_id |
When was there a result of 8-1 and a score of 8-1? | CREATE TABLE table_15623 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Date" FROM table_15623 WHERE "Result" = '8-1' AND "Score" = '8-1' |
how many were held at hongkou stadium ? | CREATE TABLE table_204_770 (id number,"season" number,"date" text,"jia-a/csl winner" text,"result" text,"fa cup winner" text,"scorers" text,"stadium" text) | SELECT COUNT(*) FROM table_204_770 WHERE "stadium" = 'hongkou stadium' |
How many single patients had a diagnosis long title protal hypertension? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.long_title = "Portal hypertension" |
top earners of multi-award badges. | CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE ReviewTaskStates (Id number,Name te... | SELECT Name, num, UserId AS "user_link" FROM (SELECT Name, num, UserId, ROW_NUMBER() OVER (PARTITION BY Name ORDER BY num DESC) AS rownum FROM (SELECT Name, UserId, COUNT(Id) AS num FROM Badges GROUP BY Name, UserId) AS uc) AS ucn WHERE rownum <= 5 AND num > 2 ORDER BY Name |
Give me location of admission and primary disease status of the patient with patient id 2560. | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)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 ... | SELECT demographic.admission_location, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "2560" |
What country is Tiger Woods from? | CREATE TABLE table_name_22 (country VARCHAR,player VARCHAR) | SELECT country FROM table_name_22 WHERE player = "tiger woods" |
what are the numbers of patients who took a protein s, functional test since 2100? | CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE admissions (row_id ... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'protein s, functional') AND STRFTIME('%y', labevents.charttime) >= '2100') |
Which developer has a year of cancelled releases? | CREATE TABLE table_name_96 (developer VARCHAR,year_of_release VARCHAR) | SELECT developer FROM table_name_96 WHERE year_of_release = "cancelled" |
indicate the monthly maximum arterial bp [systolic] of patient 1561 since 08/01/2105. | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)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 d_items (row_id number,itemid number,label text,linksto te... | SELECT MAX(chartevents.valuenum) FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1561)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arter... |
What is the average dismissals of 83 test and catches less than 33? | CREATE TABLE table_70130 ("Player" text,"Test Career" text,"Tests" real,"Catches" real,"Stumpings" real,"Total Dismissals" real) | SELECT AVG("Total Dismissals") FROM table_70130 WHERE "Tests" = '83' AND "Catches" < '33' |
Which Third has a Champion of metalurh novomoskovsk? | CREATE TABLE table_44581 ("Season" text,"Zone" real,"Champion" text,"Second" text,"Third" text,"Top scorer" text) | SELECT "Third" FROM table_44581 WHERE "Champion" = 'metalurh novomoskovsk' |
Show order ids and the total quantity in each order by a scatter chart. | CREATE TABLE Product_Categories (production_type_code VARCHAR(15),product_type_description VARCHAR(80),vat_rating DECIMAL(19,4))CREATE TABLE Invoice_Line_Items (order_item_id INTEGER,invoice_number INTEGER,product_id INTEGER,product_title VARCHAR(80),product_quantity VARCHAR(50),product_price DECIMAL(19,4),derived_prod... | SELECT order_id, SUM(product_quantity) FROM Order_Items GROUP BY order_id |
What player was moving from manchester united? | CREATE TABLE table_name_78 (name VARCHAR,moving_from VARCHAR) | SELECT name FROM table_name_78 WHERE moving_from = "manchester united" |
Name the status for points 3185 | CREATE TABLE table_73561 ("Seed" real,"Rank" real,"Player" text,"Points" real,"Points defending" text,"Points won" real,"New points" real,"Status" text) | SELECT "Status" FROM table_73561 WHERE "Points" = '3185' |
when did patient 47460 receive a inject into thorax cavit procedure for the first time on their last hospital visit? | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)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 patients (row_id number,subject_id number,gen... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'inject into thorax cavit') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 47460 AND ... |
what is procedure long title of subject name charles deshay? | 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 lab (subject_id text,hadm_id text,itemid text,charttime tex... | SELECT procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Charles Deshay" |
WHAT IS THE WORLDWIDE BOX OFFICE FOR BRAVE? | CREATE TABLE table_name_41 (worldwide VARCHAR,film VARCHAR) | SELECT worldwide FROM table_name_41 WHERE film = "brave" |
what is the name of the drug which has been prescribed to patient 30307 two times? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)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 d_i... | SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30307) GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 = 2 |
What is the games lost when games played was 2, year was earlier than 1999, and points for was 24? | CREATE TABLE table_14087 ("Year(s)" real,"Tournament or series" text,"Played in" text,"Games played (Tests)" text,"Games won (Tests)" text,"Games lost (Tests)" text,"Games drawn (Tests)" text,"Points for (Tests)" text,"Points against (Tests)" text) | SELECT "Games lost ( Tests )" FROM table_14087 WHERE "Games played ( Tests )" = '2' AND "Year(s)" < '1999' AND "Points for ( Tests )" = '24' |
What Label has a Code of cocy-78365? | CREATE TABLE table_name_52 (label VARCHAR,code VARCHAR) | SELECT label FROM table_name_52 WHERE code = "cocy-78365" |
Name the date for score w 109 95 (ot) | CREATE TABLE table_73510 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Date" FROM table_73510 WHERE "Score" = 'W 109–95 (OT)' |
what is patient 7959's height for the last time in 03/this year? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id numb... | 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 = 7959)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht' ... |
What is the name of the athlete from Myanmar? | CREATE TABLE table_name_97 (athletes VARCHAR,country VARCHAR) | SELECT athletes FROM table_name_97 WHERE country = "myanmar" |
Name the result for kingdome game site and opponent of denver broncos | CREATE TABLE table_name_75 (result VARCHAR,game_site VARCHAR,opponent VARCHAR) | SELECT result FROM table_name_75 WHERE game_site = "kingdome" AND opponent = "denver broncos" |
how many years was it before the first partly free status ? | CREATE TABLE table_203_528 (id number,"year" number,"political rights" number,"civil liberties" number,"status" text,"president" text) | SELECT COUNT("year") FROM table_203_528 WHERE id < (SELECT id FROM table_203_528 WHERE "status" = 'partly free') |
how many patients aged less than 45 years speak the language port? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "PORT" AND demographic.age < "45" |
count the number of patients whose year of death is less than or equal to 2115 and procedure icd9 code is 4341? | 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.dod_year <= "2115.0" AND procedures.icd9_code = "4341" |
Who was the winner when the runner-up was Chemnitzer FC II? | CREATE TABLE table_10826 ("Date" text,"Stadium" text,"Winners" text,"Runners-up" text,"Score" text,"Attendance" real) | SELECT "Winners" FROM table_10826 WHERE "Runners-up" = 'chemnitzer fc ii' |
What Inchicore Class has a GSR Class of 235? | CREATE TABLE table_56551 ("Year" text,"Type" text,"Nos." text,"GSWR Class" real,"GSWR Nos." text,"GSR Class" text,"Inchicore Class" text,"Withdrawn" text) | SELECT "Inchicore Class" FROM table_56551 WHERE "GSR Class" = '235' |
Name the air date for alex taub | CREATE TABLE table_29568 ("No. in series" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. Viewers (millions)" text) | SELECT "Original air date" FROM table_29568 WHERE "Written by" = 'Alex Taub' |
What is the lowest Wins, when Season is 2011, when Podiums is 1, and when Poles is less than 0? | CREATE TABLE table_name_37 (wins INTEGER,poles VARCHAR,season VARCHAR,podiums VARCHAR) | SELECT MIN(wins) FROM table_name_37 WHERE season = "2011" AND podiums = 1 AND poles < 0 |
What is the name of the episode written by Sheila Lawrence & Henry Alonso Myers? | CREATE TABLE table_12146637_1 (episode_title VARCHAR,writer_s_ VARCHAR) | SELECT episode_title FROM table_12146637_1 WHERE writer_s_ = "Sheila Lawrence & Henry Alonso Myers" |
how many patients went through a biopsy test since 2105? | 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 transfers (row_id number,subject_id number,hadm_id n... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT microbiologyevents.hadm_id FROM microbiologyevents WHERE microbiologyevents.spec_type_desc = 'biopsy' AND STRFTIME('%y', microbiologyevents.charttime) >= '2105') |
What is every value for viewers for ranking #51 for the Tuesday 9:00 p.m. timeslot? | CREATE TABLE table_175980_2 (viewers__in_millions_ VARCHAR,ranking VARCHAR,timeslot VARCHAR) | SELECT viewers__in_millions_ FROM table_175980_2 WHERE ranking = "#51" AND timeslot = "Tuesday 9:00 p.m." |
what is the highest city in terms of altitude ? | 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 "altitude\n(mslm)" DESC LIMIT 1 |
tell me about the type of aircraft called an M80 | 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 aircraft_code FROM aircraft WHERE aircraft_code = 'M80' |
What is the average number of wins for the Terang Club, when there are less than 0 draws? | CREATE TABLE table_name_43 (wins INTEGER,club VARCHAR,draws VARCHAR) | SELECT AVG(wins) FROM table_name_43 WHERE club = "terang" AND draws < 0 |
After 10:00 , is there a section for PHYSICS 522 ? | CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE student (student_id int,lastname varchar,firstname varcha... | SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.start_time > '10:00' AND course.course_id = course_offering.course_id AND course.department = 'PHYSICS' AND course.number = 522 AND semester.semester = 'WN' A... |
What is the Date of Tie no 9? | CREATE TABLE table_name_61 (date VARCHAR,tie_no VARCHAR) | SELECT date FROM table_name_61 WHERE tie_no = "9" |
What is the smalledt position when the difference was 6? | CREATE TABLE table_20040 ("Position" real,"Team" text,"Points" real,"Played" real,"Won" real,"Drawn" real,"Lost" real,"For" real,"Against" real,"Difference" text) | SELECT MIN("Position") FROM table_20040 WHERE "Difference" = '6' |
What is the genus & species of the animal whose accession number is XP_002439156.1? | CREATE TABLE table_29154 ("Common Name" text,"Genus & Species" text,"NCBI Accession Number" text,"Length (AA)" real,"% Identity to C7orf38" real,"% Similarity to C7orf38" real) | SELECT "Genus & Species" FROM table_29154 WHERE "NCBI Accession Number" = 'XP_002439156.1' |
Where was the Rally HQ for Round 1? | CREATE TABLE table_64379 ("Round" real,"Dates" text,"Rally Name" text,"Rally HQ" text,"Support Category" text,"Surface" text) | SELECT "Rally HQ" FROM table_64379 WHERE "Round" = '1' |
What are the names of the five cities with the greatest proportion of white people? | CREATE TABLE county_public_safety (county_id number,name text,population number,police_officers number,residents_per_officer number,case_burden number,crime_rate number,police_force text,location text)CREATE TABLE city (city_id number,county_id number,name text,white number,black number,amerindian number,asian number,m... | SELECT name FROM city ORDER BY white DESC LIMIT 5 |
Who was the away team when Melbourne was the home team? | CREATE TABLE table_53022 ("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_53022 WHERE "Home team" = 'melbourne' |
which building is the oldest on the bw campus . | CREATE TABLE table_204_240 (id number,"name" text,"current use" text,"completed" text,"namesake" text,"info" text) | SELECT "name" FROM table_204_240 ORDER BY "completed" LIMIT 1 |
What is the least for Scottish Cup with a Challenge Cup greater than 0, Player Paul Keegan, and League Cup greater than 0? | CREATE TABLE table_15753 ("Player" text,"League" real,"Scottish Cup" real,"League Cup" real,"Challenge Cup" real,"Total" real) | SELECT MIN("Scottish Cup") FROM table_15753 WHERE "Challenge Cup" > '0' AND "Player" = 'paul keegan' AND "League Cup" > '0' |
What is the score of the game on February 26 with the Chicago black hawks as the home team and the New York Rangers as the visitor team? | CREATE TABLE table_name_59 (score VARCHAR,date VARCHAR,home VARCHAR,visitor VARCHAR) | SELECT score FROM table_name_59 WHERE home = "chicago black hawks" AND visitor = "new york rangers" AND date = "february 26" |
On which date was a game played at Junction Oval? | CREATE TABLE table_name_40 (date VARCHAR,venue VARCHAR) | SELECT date FROM table_name_40 WHERE venue = "junction oval" |
What was the To par for the player whose final score was 67-71=138? | CREATE TABLE table_name_26 (to_par VARCHAR,score VARCHAR) | SELECT to_par FROM table_name_26 WHERE score = 67 - 71 = 138 |
Name the field goals for alexis yackley | CREATE TABLE table_23184448_4 (field_goals INTEGER,player VARCHAR) | SELECT MAX(field_goals) FROM table_23184448_4 WHERE player = "Alexis Yackley" |
Which Opponent has a Score of 92 93? | CREATE TABLE table_name_52 (opponent VARCHAR,score VARCHAR) | SELECT opponent FROM table_name_52 WHERE score = "92–93" |
What are the id of students who registered course 301? | CREATE TABLE addresses (address_id number,line_1 text,line_2 text,city text,zip_postcode text,state_province_county text,country text)CREATE TABLE candidates (candidate_id number,candidate_details text)CREATE TABLE student_course_attendance (student_id number,course_id number,date_of_attendance time)CREATE TABLE people... | SELECT student_id FROM student_course_attendance WHERE course_id = 301 |
is there an airline that has a flight from PHILADELPHIA to SAN FRANCISCO with a stop in DALLAS | 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 dual_carrier (main_airline ... | SELECT DISTINCT airline.airline_code FROM airline, 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 FRANC... |
Show the number of courses each instructor taught with a bar chart grouping by course code, could you display by the bars from high to low please? | 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 EMPLOYEE (EMP_NUM int,EMP_LNAME varchar(15),EMP_FNAME varchar(12),EMP_INITIAL varchar(1),EMP_JOBCODE varchar(5),EMP_HIREDATE datetime,EMP_DOB datetime)CREATE TAB... | SELECT CRS_CODE, COUNT(CRS_CODE) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM GROUP BY CRS_CODE ORDER BY CRS_CODE DESC |
Name the leading scorer for 12 january 2008 | CREATE TABLE table_57253 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Leading scorer" text,"Attendance" real,"Record" text) | SELECT "Leading scorer" FROM table_57253 WHERE "Date" = '12 january 2008' |
david dallas won in 2010 . what was the name of the album that won the next year ? | CREATE TABLE table_204_655 (id number,"year" number,"winner" text,"album" text,"other finalists" text) | SELECT "album" FROM table_204_655 WHERE "year" > 2010 ORDER BY "year" LIMIT 1 |
Which Finish has a Start of 15, and a Team of bahari? | CREATE TABLE table_name_49 (finish VARCHAR,start VARCHAR,team VARCHAR) | SELECT finish FROM table_name_49 WHERE start = "15" AND team = "bahari" |
On what Date will the Argentina F17 Futures Tournament be played in Argentina? | CREATE TABLE table_54506 ("Tournament" text,"Date" text,"City" text,"Country" text,"Surface" text,"Singles champions" text) | SELECT "Date" FROM table_54506 WHERE "Country" = 'argentina' AND "Tournament" = 'argentina f17 futures' |
What are all the upper-level electives being offered in the Fall and Winter ? | CREATE TABLE area (course_id int,area varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement v... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (semester.semester = ... |
what is the daily minimum bicarbonate value for patient 10624 on this hospital encounter? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE microbiologyevents (ro... | SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10624 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'bicarbonate') GROUP BY STRFTIME('%y-%m-%d'... |
when did on the current hospital encounter patient 027-120575 receive a first procedure? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,c... | SELECT treatment.treatmenttime FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-120575' AND patient.hospitaldischargetime IS NULL)) ORDER BY ... |
What is the lowest Industry, when Year is greater than 2005, and when Agriculture is greater than 11? | CREATE TABLE table_name_96 (industry INTEGER,year VARCHAR,agriculture VARCHAR) | SELECT MIN(industry) FROM table_name_96 WHERE year > 2005 AND agriculture > 11 |
What's the total number of directors who've directed episodes seen by 11.34 million US viewers? | CREATE TABLE table_17478 ("Series #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text,"U.S. viewers (millions)" text) | SELECT COUNT("Directed by") FROM table_17478 WHERE "U.S. viewers (millions)" = '11.34' |
what is the specimen test that patient 49654 was given for the last time in 06/this year? | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc... | SELECT microbiologyevents.spec_type_desc FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 49654) AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', micro... |
What is the finishing time with a 2/1q finish on the Meadowlands track? | CREATE TABLE table_name_10 (fin_time VARCHAR,finish VARCHAR,track VARCHAR) | SELECT fin_time FROM table_name_10 WHERE finish = "2/1q" AND track = "the meadowlands" |
Who was the winner when the iron chef is hiroyuki sakai? | CREATE TABLE table_26457 ("Special" text,"Original airdate" text,"Iron Chef" text,"Challenger" text,"Challenger Specialty" text,"Theme Ingredient" text,"Winner" text) | SELECT "Winner" FROM table_26457 WHERE "Iron Chef" = 'Hiroyuki Sakai' |
what number of patients having procedure titled coronar arteriogr-1 cath were born before 2182? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2182" AND procedures.short_title = "Coronar arteriogr-1 cath" |
What is the total number of games played? | CREATE TABLE video_games (gameid number,gname text,gtype text)CREATE TABLE plays_games (stuid number,gameid number,hours_played number)CREATE TABLE sportsinfo (stuid number,sportname text,hoursperweek number,gamesplayed number,onscholarship text)CREATE TABLE student (stuid number,lname text,fname text,age number,sex te... | SELECT SUM(gamesplayed) FROM sportsinfo |
give the number of patients whose marital status is widowed and procedure short title is nasal sinus dx proc nec. | 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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "WIDOWED" AND procedures.short_title = "Nasal sinus dx proc NEC" |
What is City, when IATA is 'amm'? | CREATE TABLE table_8826 ("City" text,"Country" text,"IATA" text,"ICAO" text,"Airport" text) | SELECT "City" FROM table_8826 WHERE "IATA" = 'amm' |
What try bonus has 19 as the tries against? | CREATE TABLE table_name_17 (try_bonus VARCHAR,tries_against VARCHAR) | SELECT try_bonus FROM table_name_17 WHERE tries_against = "19" |
List the names of all the customers in alphabetical order. | CREATE TABLE policies (policy_id number,customer_id number,policy_type_code text,start_date time,end_date time)CREATE TABLE claims_processing_stages (claim_stage_id number,next_claim_stage_id number,claim_status_name text,claim_status_description text)CREATE TABLE staff (staff_id number,staff_details text)CREATE TABLE ... | SELECT customer_details FROM customers ORDER BY customer_details |
Find the ship type that are used by both ships with Panama and Malta flags. | CREATE TABLE ship (TYPE VARCHAR,flag VARCHAR) | SELECT TYPE FROM ship WHERE flag = 'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag = 'Malta' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.