instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What is the rank of the gatchaman of Jinpei?
CREATE TABLE table_5641 ("Gatchaman" text,"Battle of the Planets" text,"G-Force" text,"Eagle Riders" text,"OVA (Harmony Gold Dub)" text,"Rank" text,"Bird Uniform" text,"Weapon" text,"Mecha" text,"Japanese voice actor" text,"Voice actor (BOTP)" text,"Voice actor (G-Force)" text,"Voice actor (Harmony Gold OVA Dub)" text,...
SELECT "Rank" FROM table_5641 WHERE "Gatchaman" = 'jinpei'
What is the Place of the Player with a To par of 6?
CREATE TABLE table_name_96 (place VARCHAR,to_par VARCHAR)
SELECT place FROM table_name_96 WHERE to_par = "–6"
What is the total goals scored with more than 11 points, 18 goals conceded, and played fewer than 18 times?
CREATE TABLE table_name_17 (goals_scored VARCHAR,played VARCHAR,points VARCHAR,goals_conceded VARCHAR)
SELECT COUNT(goals_scored) FROM table_name_17 WHERE points > 11 AND goals_conceded = 18 AND played < 18
What is the average cloud cover rates of the dates (bin into year interval) that had the top 5 cloud cover rates? You can draw me a bar chart for this purpose, and order by the the average of cloud cover in descending please.
CREATE TABLE trip (id INTEGER,duration INTEGER,start_date TEXT,start_station_name TEXT,start_station_id INTEGER,end_date TEXT,end_station_name TEXT,end_station_id INTEGER,bike_id INTEGER,subscription_type TEXT,zip_code INTEGER)CREATE TABLE station (id INTEGER,name TEXT,lat NUMERIC,long NUMERIC,dock_count INTEGER,city T...
SELECT date, AVG(cloud_cover) FROM weather ORDER BY AVG(cloud_cover) DESC
What is the county with an elevation of 1262?
CREATE TABLE table_17585 ("Rank" real,"Peak" text,"Elevation (m)" real,"Prominence (m)" real,"Isolation (km)" real,"Municipality" text,"County" text)
SELECT "County" FROM table_17585 WHERE "Elevation (m)" = '1262'
What time is it for the southern home team?
CREATE TABLE table_63149 ("Time" text,"Home team" text,"Score" text,"Away team" text,"Venue" text)
SELECT "Time" FROM table_63149 WHERE "Home team" = 'southern'
What is the population density in the Brighton area?
CREATE TABLE table_910 ("Local Government Area" text,"Principal town" text,"Land Area (km\u00b2)" text,"Population 2011 census" real,"Density" text,"Region" text)
SELECT "Density" FROM table_910 WHERE "Principal town" = 'Brighton'
What is the Mary Davis with a Gay Mitchell that is 4.6%?
CREATE TABLE table_name_96 (mary_davis VARCHAR,gay_mitchell VARCHAR)
SELECT mary_davis FROM table_name_96 WHERE gay_mitchell = "4.6%"
Tell me the report with winner of louis wagner
CREATE TABLE table_53311 ("Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Winning constructor" text,"Report" text)
SELECT "Report" FROM table_53311 WHERE "Winning driver" = 'louis wagner'
What is the B Score when the total is more than 16.125, and position is 3rd?
CREATE TABLE table_name_70 (b_score INTEGER,total VARCHAR,position VARCHAR)
SELECT SUM(b_score) FROM table_name_70 WHERE total > 16.125 AND position = "3rd"
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of hire_date and the average of employee_id bin hire_date by weekday, display from high to low by the total number.
CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTME...
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(EMPLOYEE_ID) DESC
What is scored with the position of 6?
CREATE TABLE table_18703133_6 (scored INTEGER,position VARCHAR)
SELECT MIN(scored) FROM table_18703133_6 WHERE position = 6
I need to leave for work at 5:00 every day , so if I take 499 and 162 , can I do that ?
CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)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,...
SELECT COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE (course.number = 499 OR course.number = 162) AND course_offering.end_time > '17:00:00' AND semester.semester = 'WN' AND semester.year = ...
What's the gender of the students taught in the school founded in 1894?
CREATE TABLE table_1930857_1 (gender VARCHAR,year_founded VARCHAR)
SELECT gender FROM table_1930857_1 WHERE year_founded = "1894"
has patient 012-63986 been prescribed sublimaze, dextrose 50%, or lorazepam in this month?
CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime ti...
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-63986')) AND medication.drugname IN ('sublimaze', 'dextrose 50%', 'lor...
Return a bar chart about the distribution of date_address_from and the sum of monthly_rental , and group by attribute other_details and bin date_address_from by time.
CREATE TABLE Behavior_Incident (incident_id INTEGER,incident_type_code VARCHAR(10),student_id INTEGER,date_incident_start DATETIME,date_incident_end DATETIME,incident_summary VARCHAR(255),recommendations VARCHAR(255),other_details VARCHAR(255))CREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR(10),incident_type...
SELECT date_address_from, SUM(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC
How many yardage figures for the player with 72.3 QB rating?
CREATE TABLE table_19418696_3 (yards VARCHAR,qb_rating VARCHAR)
SELECT COUNT(yards) FROM table_19418696_3 WHERE qb_rating = "72.3"
When the record was 7-2, what was the score for the game?
CREATE TABLE table_36278 ("Game" real,"Date" text,"Opponent" text,"Score" text,"Location" text,"Record" text)
SELECT "Score" FROM table_36278 WHERE "Record" = '7-2'
What Player had a Score of 75-73-68-65=281 and more than 19,009 in Money?
CREATE TABLE table_49739 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" real)
SELECT "Player" FROM table_49739 WHERE "Money ( $ )" > '19,009' AND "Score" = '75-73-68-65=281'
What is the location of the match with the record 10-8-1?
CREATE TABLE table_name_84 (location VARCHAR,record VARCHAR)
SELECT location FROM table_name_84 WHERE record = "10-8-1"
Bar chart of mean price from each name, order names in desc order.
CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)
SELECT Name, AVG(Price) FROM Products GROUP BY Name ORDER BY Name DESC
How many final venues were there in the 1997-98 season?
CREATE TABLE table_19651669_1 (final_venue VARCHAR,season VARCHAR)
SELECT COUNT(final_venue) FROM table_19651669_1 WHERE season = "1997-98"
How many total League goals does Player John O'Flynn have?
CREATE TABLE table_name_45 (league_goals INTEGER,player VARCHAR)
SELECT SUM(league_goals) FROM table_name_45 WHERE player = "john o'flynn"
What is the maximum, minimum, and average amount of money outsanding for all customers?
CREATE TABLE customers (customer_id number,customer_address_id number,customer_status_code text,date_became_customer time,date_of_birth time,first_name text,last_name text,amount_outstanding number,email_address text,phone_number text,cell_mobile_phone_number text)CREATE TABLE vehicles (vehicle_id number,vehicle_detail...
SELECT MAX(amount_outstanding), MIN(amount_outstanding), AVG(amount_outstanding) FROM customers
on their last hospital visit there was any organism found in patient 6374's last mrsa screen test?
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 microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE icustays (row_id number,subj...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 6374 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND microbiologyevents.spec_type_desc = 'mrsa screen' AND NOT microbiologyevents....
How much reputation are you getting from your past work?. Take the 'unexpected' reputation coming from your answers from last month. Suppose now you constantly get those, and figure out how much rep per day you are getting for your past work without 'working for it' on that given day
CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance te...
SELECT Users.Id, usersAnswers.Answers, Users.Reputation, (Users.Reputation / UsersAnswers.Answers) AS Ratio FROM (SELECT U.Id, COUNT(Posts.Id) AS Answers FROM Posts, Users AS U WHERE Posts.OwnerUserId = U.Id AND Posts.PostTypeId = 2 GROUP BY U.Id) AS UsersAnswers, Users WHERE UsersAnswers.Id = Users.Id ORDER BY Ratio D...
How many gold medals does each school who has a total of 1 medal have?
CREATE TABLE table_1305623_12 (gold_medals VARCHAR,total_medals VARCHAR)
SELECT gold_medals FROM table_1305623_12 WHERE total_medals = 1
Which railroad is 112.6 kilometers from kingston?
CREATE TABLE table_16226584_1 (name VARCHAR,km_from_kingston VARCHAR)
SELECT name FROM table_16226584_1 WHERE km_from_kingston = "112.6"
Which is the charity that the background of the celebrity is heavyweight champion?
CREATE TABLE table_488 ("Celebrity" text,"Background" text,"Original Team" text,"Age" real,"Hometown" text,"Charity" text,"Result" text,"Raised" text)
SELECT "Charity" FROM table_488 WHERE "Background" = 'Heavyweight Champion'
What year was the startup for the Project Named of taq taq ph 2?
CREATE TABLE table_34414 ("Country" text,"Project Name" text,"Year startup" text,"Operator" text,"Peak" text)
SELECT "Year startup" FROM table_34414 WHERE "Project Name" = 'taq taq ph 2'
the difference in years from 1882 to 1889
CREATE TABLE table_203_665 (id number,"name" text,"municipality" text,"established" number,"tower height\nin meters (ft)" text,"focal plane\nin meters (ft)" text,"current status" text,"current condition" text)
SELECT 1889 - 1882
How many total runners had jockeys of Olivier Peslier with placings under 2?
CREATE TABLE table_69270 ("Race" text,"Dist (f)" real,"Course" text,"Prize (\u00a3K)" real,"Runners" real,"Placing" real,"Margin" text,"Jockey" text,"Trainer" text)
SELECT SUM("Runners") FROM table_69270 WHERE "Jockey" = 'olivier peslier' AND "Placing" < '2'
Difference of - 20, and a Position smaller than 17 is the highest against?
CREATE TABLE table_37850 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text)
SELECT MAX("Against") FROM table_37850 WHERE "Difference" = '- 20' AND "Position" < '17'
Who won the course Brescia?
CREATE TABLE table_name_49 (winner VARCHAR,course VARCHAR)
SELECT winner FROM table_name_49 WHERE course = "brescia"
Name the score on august 1
CREATE TABLE table_11843 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text)
SELECT "Score" FROM table_11843 WHERE "Date" = 'august 1'
which head coach had the top win percentage ?
CREATE TABLE table_203_593 (id number,"tenure" text,"coach" text,"years" number,"record" text,"pct." number,"ncaa tournament" number)
SELECT "coach" FROM table_203_593 WHERE "pct." = (SELECT MAX("pct.") FROM table_203_593)
What position did the celebrity finish that entered on day 1 and exited on day 15?
CREATE TABLE table_name_41 (finished VARCHAR,entered VARCHAR,exited VARCHAR)
SELECT finished FROM table_name_41 WHERE entered = "day 1" AND exited = "day 15"
What is the largest number lost with 0 draws and less than 12 points for Gwardia Katowice?
CREATE TABLE table_name_81 (lost INTEGER,points VARCHAR,draw VARCHAR,team VARCHAR)
SELECT MAX(lost) FROM table_name_81 WHERE draw = 0 AND team = "gwardia katowice" AND points < 12
Return a line chart on how many players enter hall of fame each year?, and I want to show x axis in desc order.
CREATE TABLE fielding_outfield (player_id TEXT,year INTEGER,stint INTEGER,glf NUMERIC,gcf NUMERIC,grf NUMERIC)CREATE TABLE home_game (year INTEGER,league_id TEXT,team_id TEXT,park_id TEXT,span_first TEXT,span_last TEXT,games INTEGER,openings INTEGER,attendance INTEGER)CREATE TABLE player_award_vote (award_id TEXT,year ...
SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid ORDER BY yearid DESC
What type of school would you see when visiting Missouri Western State University?
CREATE TABLE table_2076463_2 (control VARCHAR,school VARCHAR)
SELECT control FROM table_2076463_2 WHERE school = "Missouri Western State University"
What is the number of podiums with 0 wins, 0 F.L. and 35 points?
CREATE TABLE table_name_87 (podiums VARCHAR,points VARCHAR,wins VARCHAR,fl VARCHAR)
SELECT podiums FROM table_name_87 WHERE wins = "0" AND fl = "0" AND points = "35"
Users who have posted more than 24 hours after first post.
CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Votes (Id number,PostId n...
SELECT udfp.OwnerUserId AS "user_link", COUNT(p2.Id) AS futureposts FROM (SELECT p.OwnerUserId, MIN(p.CreationDate) AS dfp FROM Posts AS p WHERE p.PostTypeId < 3 GROUP BY p.OwnerUserId) AS udfp LEFT OUTER JOIN Posts AS p2 ON p2.OwnerUserId = udfp.OwnerUserId AND CAST((JULIANDAY(CreationDate) - JULIANDAY(udfp.dfp)) AS I...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, visualize a bar chart about the distribution of hire_date and the amount of hire_date bin hire_date by weekday.
CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID ...
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
provide the daily maximum amount of tpn d15.0 that patient 3369 has received until 11/2105.
CREATE TABLE diagnoses_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 icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit ...
SELECT MAX(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3369)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.labe...
Name the total number of rank for growth raate for 14.47
CREATE TABLE table_2527063_3 (rank VARCHAR,growth_rate VARCHAR)
SELECT COUNT(rank) FROM table_2527063_3 WHERE growth_rate = "14.47"
Count of questions by score.
CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE Sugg...
SELECT Score, COUNT(Id) FROM Posts WHERE PostTypeId = 2 AND OwnerUserId = 6309 GROUP BY Score ORDER BY Score DESC
What is the team 2 for the match with a team 1 of Panathinaikos?
CREATE TABLE table_48621 ("Team 1" text,"Agg." text,"Team 2" text,"1st leg" text,"2nd leg" text)
SELECT "Team 2" FROM table_48621 WHERE "Team 1" = 'panathinaikos'
How many average total matches have a swansea win less than 3, fa cup as the competition, with a draw less than 0?
CREATE TABLE table_name_23 (total_matches INTEGER,draw VARCHAR,swansea_win VARCHAR,competition VARCHAR)
SELECT AVG(total_matches) FROM table_name_23 WHERE swansea_win < 3 AND competition = "fa cup" AND draw < 0
What is the set 5 of the match with a set 2 of 26-24 and a set 1 of 27-25?
CREATE TABLE table_name_25 (set_5 VARCHAR,set_2 VARCHAR,set_1 VARCHAR)
SELECT set_5 FROM table_name_25 WHERE set_2 = "26-24" AND set_1 = "27-25"
what players was drafted after al guepe ?
CREATE TABLE table_203_815 (id number,"pick #" number,"nfl team" text,"player" text,"position" text,"college" text)
SELECT "player" FROM table_203_815 WHERE "pick #" = (SELECT "pick #" FROM table_203_815 WHERE "player" = 'al guepe') + 1
which division has the largest number of ranks ?
CREATE TABLE table_203_783 (id number,"season" text,"tier" number,"division" text,"place" text)
SELECT "division" FROM table_203_783 GROUP BY "division" ORDER BY COUNT(*) DESC LIMIT 1
YIDDISH 101 is a prerequisite for which programs ?
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 program.name FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN program ON program.program_id = program_course.program_id WHERE course.department = 'YIDDISH' AND course.number = 101
Which money is the highest one that has a To par of 1, and a Score of 73-70-73-71=287?
CREATE TABLE table_8917 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" real)
SELECT MAX("Money ( $ )") FROM table_8917 WHERE "To par" = '–1' AND "Score" = '73-70-73-71=287'
what did patient 015-56390 receive for his or her last procedure during the first hospital encounter?
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 lab (labid number,patientunitstayid number,labname text,labresult number,l...
SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-56390' AND NOT patient.hospitaldischargetime IS NULL ORDER BY...
Give me a scatter chart to show the least rating star of the movie and the star rating of the movie, group the title.
CREATE TABLE Reviewer (rID int,name text)CREATE TABLE Movie (mID int,title text,year int,director text)CREATE TABLE Rating (rID int,mID int,stars int,ratingDate date)
SELECT stars, MIN(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY title
when, for the last time until 09/2104, patient 031-16123 received sputum, tracheal specimen microbiology test?
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 microlab.culturetakentime FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-16123')) AND microlab.culturesite = 'sputum, tracheal specime...
What is the lowest date settled for chifley?
CREATE TABLE table_1174162_1 (date_first_settled_as_a_suburb INTEGER,suburb VARCHAR)
SELECT MIN(date_first_settled_as_a_suburb) FROM table_1174162_1 WHERE suburb = "Chifley"
What is the Accreditation Status, when the Product Name is LG RCS-e Client?
CREATE TABLE table_7800 ("Company Name" text,"Product Name" text,"Hardware Model" text,"Accreditation type" text,"Accreditation level" text,"Accreditation status" text)
SELECT "Accreditation status" FROM table_7800 WHERE "Product Name" = 'lg rcs-e client'
Who was the incumbent in the district that first elected someone in 1807?
CREATE TABLE table_2668378_18 (incumbent VARCHAR,first_elected VARCHAR)
SELECT incumbent FROM table_2668378_18 WHERE first_elected = "1807"
What was the original title for the king's speech?
CREATE TABLE table_name_58 (original_title VARCHAR,winner_and_nominees VARCHAR)
SELECT original_title FROM table_name_58 WHERE winner_and_nominees = "the king's speech"
what's the report with rnd being 4
CREATE TABLE table_1140074_2 (report VARCHAR,rnd VARCHAR)
SELECT report FROM table_1140074_2 WHERE rnd = 4
How many bands are there?
CREATE TABLE tracklists (albumid number,position number,songid number)CREATE TABLE band (id number,firstname text,lastname text)CREATE TABLE vocals (songid number,bandmate number,type text)CREATE TABLE performance (songid number,bandmate number,stageposition text)CREATE TABLE albums (aid number,title text,year number,l...
SELECT COUNT(*) FROM band
What is Phil Taylor's 3-dart average?
CREATE TABLE table_23723 ("Player" text,"Played" real,"Legs Won" real,"Legs Lost" real,"100+" real,"140+" real,"180s" real,"High Checkout" real,"3-dart Average" text)
SELECT "3-dart Average" FROM table_23723 WHERE "Player" = 'Phil Taylor'
What's the classification of the institution nicknamed Dolphins?
CREATE TABLE table_12936521_2 (classification VARCHAR,nickname VARCHAR)
SELECT classification FROM table_12936521_2 WHERE nickname = "Dolphins"
What is the Founded year of the school located in Paul Smiths, New York?
CREATE TABLE table_name_99 (founded VARCHAR,location VARCHAR)
SELECT founded FROM table_name_99 WHERE location = "paul smiths, new york"
when is the first time patient 25814 was admitted to hospital since 2101?
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_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 25814 AND STRFTIME('%y', admissions.admittime) >= '2101' ORDER BY admissions.admittime LIMIT 1
calculate how many times patient 12572 had received cont inv mec ven 96+ hrs during the previous year.
CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid number,intime time,outtime time)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admissi...
SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'cont inv mec ven 96+ hrs') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12572) AND DATETIME(proced...
count the number of patients whose age is less than 86 and diagnoses icd9 code is 45829?
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "86" AND diagnoses.icd9_code = "45829"
What is the location of the Saints having 1979- as Years in GFL?
CREATE TABLE table_name_37 (location VARCHAR,years_in_gfl VARCHAR,nickname VARCHAR)
SELECT location FROM table_name_37 WHERE years_in_gfl = "1979-" AND nickname = "saints"
what is the procedure icd9 code of subject id 6983?
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.icd9_code FROM procedures WHERE procedures.subject_id = "6983"
What is the colonized year for the chartered year 1958?
CREATE TABLE table_name_83 (colonized VARCHAR,chartered VARCHAR)
SELECT colonized FROM table_name_83 WHERE chartered = "1958"
What's the best rank possible?
CREATE TABLE table_30058355_5 (rank INTEGER)
SELECT MIN(rank) FROM table_30058355_5
When was someone first elected in the district with incumbent john smith?
CREATE TABLE table_2668378_18 (first_elected VARCHAR,incumbent VARCHAR)
SELECT first_elected FROM table_2668378_18 WHERE incumbent = "John Smith"
How many points on average had a position smaller than 8, 16 plays, and a lost larger than 9?
CREATE TABLE table_40029 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text)
SELECT AVG("Points") FROM table_40029 WHERE "Position" < '8' AND "Played" = '16' AND "Lost" > '9'
count the number of times patient 035-3496 had had a output y (ml)-chest tube y - a #1 right b #2 mid output since 133 months ago.
CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dos...
SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '035-3496')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.cel...
how many registed students do each course have? List course name and the number of their registered students?, sort X in asc order.
CREATE TABLE People (person_id INTEGER,first_name VARCHAR(255),middle_name VARCHAR(255),last_name VARCHAR(255),cell_mobile_number VARCHAR(40),email_address VARCHAR(40),login_name VARCHAR(40),password VARCHAR(40))CREATE TABLE People_Addresses (person_address_id INTEGER,person_id INTEGER,address_id INTEGER,date_from DATE...
SELECT course_name, COUNT(*) FROM Students AS T1 JOIN Student_Course_Registrations AS T2 ON T1.student_id = T2.student_id JOIN Courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id ORDER BY course_name
Which air date had an 11 share
CREATE TABLE table_16562 ("#" real,"Episode" text,"Air Date" text,"Time slot (EST)" text,"Rating" text,"Share" real,"18-49 (Rating/Share)" text,"Viewers (m)" text,"Rank (Overall)" text)
SELECT "Air Date" FROM table_16562 WHERE "Share" = '11'
Show the names of players coached by the rank 1 coach.
CREATE TABLE coach (Coach_ID VARCHAR,Rank VARCHAR)CREATE TABLE player_coach (Coach_ID VARCHAR,Player_ID VARCHAR)CREATE TABLE player (Player_name VARCHAR,Player_ID VARCHAR)
SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID = T2.Coach_ID JOIN player AS T3 ON T1.Player_ID = T3.Player_ID WHERE T2.Rank = 1
Name the event for redouane bouchtouk
CREATE TABLE table_21686 ("Athlete" text,"Event" text,"Round of 32" text,"Round of 16" text,"Quarterfinals" text,"Semifinals" text)
SELECT "Event" FROM table_21686 WHERE "Athlete" = 'Redouane Bouchtouk'
What is the 1st week sales for the album finding forever before the number 6?
CREATE TABLE table_name_51 (album VARCHAR,number VARCHAR)
SELECT SUM(1 AS st_week_sales) FROM table_name_51 WHERE album = "finding forever" AND number < 6
Which Score has a Record of 5-4?
CREATE TABLE table_name_36 (score VARCHAR,record VARCHAR)
SELECT score FROM table_name_36 WHERE record = "5-4"
show me the ground transportation in the SALT LAKE CITY airport
CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,weight int,capacity int,pay_load int,cruising_speed int,range_miles int,pressurized varchar)CREATE TABLE food_service (meal_code tex...
SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city, ground_service WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'SALT LAKE CITY' AND ground_service.airport_code = airport.airport_code
who published the most in syntactic parsing ?
CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE writes (paperid int,authorid int)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE field (fieldid int)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE keyphrase (keyphraseid i...
SELECT DISTINCT COUNT(paper.paperid), writes.authorid FROM keyphrase, paper, paperkeyphrase, writes WHERE keyphrase.keyphrasename = 'syntactic parsing' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.paperid = paper.paperid GROUP BY writes.authorid ORDER BY C...
Find good Hibernate questions I didn't answer.
CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE PostHistory (Id number,Po...
SELECT * FROM (SELECT DENSE_RANK() OVER (ORDER BY q.Score DESC) AS Ranking, q.Id AS "post_link", q.Id AS PostId, q.Score AS PostScore FROM Posts AS q JOIN PostTags AS pt ON q.Id = pt.PostId JOIN Tags AS t ON pt.TagId = t.Id WHERE t.TagName = '##TagName##') AS TopQ WHERE Ranking < 50 AND NOT EXISTS(SELECT 1 FROM Posts A...
What is the title in English for , aejangpan hongchawangja?
CREATE TABLE table_63646 ("Title" text,"Localized Title" text,"Creator" text,"Years" text,"Origin" text)
SELECT "Title" FROM table_63646 WHERE "Localized Title" = '애장판 홍차왕자, aejangpan hongchawangja'
What is the To par for the player that won in 2003, with a total larger than 145?
CREATE TABLE table_13574 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" real)
SELECT COUNT("To par") FROM table_13574 WHERE "Year(s) won" = '2003' AND "Total" > '145'
Which Played has a Position smaller than 4, and Wins larger than 16, and Points of 38, and Goals against larger than 35?
CREATE TABLE table_61274 ("Position" real,"Club" text,"Played" real,"Points" real,"Wins" real,"Draws" real,"Losses" real,"Goals for" real,"Goals against" real,"Goal Difference" real)
SELECT AVG("Played") FROM table_61274 WHERE "Position" < '4' AND "Wins" > '16' AND "Points" = '38' AND "Goals against" > '35'
the album whatever came before what album ?
CREATE TABLE table_203_512 (id number,"release date" text,"album" text,"catalog number" text,"chart position" number,"notes" text)
SELECT "album" FROM table_203_512 WHERE "release date" > (SELECT "release date" FROM table_203_512 WHERE "album" = 'whatever') ORDER BY "release date" LIMIT 1
Where was the game played when 71,060 people attended?
CREATE TABLE table_name_31 (game_site VARCHAR,attendance VARCHAR)
SELECT game_site FROM table_name_31 WHERE attendance = "71,060"
How many schools are named otafuku tholi?
CREATE TABLE table_21094 ("Name" text,"Latitude" text,"Longitude" text,"Diameter (km)" text,"Year named" real,"Name origin" text)
SELECT COUNT("Year named") FROM table_21094 WHERE "Name" = 'Otafuku Tholi'
what is the number of patients who had been diagnosed with mv-oth veh coll-ped cycl until 2104?
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'mv-oth veh coll-ped cycl') AND STRFTIME('%y', diagnoses_ic...
What was the method of resolution when Katsuhisa Fujii's record was 0-1?
CREATE TABLE table_45424 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Location" text)
SELECT "Method" FROM table_45424 WHERE "Record" = '0-1'
what is the only subject on 23 may 1920 ?
CREATE TABLE table_203_476 (id number,"no." number,"title (latin)" text,"title (english translation)" text,"subject" text,"date" text)
SELECT "subject" FROM table_203_476 WHERE "date" = '23 may 1920'
calculate the minimum days for which patients suffering from left colon cancer stayed in hospital.
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 MIN(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "LEFT COLON CANCER"
What was the date of the game for the HartlePool United team?
CREATE TABLE table_63723 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text)
SELECT "Date" FROM table_63723 WHERE "Home team" = 'hartlepool united'
Tell me the average for 1 yards
CREATE TABLE table_57359 ("Player" text,"Car." real,"Yards" text,"Avg." text,"TD's" real,"Long" text)
SELECT "Avg." FROM table_57359 WHERE "Yards" = '1'
Finding short posts select * from posts where len(body) <= ##bodylen##.
CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Tags text,Ans...
SELECT * FROM Posts WHERE (LENGTH(Body) <= '##bodylen##' AND PostTypeId = 2)
What is the maximum starts that result in an average finish of 16.5?
CREATE TABLE table_1875157_2 (starts INTEGER,avg_finish VARCHAR)
SELECT MAX(starts) FROM table_1875157_2 WHERE avg_finish = "16.5"
How many totals have a Premier League smaller than 6, and a League Cup larger than 0?
CREATE TABLE table_62723 ("Name" text,"Premier League" real,"League Cup" real,"FA Cup" real,"UEFA Cup" real,"Total" real)
SELECT SUM("Total") FROM table_62723 WHERE "Premier League" < '6' AND "League Cup" > '0'
Name the minimum total for ireland
CREATE TABLE table_19391 ("Country" text,"Total" real,"4000ft+" real,"3500\u20134000ft" real,"3000\u20133500ft" real,"2500\u20133000ft" real,"2000\u20132500ft" real)
SELECT MIN("Total") FROM table_19391 WHERE "Country" = 'Ireland'