instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the total number of rounds of the player with a pick of 20? | CREATE TABLE table_name_87 (round VARCHAR,pick VARCHAR) | SELECT COUNT(round) FROM table_name_87 WHERE pick = 20 |
Answers Given To A Particular User. | CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoRename time,Score number,ApprovedByUserId number,ApprovalDate time)CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteU... | SELECT DISTINCT qtns.Id, qtns.Title, qtns.CreationDate, CASE WHEN qtns.AcceptedAnswerId = ans.Id THEN 'Yes' ELSE 'No' END AS Accepted FROM Posts AS qtns JOIN Posts AS ans ON qtns.Id = ans.ParentId WHERE qtns.OwnerUserId = @QtnsUser AND ans.OwnerUserId = @AnsUser ORDER BY qtns.CreationDate |
What is the Points with a Tries For that is 21? | CREATE TABLE table_name_13 (points VARCHAR,tries_for VARCHAR) | SELECT points FROM table_name_13 WHERE tries_for = "21" |
Duplicate link score of answers for a specific user. | CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCo... | SELECT PL.RelatedPostId AS "post_link", COUNT(*) AS LinkScore FROM PostLinks AS PL INNER JOIN Posts AS PS ON PS.Id = PL.PostId INNER JOIN Posts AS PT ON PT.ParentId = PL.RelatedPostId WHERE PL.LinkTypeId = 3 AND PT.OwnerUserId = '##UserId?2751851##' GROUP BY PL.RelatedPostId ORDER BY LinkScore DESC |
Name the maximum kerry # for where others is 47 | CREATE TABLE table_1733457_1 (kerry_number INTEGER,others_number VARCHAR) | SELECT MAX(kerry_number) FROM table_1733457_1 WHERE others_number = 47 |
How many gold medals were won in 1970? | CREATE TABLE table_name_61 (gold VARCHAR,year VARCHAR) | SELECT gold FROM table_name_61 WHERE year = "1970" |
Which courses offered this semester unlock most other classes ? | CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,repeat_term varchar,test_id varchar)CREATE TABLE gsi (course_offering_id int,student... | SELECT COUNT(DISTINCT course_prerequisite.course_id), course.department, course.name, course.number FROM course, course_offering, course_prerequisite, semester WHERE course.course_id = course_offering.course_id AND course.course_id = course_prerequisite.pre_course_id AND course.department = 'EECS' AND semester.semester... |
When did the episode with the Ririe family air for the first time? | CREATE TABLE table_19897294_10 (original_air_date VARCHAR,family_families VARCHAR) | SELECT original_air_date FROM table_19897294_10 WHERE family_families = "The Ririe Family" |
how many players are from cork ? | CREATE TABLE table_204_525 (id number,"rank" number,"player" text,"county" text,"tally" text,"total" number,"opposition" text) | SELECT COUNT("player") FROM table_204_525 WHERE "county" = 'cork' |
Find all DAML Tagged questions. | CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,B... | SELECT p.Title, p.Id, t.TagName, p.Body FROM Posts AS p, PostTags AS pt, Tags AS t, PostHistory AS ph WHERE t.TagName = 'tornado' AND t.Id = pt.TagId AND pt.PostId = p.Id AND p.Id = ph.PostId |
What was the game number that was played on November 15? | CREATE TABLE table_name_82 (game INTEGER,date VARCHAR) | SELECT MIN(game) FROM table_name_82 WHERE date = "november 15" |
how much more people were in attendance at the orlando lotusphere conference in 2001 than the one in 2004 ? | CREATE TABLE table_203_794 (id number,"year" number,"location" text,"attendance" number,"theme phrase" text,"top messages" text,"host" text,"opening general session guest(s)" text,"closing general session guest(s)" text,"sunday night reception" text,"wednesday night party" text,"cult shirt" text) | SELECT (SELECT "attendance" FROM table_203_794 WHERE "year" = 2001) - (SELECT "attendance" FROM table_203_794 WHERE "year" = 2004) |
how many patients are diagnosed with the primary disease st elevated myocardial infarction or cardiac cath and procedured with icd9 code 7935? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" AND procedures.icd9_code = "7935" |
Compare the number of the local authority by the local authority, and could you show by the total number in ascending? | CREATE TABLE train (id int,train_number int,name text,origin text,destination text,time text,interval text)CREATE TABLE station (id int,network_name text,services text,local_authority text)CREATE TABLE route (train_id int,station_id int)CREATE TABLE weekly_weather (station_id int,day_of_week text,high_temperature int,l... | SELECT local_authority, COUNT(local_authority) FROM station GROUP BY local_authority ORDER BY COUNT(local_authority) |
Which Team has a Time of 1:14.51.73? | CREATE TABLE table_5892 ("Rank" real,"Rider" text,"Team" text,"Speed" text,"Time" text) | SELECT "Team" FROM table_5892 WHERE "Time" = '1:14.51.73' |
What is the average number of silver medals of the nation with 3 bronzes and more than 4 total medals? | CREATE TABLE table_42513 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT AVG("Silver") FROM table_42513 WHERE "Bronze" = '3' AND "Total" > '4' |
50 top-voted comments for the month of November. | CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReview... | SELECT * FROM Comments WHERE CreationDate BETWEEN '2012-11-01' AND '2012-11-30' ORDER BY Score DESC LIMIT 50 |
Tags ordered by total number of questions. | CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE Posts (Id number,PostTypeId number,Accepted... | SELECT DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS SN, COUNT(*) AS Num, Tags.TagName FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.Id INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE Posts.PostTypeId = 1 GROUP BY Tags.TagName HAVING COUNT(*) > 100 ORDER BY Num DESC |
Which Rank is the lowest one that has a Borough of richmondshire, and a Population larger than 8,178? | CREATE TABLE table_name_16 (rank INTEGER,borough VARCHAR,population VARCHAR) | SELECT MIN(rank) FROM table_name_16 WHERE borough = "richmondshire" AND population > 8 OFFSET 178 |
what is the silver when the nation is syria (syr) and gold is more than 0? | CREATE TABLE table_13500 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT SUM("Silver") FROM table_13500 WHERE "Nation" = 'syria (syr)' AND "Gold" > '0' |
who is the home team when tie no is less than 7 and the away team is havant & waterlooville? | CREATE TABLE table_53730 ("Tie no" real,"Home team" text,"Score" text,"Away team" text,"Attendance" real) | SELECT "Home team" FROM table_53730 WHERE "Tie no" < '7' AND "Away team" = 'havant & waterlooville' |
What is the unanimous result of the player from Michigan Dartmouth? | CREATE TABLE table_name_78 (unanimous VARCHAR,school VARCHAR) | SELECT unanimous FROM table_name_78 WHERE school = "michigan dartmouth" |
Find the number of different airports which are the destinations of the American Airlines. | CREATE TABLE airlines (alid VARCHAR,name VARCHAR)CREATE TABLE routes (alid VARCHAR) | SELECT COUNT(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid = T2.alid WHERE T1.name = 'American Airlines' |
What was the average crowd at Western Oval? | CREATE TABLE table_74724 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT AVG("Crowd") FROM table_74724 WHERE "Venue" = 'western oval' |
nephrotic range proteinuria ( urinary protein > 3.5 gm / day ) | CREATE TABLE table_train_235 ("id" int,"urinary_protein" float,"nephrotic_range_proteinuria" bool,"hepatic_disease" bool,"estimated_glomerular_filtration_rate_egfr" int,"kidney_disease" bool,"renal_transplantation" bool,"NOUSE" float) | SELECT * FROM table_train_235 WHERE nephrotic_range_proteinuria = 1 OR urinary_protein > 3.5 |
Which school was the drafted player from in a pick larger than 181? | CREATE TABLE table_37167 ("Round" real,"Pick" real,"Player" text,"Position" text,"School" text) | SELECT "School" FROM table_37167 WHERE "Pick" > '181' |
Find the number of people who is under 40 for each gender. | CREATE TABLE personfriend (name text,friend text,year number)CREATE TABLE person (name text,age number,city text,gender text,job text) | SELECT COUNT(*), gender FROM person WHERE age < 40 GROUP BY gender |
how many people live in the bold civil parish ? | CREATE TABLE table_204_600 (id number,"name" text,"status" text,"population" number,"district" text,"former local authority" text) | SELECT "population" FROM table_204_600 WHERE "name" = 'bold' |
What is the Title of the Film with a Rank greater than 11 and Worldwide Gross of $131,002,597? | CREATE TABLE table_76239 ("Rank" real,"Title" text,"Studio" text,"Director" text,"Worldwide Gross" text) | SELECT "Title" FROM table_76239 WHERE "Rank" > '11' AND "Worldwide Gross" = '$131,002,597' |
Last 5 Notable Question Badges in MATLAB Tag. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body te... | SELECT DISTINCT CreationDate, Posts.Id AS "post_link", Posts.Tags AS "tagged_with" FROM Posts WHERE (Tags LIKE '%matlab%') ORDER BY CreationDate DESC LIMIT 5 |
What's the lowest average for a swimsuit over 6.89, evening gown over 7.76, and an interview over 8.57 in illinois? | CREATE TABLE table_55734 ("State" text,"Interview" real,"Swimsuit" real,"Evening gown" real,"Average" real) | SELECT MIN("Average") FROM table_55734 WHERE "Swimsuit" > '6.89' AND "Evening gown" > '7.76' AND "State" = 'illinois' AND "Interview" > '8.57' |
Which classes are going to be offered over the ensuing 6 semesters ? | CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa float,entered_as varchar,admit_term int,predicted_graduation_semester int,degree varchar,minor varchar,internship varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id ... | SELECT DISTINCT course.name, course.number, semester.semester, semester.year FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'FA' AND semester.year = 2017) OR (semester.semester = 'FA' AND semester.year = 2018) OR (semester.semester = 'WN' AND se... |
What is the average bronze for less than 0 gold? | CREATE TABLE table_60715 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT AVG("Bronze") FROM table_60715 WHERE "Gold" < '0' |
How many times was Scott Oelslager a representative? | CREATE TABLE table_3477 ("District" real,"Representative" text,"Party" text,"Residence" text,"First Elected" text,"Term Limited" real) | SELECT COUNT("Residence") FROM table_3477 WHERE "Representative" = 'Scott Oelslager' |
What number is Fall 08 from the state with 57 in Fall 06 and 74 or less in Fall 05? | CREATE TABLE table_name_52 (fall_08 VARCHAR,fall_06 VARCHAR,fall_05 VARCHAR) | SELECT COUNT(fall_08) FROM table_name_52 WHERE fall_06 = 57 AND fall_05 < 74 |
What are the duration of the longest and shortest pop tracks in milliseconds? | CREATE TABLE invoiceline (invoicelineid number,invoiceid number,trackid number,unitprice number,quantity number)CREATE TABLE playlist (playlistid number,name text)CREATE TABLE customer (customerid number,firstname text,lastname text,company text,address text,city text,state text,country text,postalcode text,phone text,... | SELECT MAX(milliseconds), MIN(milliseconds) FROM genre AS T1 JOIN track AS T2 ON T1.genreid = T2.genreid WHERE T1.name = "Pop" |
How many pommel Horses have Rings of 37.461, and a Total smaller than 229.507? | CREATE TABLE table_name_16 (pommel_horse VARCHAR,rings VARCHAR,total VARCHAR) | SELECT COUNT(pommel_horse) FROM table_name_16 WHERE rings = 37.461 AND total < 229.507 |
What is the RAtt when the long is 73? | CREATE TABLE table_40270 ("Year" text,"Team" text,"Comp" text,"Long" text,"Rate" text,"RAtt" text,"RYds" text,"RAvg" text,"Lost" text) | SELECT "RAtt" FROM table_40270 WHERE "Long" = '73' |
What is the rank of the nation that has more than 1 Bronze medals and fewer than 4 Gold medals? | CREATE TABLE table_32004 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MIN("Rank") FROM table_32004 WHERE "Bronze" > '1' AND "Gold" < '4' |
when was garibaldets ( ) launched? | CREATE TABLE table_4476 ("Number" text,"Name" text,"Meaning" text,"Fleet" text,"Launched" text) | SELECT "Launched" FROM table_4476 WHERE "Name" = 'garibaldets (гарибальдиец)' |
What club is robert gallery a part of | CREATE TABLE table_name_51 (nfl_club VARCHAR,player VARCHAR) | SELECT nfl_club FROM table_name_51 WHERE player = "robert gallery" |
What year was John m. Belk Arena built? | CREATE TABLE table_name_74 (year_built VARCHAR,venue VARCHAR) | SELECT year_built FROM table_name_74 WHERE venue = "john m. belk arena" |
What is the 100 m time when the 110 m H number is 0 dnf? | CREATE TABLE table_13410 ("Overall points" text,"100 m" text,"400 m" text,"110 m H" text,"1500 m" text) | SELECT "100 m" FROM table_13410 WHERE "110 m H" = '0 dnf' |
What Playoffs were held during the years of 2007-08? | CREATE TABLE table_name_70 (playoffs VARCHAR,year VARCHAR) | SELECT playoffs FROM table_name_70 WHERE year = "2007-08" |
Tell me the average rank for dharma productions before 2013 | CREATE TABLE table_52205 ("Rank" real,"Movie" text,"Year" real,"Studio(s)" text,"Third Week Nett. Gross" real) | SELECT AVG("Rank") FROM table_52205 WHERE "Studio(s)" = 'dharma productions' AND "Year" < '2013' |
Group by the result and count them by a bar chart. | CREATE TABLE submission (Submission_ID int,Scores real,Author text,College text)CREATE TABLE Acceptance (Submission_ID int,Workshop_ID int,Result text)CREATE TABLE workshop (Workshop_ID int,Date text,Venue text,Name text) | SELECT Result, COUNT(Result) FROM Acceptance GROUP BY Result |
What station is affiliated with kmgh-tv? | CREATE TABLE table_1847523_2 (affiliation VARCHAR,station VARCHAR) | SELECT affiliation FROM table_1847523_2 WHERE station = "KMGH-TV" |
What's the total number of FA Cup with a Play-offs of 3, and the Name of Mitch Cook Category:Articles with hCards and has a Total thats less than 11? | CREATE TABLE table_name_64 (fa_cup VARCHAR,total VARCHAR,play_offs VARCHAR,name VARCHAR) | SELECT COUNT(fa_cup) FROM table_name_64 WHERE play_offs = 3 AND name = "mitch cook category:articles with hcards" AND total < 11 |
What was the score when the opponent in the final was iroda tulyaganova? | CREATE TABLE table_40385 ("Date" text,"Tournament" text,"Surface" text,"Opponent in the final" text,"Score" text) | SELECT "Score" FROM table_40385 WHERE "Opponent in the final" = 'iroda tulyaganova' |
retrieve the patient identifications who have been diagnosed with pituitary cushing syndrome until 1 year ago. | CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim... | SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'pituitary cushing syndrome' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-1 year')) |
Tell me the post-season record for kansas city | CREATE TABLE table_name_55 (post_season_record_ VARCHAR,e_ VARCHAR,mlb_affiliate VARCHAR) | SELECT post_season_record_ AS "e_" FROM table_name_55 WHERE mlb_affiliate = "kansas city" |
what is the cost of the hdl lab test? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE intakeoutput (intak... | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'lab' AND cost.eventid IN (SELECT lab.labid FROM lab WHERE lab.labname = 'hdl') |
How many games were won by a margin of 131 runs? | CREATE TABLE table_22384475_1 (team__a_ VARCHAR,margin VARCHAR) | SELECT COUNT(team__a_) FROM table_22384475_1 WHERE margin = "131 runs" |
For those employees who do not work in departments with managers that have ids between 100 and 200, a bar chart shows the distribution of job_id and salary , and could you order Y-axis in ascending order? | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE 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_... | SELECT JOB_ID, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SALARY |
What is the roll of Bishop Viard College (An Integrated College), which has a decile larger than 1? | CREATE TABLE table_name_69 (roll VARCHAR,name VARCHAR,decile VARCHAR,authority VARCHAR) | SELECT COUNT(roll) FROM table_name_69 WHERE decile > 1 AND authority = "integrated" AND name = "bishop viard college" |
What is the Result of the AFG Arena, St. Gallen Competition with a Score of 1 0? | CREATE TABLE table_9761 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Result" FROM table_9761 WHERE "Venue" = 'afg arena, st. gallen' AND "Score" = '1–0' |
What structure is in Chile? | CREATE TABLE table_name_88 (structure VARCHAR,country VARCHAR) | SELECT structure FROM table_name_88 WHERE country = "chile" |
How many Pop (2004) has a Governorate of al mahwit? | CREATE TABLE table_name_48 (pop__2004_ INTEGER,governorate VARCHAR) | SELECT SUM(pop__2004_) FROM table_name_48 WHERE governorate = "al mahwit" |
A list of the top 10 countries by average invoice size. List country name and average invoice size. | CREATE TABLE invoices (billing_country VARCHAR,total INTEGER) | SELECT billing_country, AVG(total) FROM invoices GROUP BY billing_country ORDER BY AVG(total) DESC LIMIT 10 |
I want the result for goals which has goals of deacon 6/6 | CREATE TABLE table_name_52 (result VARCHAR,goals VARCHAR) | SELECT result FROM table_name_52 WHERE goals = "deacon 6/6" |
How many numbers correspond to the score in the final of 6 3, 6 4, 7 6 (13 11)? | CREATE TABLE table_26202940_6 (no VARCHAR,score_in_the_final VARCHAR) | SELECT COUNT(no) FROM table_26202940_6 WHERE score_in_the_final = "6–3, 6–4, 7–6 (13–11)" |
Show me about the distribution of date_address_to and the average of monthly_rental , and group by attribute other_details and bin date_address_to by weekday in a bar chart. | CREATE TABLE Ref_Incident_Type (incident_type_code VARCHAR(10),incident_type_description VARCHAR(80))CREATE TABLE Student_Addresses (student_id INTEGER,address_id INTEGER,date_address_from DATETIME,date_address_to DATETIME,monthly_rental DECIMAL(19,4),other_details VARCHAR(255))CREATE TABLE Detention (detention_id INTE... | SELECT date_address_to, AVG(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC |
Give me a bar chart to show the theme and their sales of the journal which did not have any of the listed editors serving on the committee, rank in descending by the x axis. | CREATE TABLE editor (Editor_ID int,Name text,Age real)CREATE TABLE journal_committee (Editor_ID int,Journal_ID int,Work_Type text)CREATE TABLE journal (Journal_ID int,Date text,Theme text,Sales int) | SELECT T1.Theme, T1.Sales FROM journal EXCEPT SELECT T1.Date, T1.Theme, T1.Sales FROM journal AS T1 JOIN journal_committee AS T2 ON T1.Journal_ID = T2.Journal_ID ORDER BY T1.Theme DESC |
How many seats does the 6th Dail have? | CREATE TABLE table_38250 ("Election" text,"D\u00e1il" text,"Share of votes" text,"Seats" real,"Government" text) | SELECT COUNT("Seats") FROM table_38250 WHERE "D\u00e1il" = '6th' |
Which bats did mitchell play first? | CREATE TABLE table_name_23 (bats VARCHAR,first VARCHAR) | SELECT bats FROM table_name_23 WHERE first = "mitchell" |
What was the score of the game when Sheffield Wednesday was the home team? | CREATE TABLE table_45843 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text) | SELECT "Score" FROM table_45843 WHERE "Home team" = 'sheffield wednesday' |
what team is listed after manchester city ? | CREATE TABLE table_203_450 (id number,"team" text,"outgoing manager" text,"manner of departure" text,"date of vacancy" text,"replaced by" text,"date of appointment" text,"position in table" text) | SELECT "team" FROM table_203_450 WHERE id = (SELECT id FROM table_203_450 WHERE "team" = 'manchester city') + 1 |
For part 2 *lauk, what is listed for part 4? | CREATE TABLE table_1745843_2 (part_4 VARCHAR,part_2 VARCHAR) | SELECT part_4 FROM table_1745843_2 WHERE part_2 = "*lauk" |
How many different circuits had Gary Gibson has the Lites 1 race two winning team? | CREATE TABLE table_26638600_3 (lites_2_race_one_winning_team VARCHAR,lites_1_race_two_winning_team VARCHAR) | SELECT COUNT(lites_2_race_one_winning_team) FROM table_26638600_3 WHERE lites_1_race_two_winning_team = "Gary Gibson" |
Name the segment b for 167 | CREATE TABLE table_15187735_13 (segment_b VARCHAR,episode VARCHAR) | SELECT segment_b FROM table_15187735_13 WHERE episode = 167 |
How many seasons had episode 158? | CREATE TABLE table_2226817_9 (no_in_season INTEGER,no_in_series VARCHAR) | SELECT MIN(no_in_season) FROM table_2226817_9 WHERE no_in_series = 158 |
Which Tournament has A in 1987? | CREATE TABLE table_34846 ("Tournament" text,"1981" text,"1982" text,"1983" text,"1984" text,"1985" text,"1986" text,"1987" text,"1988" text,"1989" text) | SELECT "Tournament" FROM table_34846 WHERE "1987" = 'a' |
What is the safari value with a 2.4% opera and 29.9% internet explorer? | CREATE TABLE table_79523 ("Date" text,"Internet Explorer" text,"Firefox" text,"Safari" text,"Opera" text) | SELECT "Safari" FROM table_79523 WHERE "Opera" = '2.4%' AND "Internet Explorer" = '29.9%' |
Who is the replaced by when the date of vacancy is 27 december 2010? | CREATE TABLE table_29232 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Replaced by" text,"Date of appointment" text) | SELECT "Replaced by" FROM table_29232 WHERE "Date of vacancy" = '27 December 2010' |
Tell me the pick for pittsburgh penguins | CREATE TABLE table_name_12 (pick VARCHAR,nhl_team VARCHAR) | SELECT pick FROM table_name_12 WHERE nhl_team = "pittsburgh penguins" |
What was the date of the game when the record was 53 104? | CREATE TABLE table_name_89 (date VARCHAR,record VARCHAR) | SELECT date FROM table_name_89 WHERE record = "53–104" |
name a year whose second venue was the same as 2011 . | CREATE TABLE table_204_983 (id number,"year" number,"1st venue" text,"2nd venue" text,"3rd venue" text,"4th venue" text,"5th venue" text,"6th venue" text) | SELECT "year" FROM table_204_983 WHERE "year" <> 2011 AND "2nd venue" = (SELECT "2nd venue" FROM table_204_983 WHERE "year" = 2011) |
how many patients are with admission year before 2194 and with lab test item id 50817? | 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 text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2194" AND lab.itemid = "50817" |
Record of 6 8 had what attendance? | CREATE TABLE table_34513 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Record" text,"Game Site" text,"Attendance" text) | SELECT "Attendance" FROM table_34513 WHERE "Record" = '6–8' |
What was the rank for 1.26 -Pts in game 1458? | CREATE TABLE table_name_86 (rank VARCHAR,ø_pts VARCHAR,games VARCHAR) | SELECT COUNT(rank) FROM table_name_86 WHERE ø_pts > 1.26 AND games = 1458 |
how long is the song i love you jesus ? | CREATE TABLE table_204_932 (id number,"#" number,"title" text,"time" text,"lead vocals" text,"notes" text) | SELECT "time" FROM table_204_932 WHERE "title" = 'i love you jesus' |
How many rebounds does Ann Wauters have? | CREATE TABLE table_name_89 (rebounds VARCHAR,name VARCHAR) | SELECT COUNT(rebounds) FROM table_name_89 WHERE name = "ann wauters" |
How many lowest mark entries are there when % passed is 76? | CREATE TABLE table_31361 ("Subject" text,"No. Sat" real,"No. Passed" real,"% Pass" real,"Highest mark" real,"Lowest mark" real,"Mean" real) | SELECT COUNT("Lowest mark") FROM table_31361 WHERE "% Pass" = '76' |
what is the engine when the tyre is d, the constructor is era and the driver is bob gerard? | CREATE TABLE table_name_17 (engine VARCHAR,driver VARCHAR,tyre VARCHAR,constructor VARCHAR) | SELECT engine FROM table_name_17 WHERE tyre = "d" AND constructor = "era" AND driver = "bob gerard" |
What was the smallest crowd size at a home game for Footscray? | CREATE TABLE table_32809 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT MIN("Crowd") FROM table_32809 WHERE "Home team" = 'footscray' |
What is the average weeks on top of volumes associated with the artist aged 25 or younger? | CREATE TABLE music_festival (id number,music_festival text,date_of_ceremony text,category text,volume number,result text)CREATE TABLE artist (artist_id number,artist text,age number,famous_title text,famous_release_date text)CREATE TABLE volume (volume_id number,volume_issue text,issue_date text,weeks_on_top number,son... | SELECT AVG(T2.weeks_on_top) FROM artist AS T1 JOIN volume AS T2 ON T1.artist_id = T2.artist_id WHERE T1.age <= 25 |
How many episodes were written by Gregg Mettler? | CREATE TABLE table_31145 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real) | SELECT COUNT("No. in series") FROM table_31145 WHERE "Written by" = 'Gregg Mettler' |
Who was the team guest captain for episode 2? | CREATE TABLE table_28132 ("Episode" real,"Air Date" text,"Team Swash" text,"Team guest captain" text,"Team Coxy" text) | SELECT "Team guest captain" FROM table_28132 WHERE "Episode" = '2' |
what is the number of patients whose religion is protestant quaker and lab test name is thyroid stimulating hormone? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid 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 demographic (subject_id text,hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "PROTESTANT QUAKER" AND lab.label = "Thyroid Stimulating Hormone" |
For those ships that do not have a captain, tell me the total number of their classes using a pie chart, display from low to high by the bars please. | CREATE TABLE captain (Captain_ID int,Name text,Ship_ID int,age text,Class text,Rank text)CREATE TABLE Ship (Ship_ID int,Name text,Type text,Built_Year real,Class text,Flag text) | SELECT Class, COUNT(Class) FROM Ship WHERE NOT Ship_ID IN (SELECT Ship_ID FROM captain) GROUP BY Class ORDER BY Class |
What song has draw number less than 2? | CREATE TABLE table_name_41 (song VARCHAR,draw INTEGER) | SELECT song FROM table_name_41 WHERE draw < 2 |
Who was the producer for the film 'Strange Little Girls'? | CREATE TABLE table_15049 ("Film" text,"Director(s)" text,"Producer(s)" text,"Writer(s)" text,"Recipient" text,"Date" text,"Award" text) | SELECT "Producer(s)" FROM table_15049 WHERE "Film" = 'strange little girls' |
Name the visitor for detroit on february 24 | CREATE TABLE table_name_55 (visitor VARCHAR,home VARCHAR,date VARCHAR) | SELECT visitor FROM table_name_55 WHERE home = "detroit" AND date = "february 24" |
what is average age of patients whose discharge location is disch-tran to psych hosp and primary disease is left femur fracture? | 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 AVG(demographic.age) FROM demographic WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND demographic.diagnosis = "LEFT FEMUR FRACTURE" |
What was the preliminary average for the one who had a semifinal average of 8.966 (3)? | CREATE TABLE table_20674 ("State" text,"Preliminary Average" text,"Interview" text,"Swimsuit" text,"Evening Gown" text,"Semifinal Average" text) | SELECT "Preliminary Average" FROM table_20674 WHERE "Semifinal Average" = '8.966 (3)' |
What are the different card types, and how many transactions have been made with each. Visualize by bar chart. | CREATE TABLE Customers (customer_id INTEGER,customer_first_name VARCHAR(20),customer_last_name VARCHAR(20),customer_address VARCHAR(255),customer_phone VARCHAR(255),customer_email VARCHAR(255),other_customer_details VARCHAR(255))CREATE TABLE Financial_Transactions (transaction_id INTEGER,previous_transaction_id INTEGER... | SELECT card_type_code, COUNT(*) FROM Financial_Transactions AS T1 JOIN Customers_Cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code |
what is the number of patients whose insurance is private and procedure short title is ventricl shunt tube punc? | 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.insurance = "Private" AND procedures.short_title = "Ventricl shunt tube punc" |
what is the number of patients whose diagnoses long title is incisional ventral hernia with obstruction? | 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 diagnoses.long_title = "Incisional ventral hernia with obstruction" |
What are the names and ages of artists? Show the result in a bar graph, list y axis in descending order. | CREATE TABLE artist (Artist_ID int,Name text,Country text,Year_Join int,Age int)CREATE TABLE exhibition_record (Exhibition_ID int,Date text,Attendance int)CREATE TABLE exhibition (Exhibition_ID int,Year int,Theme text,Artist_ID int,Ticket_Price real) | SELECT Name, Age FROM artist ORDER BY Age DESC |
Name the player for 68-68-75-74=285 | CREATE TABLE table_70165 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" text) | SELECT "Player" FROM table_70165 WHERE "Score" = '68-68-75-74=285' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.