instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Which Round is the highest one that has a College of arizona, and an Overall larger than 120? | CREATE TABLE table_name_25 (round INTEGER,college VARCHAR,overall VARCHAR) | SELECT MAX(round) FROM table_name_25 WHERE college = "arizona" AND overall > 120 |
Who attended the school in 2006, that Whitney Powell attended in 2007? | CREATE TABLE table_68378 ("2005" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text) | SELECT "2006" FROM table_68378 WHERE "2007" = 'whitney powell' |
keyphrases used by Akihito Kotera and Masatsugu Kidode | CREATE TABLE field (fieldid int)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE paperkeyphrase (paperid int,keyphraseid int)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE cite (... | SELECT DISTINCT paperkeyphrase.keyphraseid FROM author, paperkeyphrase, writes WHERE author.authorname IN ('Akihito Kotera', 'Masatsugu Kidode') AND writes.authorid = author.authorid AND writes.paperid = paperkeyphrase.paperid GROUP BY paperkeyphrase.keyphraseid HAVING COUNT(DISTINCT writes.authorid) = 2 |
give me the number of patients whose insurance is private and procedure short title is int inser lead atri-vent? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.short_title = "Int inser lead atri-vent" |
What is Tie No, when Score is 'Marlow United won 4 2 on penalties'? | CREATE TABLE table_name_89 (tie_no VARCHAR,score VARCHAR) | SELECT tie_no FROM table_name_89 WHERE score = "marlow united won 4–2 on penalties" |
When 169.182 is the average speed miles per hour what is the chassis? | CREATE TABLE table_1771753_3 (chassis VARCHAR,average_speed__mph_ VARCHAR) | SELECT chassis FROM table_1771753_3 WHERE average_speed__mph_ = "169.182" |
Who drive 74 laps in a grid larger than 9? | CREATE TABLE table_name_25 (driver VARCHAR,laps VARCHAR,grid VARCHAR) | SELECT driver FROM table_name_25 WHERE laps = 74 AND grid > 9 |
when was the first time until 1070 days ago patient 010-6010 reached the maximum sao2? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE patient (uniquepid text,patienthealthsystemsta... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-6010')) AND NOT vitalperiodic.sao2 IS NULL AND ... |
how many times did patient 017-16041 have enteral tube intake: nasoduodenal nostril, r in his system on 12/25/2105? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,discha... | 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 = '017-16041')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.ce... |
Which round has a Kick Off of 1993-02-17 20:30? | CREATE TABLE table_name_8 (round VARCHAR,kick_off VARCHAR) | SELECT round FROM table_name_8 WHERE kick_off = "1993-02-17 20:30" |
594 has a lab , does it ? | CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_cr... | SELECT COUNT(*) > 0 FROM course WHERE department = 'EECS' AND has_lab = 'Y' AND number = 594 |
Draw a bar chart about the distribution of ACC_Road and the sum of School_ID , and group by attribute ACC_Road, and display from high to low by the X-axis. | 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_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En... | SELECT ACC_Road, SUM(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY ACC_Road DESC |
What is the earliest election with more than 7 candidates nominated, a percentage of the popular vote of 2.75%, and 0 seats won? | CREATE TABLE table_name_69 (election INTEGER,_number_of_seats_won VARCHAR,_number_of_candidates_nominated VARCHAR,_percentage_of_popular_vote VARCHAR) | SELECT MIN(election) FROM table_name_69 WHERE _number_of_candidates_nominated > 7 AND _percentage_of_popular_vote = "2.75%" AND _number_of_seats_won < 0 |
What is year that has points larger than 46, and a rank of 6th? | CREATE TABLE table_6514 ("Year" real,"Class" text,"Team" text,"Points" real,"Rank" text,"Wins" real) | SELECT SUM("Year") FROM table_6514 WHERE "Points" > '46' AND "Rank" = '6th' |
What is the score when the attendance shows TBC, and Sidley United was the opponent? | CREATE TABLE table_name_81 (score VARCHAR,attendance VARCHAR,opponent VARCHAR) | SELECT score FROM table_name_81 WHERE attendance = "tbc" AND opponent = "sidley united" |
What's the Loss listed with a Score of 5-1? | CREATE TABLE table_name_60 (loss VARCHAR,score VARCHAR) | SELECT loss FROM table_name_60 WHERE score = "5-1" |
What is the average total with a Rank larger than 11, a Nation of switzerland, and a Silver smaller than 0? | CREATE TABLE table_69437 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT AVG("Total") FROM table_69437 WHERE "Rank" > '11' AND "Nation" = 'switzerland' AND "Silver" < '0' |
What is the exit date of the player who transferred to Cardiff City? | CREATE TABLE table_name_9 (exit_date VARCHAR,to_club VARCHAR) | SELECT exit_date FROM table_name_9 WHERE to_club = "cardiff city" |
Which opponent has a result of 2-0 l? | CREATE TABLE table_62050 ("Date" text,"Opponent" text,"Venue" text,"Result" text,"Competition" text) | SELECT "Opponent" FROM table_62050 WHERE "Result" = '2-0 l' |
since 70 months ago, what was the daily minimum value of the wbc casts of patient 14458? | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttim... | SELECT MIN(labevents.valuenum) FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 14458) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'wbc casts') AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), '... |
Return a bar chart about the distribution of All_Road and School_ID , and could you show x axis from high to low order? | CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Perce... | SELECT All_Road, School_ID FROM basketball_match ORDER BY All_Road DESC |
What is the area km for a population of 99,685 (2008)? | CREATE TABLE table_name_99 (area_km² VARCHAR,population VARCHAR) | SELECT area_km² FROM table_name_99 WHERE population = "99,685 (2008)" |
Which player competed in 12 events? | CREATE TABLE table_name_49 (player VARCHAR,events VARCHAR) | SELECT player FROM table_name_49 WHERE events = 12 |
What is the sport with the most scholarship students? | CREATE TABLE sportsinfo (stuid number,sportname text,hoursperweek number,gamesplayed number,onscholarship text)CREATE TABLE video_games (gameid number,gname text,gtype text)CREATE TABLE plays_games (stuid number,gameid number,hours_played number)CREATE TABLE student (stuid number,lname text,fname text,age number,sex te... | SELECT sportname FROM sportsinfo WHERE onscholarship = 'Y' GROUP BY sportname ORDER BY COUNT(*) DESC LIMIT 1 |
What is we two when the case/suffix is loc.? | CREATE TABLE table_1015914_24 (we_two VARCHAR,case_suffix VARCHAR) | SELECT we_two FROM table_1015914_24 WHERE case_suffix = "loc." |
what is the date when the competition is 1998 asian games? | CREATE TABLE table_name_17 (date VARCHAR,competition VARCHAR) | SELECT date FROM table_name_17 WHERE competition = "1998 asian games" |
Who is the player from Spain that has a +2 to par? | CREATE TABLE table_47687 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text) | SELECT "Player" FROM table_47687 WHERE "To par" = '+2' AND "Country" = 'spain' |
Frequency of anonymous suggested edits. Returns the cumulative number of suggested edits that were submitted by anonymous users over the past NumberOfEdits suggested edits. If the anonymous suggestion rate was constant at x%, then the graph would show a straight line at slope 100x (e.g. if all edit suggestions were ano... | 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 'post_link', Score, NumEdits FROM (SELECT p.Id AS "post_link", p.Score AS Score, COUNT(ph.UserId) AS NumEdits FROM Posts AS p, PostHistory AS ph WHERE p.Id = ph.PostId AND p.Score >= 100 AND ph.UserId != p.OwnerUserId GROUP BY p.Id, p.Score) AS Y WHERE NumEdits >= 10 |
how many asian ethnic background patients were born before the year 2152? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "ASIAN" AND demographic.dob_year < "2152" |
how many patients are discharged to snf and followed the procedure icd9 code 966? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "SNF" AND procedures.icd9_code = "966" |
What is the highest round number for the player who came from team Missouri? | CREATE TABLE table_name_38 (round INTEGER,school_club_team VARCHAR) | SELECT MAX(round) FROM table_name_38 WHERE school_club_team = "missouri" |
What is the sum of the yr plyf of coach ed robinson, who has a G plyf of 0? | CREATE TABLE table_name_6 (yr_plyf INTEGER,g_plyf VARCHAR,coach VARCHAR) | SELECT SUM(yr_plyf) FROM table_name_6 WHERE g_plyf = 0 AND coach = "ed robinson" |
Which Record has a Game smaller than 19, and Points smaller than 19, and a Score of 4 6? | CREATE TABLE table_name_24 (record VARCHAR,score VARCHAR,game VARCHAR,points VARCHAR) | SELECT record FROM table_name_24 WHERE game < 19 AND points < 19 AND score = "4–6" |
Which Lead has a City of winnipeg, and a Third/Vice skip of kevin park? | CREATE TABLE table_name_17 (lead VARCHAR,city VARCHAR,third_vice_skip VARCHAR) | SELECT lead FROM table_name_17 WHERE city = "winnipeg" AND third_vice_skip = "kevin park" |
Name the average with tally of 0-29 and total more than 29 | CREATE TABLE table_name_40 (average INTEGER,tally VARCHAR,total VARCHAR) | SELECT AVG(average) FROM table_name_40 WHERE tally = "0-29" AND total > 29 |
what is patient 17638's first ward on the last hospital visit? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE patients (row_id number,subject... | SELECT transfers.wardid FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17638 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND NOT transfers.wardid IS NULL ORDER BY transfers.intime LIMIT 1 |
Top 100 User in Faisalabad. | CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostI... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%faisalabad%' OR UPPER(Location) LIKE '%Faisalabad' ORDER BY Reputation DESC LIMIT 100 |
Which Team has a Year of 2000? | CREATE TABLE table_name_45 (team VARCHAR,year VARCHAR) | SELECT team FROM table_name_45 WHERE year = 2000 |
how many hours have passed since patient 42473 was admitted for to the hospital? | CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icust... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', admissions.admittime)) FROM admissions WHERE admissions.subject_id = 42473 AND admissions.dischtime IS NULL |
What is the accreditation level for the approved (awarded 05.12.12) date? | CREATE TABLE table_47481 ("Company name" text,"Hardware Model" text,"Accreditation type" text,"Accreditation level" text,"Date" text) | SELECT "Accreditation level" FROM table_47481 WHERE "Date" = 'approved (awarded 05.12.12)' |
What player had a total less than 277? | CREATE TABLE table_12273 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text) | SELECT "Player" FROM table_12273 WHERE "Total" < '277' |
What is the least amount of points made by Herrnstein? | CREATE TABLE table_1020 ("Player" text,"Position" text,"Starter" text,"Touchdowns" real,"Extra points" real,"Field goals" real,"Points" real) | SELECT MIN("Points") FROM table_1020 WHERE "Player" = 'Herrnstein' |
did patient 52598 get a lab test since 4 years ago. | CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE chartevents (row_id numb... | SELECT COUNT(*) > 0 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 52598) AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), '-4 year') |
What country is ranked larger than 4? | CREATE TABLE table_79429 ("Rank" real,"Rowers" text,"Country" text,"Time" text,"Notes" text) | SELECT "Country" FROM table_79429 WHERE "Rank" > '4' |
Give me the comparison about ID over the meter_700 by a bar chart. | CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year int)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 text,meter_400 text,meter_500 text,meter_600 text,meter_700 text... | SELECT meter_700, ID FROM swimmer |
how many patients with an emergency admission type had the diagnosis icd9 code 56210? | 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 text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.icd9_code = "56210" |
Finland users grouped by location. | 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 Location, COUNT(*) AS amount FROM Users WHERE Location LIKE ('%Finland%') GROUP BY Location ORDER BY amount DESC |
Before 2012, what was the greatest # of Home Games with a Canada - USA Rank of 52nd, and an Average Attendance less than 992? | CREATE TABLE table_7176 ("Year" real,"League" text,"Average Attendance" real,"# of Home Games" real,"League Rank" text,"Canada - USA Rank" text) | SELECT MAX("# of Home Games") FROM table_7176 WHERE "Year" < '2012' AND "Canada - USA Rank" = '52nd' AND "Average Attendance" < '992' |
Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market. | CREATE TABLE market (market_id number,district text,num_of_employees number,num_of_shops number,ranking number)CREATE TABLE phone (name text,phone_id number,memory_in_g number,carrier text,price number)CREATE TABLE phone_market (market_id number,phone_id text,num_of_stock number) | SELECT T3.name, T2.district FROM phone_market AS T1 JOIN market AS T2 ON T1.market_id = T2.market_id JOIN phone AS T3 ON T1.phone_id = T3.phone_id ORDER BY T2.ranking |
List the document ids for any documents with the status code done and the type code paper. | CREATE TABLE Documents (document_id VARCHAR,document_status_code VARCHAR,document_type_code VARCHAR) | SELECT document_id FROM Documents WHERE document_status_code = "done" AND document_type_code = "Paper" |
Name the city of license for call sign of k215es | CREATE TABLE table_name_7 (city_of_license VARCHAR,call_sign VARCHAR) | SELECT city_of_license FROM table_name_7 WHERE call_sign = "k215es" |
how many patients were diagnosed with fall on stair/step nec? | 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 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Fall on stair/step NEC" |
Which Bronze is the lowest one that has a Nation of total, and a Gold smaller than 14? | CREATE TABLE table_name_38 (bronze INTEGER,nation VARCHAR,gold VARCHAR) | SELECT MIN(bronze) FROM table_name_38 WHERE nation = "total" AND gold < 14 |
What is the total heat number of sun yang, who has a lane less than 2? | CREATE TABLE table_name_37 (heat VARCHAR,name VARCHAR,lane VARCHAR) | SELECT COUNT(heat) FROM table_name_37 WHERE name = "sun yang" AND lane < 2 |
Downvoted questions from new users. | CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number... | SELECT q.Id AS "post_link", OwnerUserId AS "user_link", Reputation, Score, q.CreationDate FROM Posts AS q JOIN Users AS u ON OwnerUserId = u.Id WHERE q.CreationDate > '2018-01-01' AND PostTypeId = 1 AND Reputation <= 200 AND Score < 0 AND q.Id IN (SELECT PostId FROM Votes WHERE VoteTypeId = 3) ORDER BY q.CreationDate D... |
What is the nationality of player corey fienhage, who has a pick less than 104? | CREATE TABLE table_76776 ("Round" real,"Pick" real,"Player" text,"Position" text,"Nationality" text,"College/Junior Team" text) | SELECT "Nationality" FROM table_76776 WHERE "Pick" < '104' AND "Player" = 'corey fienhage' |
What episode number in the series originally aired on April 27, 1999? | CREATE TABLE table_228973_5 (no_in_series INTEGER,original_air_date VARCHAR) | SELECT MAX(no_in_series) FROM table_228973_5 WHERE original_air_date = "April 27, 1999" |
What is the NFL team for the player who's college was Norfolk State? | CREATE TABLE table_16376436_1 (nfl_team VARCHAR,college VARCHAR) | SELECT nfl_team FROM table_16376436_1 WHERE college = "Norfolk State" |
User Count: Reputation 1 and Greater Than 1 by Location. | CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE PostTypes (Id number,Name text)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,Las... | SELECT Reputation, COUNT(*) AS NumUsers FROM Users WHERE Reputation IN (90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110) AND Location LIKE '%##location##%' GROUP BY Reputation ORDER BY Reputation |
How many runs when bangladesh was the fielding team? | CREATE TABLE table_20970 ("Runs" text,"Wicket" text,"Batting partners" text,"Batting team" text,"Fielding team" text,"Venue" text,"Season" text) | SELECT "Runs" FROM table_20970 WHERE "Fielding team" = 'Bangladesh' |
What is the winning pct for jersey 15? | CREATE TABLE table_14389782_2 (winning_pct VARCHAR,jersey_no VARCHAR) | SELECT winning_pct FROM table_14389782_2 WHERE jersey_no = "15" |
What was John Strohmeyer's average pick before round 12? | CREATE TABLE table_name_9 (pick INTEGER,name VARCHAR,round VARCHAR) | SELECT AVG(pick) FROM table_name_9 WHERE name = "john strohmeyer" AND round < 12 |
what is the school when the team is new york yankees? | CREATE TABLE table_66318 ("Pick" real,"Player" text,"Team" text,"Position" text,"School" text) | SELECT "School" FROM table_66318 WHERE "Team" = 'new york yankees' |
What is the fewest losses that Ballarat FL of Lake Wendouree has when the wins are smaller than 9? | CREATE TABLE table_name_9 (losses INTEGER,ballarat_fl VARCHAR,wins VARCHAR) | SELECT MIN(losses) FROM table_name_9 WHERE ballarat_fl = "lake wendouree" AND wins < 9 |
What is the Season Outcome, when the School is Sussex Tech? | CREATE TABLE table_70862 ("School" text,"Team" text,"Division Record" text,"Overall Record" text,"Season Outcome" text) | SELECT "Season Outcome" FROM table_70862 WHERE "School" = 'sussex tech' |
What is the original airdate for episode 7-17 (195) from writer Sidney Slon? | CREATE TABLE table_name_5 (original_airdate VARCHAR,writer_s_ VARCHAR,episode VARCHAR) | SELECT original_airdate FROM table_name_5 WHERE writer_s_ = "sidney slon" AND episode = "7-17 (195)" |
What number game happened on November 19? | CREATE TABLE table_43827 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"Location Attendance" text,"Record" text) | SELECT MAX("Game") FROM table_43827 WHERE "Date" = 'november 19' |
What are all the vicinity (km ) where profits magnificence (2007) is 2nd | CREATE TABLE table_255812_1 (area__km²_ VARCHAR,income_class__2007_ VARCHAR) | SELECT area__km²_ FROM table_255812_1 WHERE income_class__2007_ = "2nd" |
Name the score when the opponent was the dodgers on april 21 | CREATE TABLE table_name_61 (score VARCHAR,opponent VARCHAR,date VARCHAR) | SELECT score FROM table_name_61 WHERE opponent = "dodgers" AND date = "april 21" |
Teerasil Dangda who had a to club of released plays what position? | CREATE TABLE table_name_76 (pos VARCHAR,to_club VARCHAR,player VARCHAR) | SELECT pos FROM table_name_76 WHERE to_club = "released" AND player = "teerasil dangda" |
What is the to par when the winning score was 67-68-70-66=271? | CREATE TABLE table_7731 ("Date" text,"Tournament" text,"Winning score" text,"To par" text,"Margin of victory" text,"Runner(s)-up" text) | SELECT "To par" FROM table_7731 WHERE "Winning score" = '67-68-70-66=271' |
How many square miles of water is in Ramsey County with a geo id larger than 3807159460.0? | CREATE TABLE table_22458 ("Township" text,"County" text,"Pop. (2010)" real,"Land (sqmi)" text,"Water (sqmi)" text,"Latitude" text,"Longitude" text,"GEO ID" real,"ANSI code" real) | SELECT "Water (sqmi)" FROM table_22458 WHERE "County" = 'Ramsey' AND "GEO ID" > '3807159460.0' |
What is the person's name that is from the country of SCO? | CREATE TABLE table_79919 ("Name" text,"Country" text,"Status" text,"Transfer window" text,"Transfer fee" text,"Source" text) | SELECT "Name" FROM table_79919 WHERE "Country" = 'sco' |
When classes start next Winter , who is teaching MDE classes ? | CREATE TABLE program_course (program_id int,course_id int,workload int,category varchar)CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits var... | SELECT DISTINCT instructor.name 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_offering.course_id INNER JOIN offering_instructor ON offering_instr... |
count the number of patients less than 63 years who have lab test item id 51098. | 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.age < "63" AND lab.itemid = "51098" |
Return a histogram on what are the names of different tracks, and how many races has each had?, and sort from low to high by the bar. | CREATE TABLE track (Track_ID int,Name text,Location text,Seating real,Year_Opened real)CREATE TABLE race (Race_ID int,Name text,Class text,Date text,Track_ID text) | SELECT T2.Name, COUNT(*) FROM race AS T1 JOIN track AS T2 ON T1.Track_ID = T2.Track_ID GROUP BY T1.Track_ID ORDER BY T2.Name |
What is the Order and Title with an Elevated with 1261, december 17, and a Faction with angevin? | CREATE TABLE table_56636 ("Elector" text,"Nationality" text,"Faction" text,"Order and Title" text,"Elevated" text,"Elevator" text) | SELECT "Order and Title" FROM table_56636 WHERE "Elevated" = '1261, december 17' AND "Faction" = 'angevin' |
Show different types of ships and the average tonnage of ships of each type in a bar chart, could you list y axis in asc order? | CREATE TABLE mission (Mission_ID int,Ship_ID int,Code text,Launched_Year int,Location text,Speed_knots int,Fate text)CREATE TABLE ship (Ship_ID int,Name text,Type text,Nationality text,Tonnage int) | SELECT Type, AVG(Tonnage) FROM ship GROUP BY Type ORDER BY AVG(Tonnage) |
Who were the 76ers opponents on January 17? | CREATE TABLE table_27698941_8 (team VARCHAR,date VARCHAR) | SELECT team FROM table_27698941_8 WHERE date = "January 17" |
What player has a score of 69-68-68=205? | CREATE TABLE table_name_43 (player VARCHAR,score VARCHAR) | SELECT player FROM table_name_43 WHERE score = 69 - 68 - 68 = 205 |
Most popular StackOverflow tags in May 2010. | 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 Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score ... | SELECT num.TagName AS Tag, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS MayRank, ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS TotalRank, rate.Rate AS QuestionsInMay, num.Num AS QuestionsTotal FROM (SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AN... |
What is the highest entry in November for the game 20? | CREATE TABLE table_27539535_4 (november INTEGER,game VARCHAR) | SELECT MAX(november) FROM table_27539535_4 WHERE game = 20 |
reginald hudlin directed how many written by. | CREATE TABLE table_24702 ("Series #" real,"Season #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Prod. code" text) | SELECT "Written by" FROM table_24702 WHERE "Directed by" = 'Reginald Hudlin' |
when was the first time patient 006-229746 had a respiration measured on the last intensive care unit visit. | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-229746') AND NOT patient.unitdischargetime IS N... |
Name the 1st stage for parameter being diameter | CREATE TABLE table_20884 ("Parameter" text,"1st stage" text,"2nd stage" text,"3rd stage" text,"4th stage" text) | SELECT "1st stage" FROM table_20884 WHERE "Parameter" = 'Diameter' |
how much did the hospitalization during this year cost patient 008-40862? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,... | SELECT SUM(cost.cost) FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '008-40862') AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') |
What team were the Bulls hosted by on December 7? | CREATE TABLE table_396 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Team" FROM table_396 WHERE "Date" = 'December 7' |
Which timeslot did episode no. 15 hold? | CREATE TABLE table_16597 ("No." real,"Episode" text,"Air Date" text,"Timeslot" text,"Rating" text,"Share" real,"18\u201349 (Rating/Share)" text,"Viewers (m)" text,"Rank (#)" text) | SELECT "Timeslot" FROM table_16597 WHERE "No." = '15' |
Find tags in need of love. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivileg... | SELECT TagName, COUNT(Posts.Id) AS UnansweredCount, Tags.Count, CAST(COUNT(Posts.Id) AS FLOAT) / CAST(Tags.Count AS FLOAT) AS UnansweredRatio FROM Tags INNER JOIN PostTags ON PostTags.TagId = Tags.Id INNER JOIN Posts ON Posts.Id = PostTags.PostId INNER JOIN Posts AS Answers ON Answers.ParentId = Posts.Id WHERE Posts.Ac... |
How many insurgents have 2003 as a period? | CREATE TABLE table_2479 ("Period" text,"Civilians" real,"Security forces" real,"Insurgents" real,"Total per period" real) | SELECT COUNT("Insurgents") FROM table_2479 WHERE "Period" = '2003' |
Name the affiliation for 27209 enrollment | CREATE TABLE table_28253870_1 (affiliation VARCHAR,enrollment VARCHAR) | SELECT affiliation FROM table_28253870_1 WHERE enrollment = 27209 |
Draw a bar chart of destination versus the total number | CREATE TABLE employee (eid number(9,0),name varchar2(30),salary number(10,2))CREATE TABLE aircraft (aid number(9,0),name varchar2(30),distance number(6,0))CREATE TABLE certificate (eid number(9,0),aid number(9,0))CREATE TABLE flight (flno number(4,0),origin varchar2(20),destination varchar2(20),distance number(6,0),dep... | SELECT destination, COUNT(*) FROM flight GROUP BY destination |
When chauncey billups (7) has the highest amount of assists what is the score? | CREATE TABLE table_25868 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Score" FROM table_25868 WHERE "High assists" = 'Chauncey Billups (7)' |
Show me the frequency of the weekdays (binning year into weekdays interval) that the team Boston Red Stockings won in the postseasons with a bar chart, and order total number from low to high order please. | CREATE TABLE batting_postseason (year INTEGER,round TEXT,player_id TEXT,team_id TEXT,league_id TEXT,g INTEGER,ab INTEGER,r INTEGER,h INTEGER,double INTEGER,triple INTEGER,hr INTEGER,rbi INTEGER,sb INTEGER,cs NUMERIC,bb INTEGER,so INTEGER,ibb NUMERIC,hbp NUMERIC,sh NUMERIC,sf NUMERIC,g_idp NUMERIC)CREATE TABLE manager_h... | SELECT year, COUNT(year) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' ORDER BY COUNT(year) |
in how many competitions has irina gordeeva finished higher than 10th but lower than fourth ? | CREATE TABLE table_204_492 (id number,"year" number,"competition" text,"venue" text,"position" text,"notes" text) | SELECT COUNT("competition") FROM table_204_492 WHERE "position" < 10 AND "position" > 4 |
Which new team has a compensation-a round, and Frank Catalanotto as a player? | CREATE TABLE table_10819 ("Pick" real,"Round" text,"Player" text,"Free Agent Class" text,"New Team" text) | SELECT "New Team" FROM table_10819 WHERE "Round" = 'compensation-a' AND "Player" = 'frank catalanotto' |
What is the screen size of the s45 (Australia only) Model with no bluetooth? | CREATE TABLE table_name_8 (screen_size VARCHAR,bluetooth VARCHAR,model VARCHAR) | SELECT screen_size FROM table_name_8 WHERE bluetooth = "no" AND model = "s45 (australia only)" |
How many pixels would be found in a hardware colour of 8? | CREATE TABLE table_1701371_2 (pixels VARCHAR,hardware_colours VARCHAR) | SELECT pixels FROM table_1701371_2 WHERE hardware_colours = 8 |
At which Conference was the Division in the East, and the Home Stadium named fedexfield? | CREATE TABLE table_name_94 (conference VARCHAR,division VARCHAR,home_stadium VARCHAR) | SELECT conference FROM table_name_94 WHERE division = "east" AND home_stadium = "fedexfield" |
What is the highest amount of bronze china, which has more than 1 gold and more than 11 total, has? | CREATE TABLE table_name_93 (bronze INTEGER,total VARCHAR,gold VARCHAR,nation VARCHAR) | SELECT MAX(bronze) FROM table_name_93 WHERE gold > 1 AND nation = "china" AND total > 11 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.