instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Name the least games played for 6 points | CREATE TABLE table_27816332_2 (games_played INTEGER,total_points VARCHAR) | SELECT MIN(games_played) FROM table_27816332_2 WHERE total_points = 6 |
Which courses did Dr. Rosa Angulo-barroso teach before ? | CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE course_offering (offering_id int,course_id int,semester in... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course_offering.semester < (SELECT SEMESTERalias0.semester_id FROM semester AS SEMESTERalias0 WHERE SEMESTERalias0.semester = 'WN' AND SEMESTERalias0.year = 2016) AND course.course_id = cour... |
What club team plays at the champion window field? | CREATE TABLE table_name_40 (club VARCHAR,venue VARCHAR) | SELECT club FROM table_name_40 WHERE venue = "champion window field" |
How man teams have a writer named harry angus? | CREATE TABLE table_30432 ("Club name" text,"Name of team song" text,"Basis for team song" text,"First used as team song" text,"Writer/composer" text) | SELECT COUNT("Name of team song") FROM table_30432 WHERE "Writer/composer" = 'Harry Angus' |
Which score has a Home of grizzlies, and a Leading scorer of rudy gay (18)? | CREATE TABLE table_57744 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Leading scorer" text,"Record" text) | SELECT "Score" FROM table_57744 WHERE "Home" = 'grizzlies' AND "Leading scorer" = 'rudy gay (18)' |
What round had a home of FC augsburg with the result of 3-0? | CREATE TABLE table_name_9 (round VARCHAR,home VARCHAR,result VARCHAR) | SELECT round FROM table_name_9 WHERE home = "fc augsburg" AND result = "3-0" |
What is the largest Goals For by a team that has more than 0 ties? | CREATE TABLE table_name_18 (goals_for INTEGER,ties INTEGER) | SELECT MAX(goals_for) FROM table_name_18 WHERE ties > 0 |
On what day is geelong the home team? | CREATE TABLE table_name_37 (date VARCHAR,home_team VARCHAR) | SELECT date FROM table_name_37 WHERE home_team = "geelong" |
which division comes after divisi n de honor ? | CREATE TABLE table_204_636 (id number,"season" text,"tier" number,"division" text,"pos." text,"notes" text) | SELECT "division" FROM table_204_636 WHERE id = (SELECT MAX(id) FROM table_204_636 WHERE "division" = 'division de honor') + 1 |
What team(s) did they play on april 23? | CREATE TABLE table_17140608_11 (team VARCHAR,date VARCHAR) | SELECT team FROM table_17140608_11 WHERE date = "April 23" |
Which Tries for has Points against smaller than 124, and Points for smaller than 241, and Tries against smaller than 11? | CREATE TABLE table_name_12 (tries_for INTEGER,tries_against VARCHAR,points_against VARCHAR,points_for VARCHAR) | SELECT MAX(tries_for) FROM table_name_12 WHERE points_against < 124 AND points_for < 241 AND tries_against < 11 |
Where does CF Pachuca play? | CREATE TABLE table_name_64 (game_site VARCHAR,opponent VARCHAR) | SELECT game_site FROM table_name_64 WHERE opponent = "cf pachuca" |
What is the Longitude of the 61.0s Latitude? | CREATE TABLE table_name_27 (longitude VARCHAR,latitude VARCHAR) | SELECT longitude FROM table_name_27 WHERE latitude = "61.0s" |
What is the home in mellon arena at 7:30 pm with a record o 2-5-2? | CREATE TABLE table_name_25 (home VARCHAR,record VARCHAR,time VARCHAR,location_attendance VARCHAR) | SELECT home FROM table_name_25 WHERE time = "7:30 pm" AND location_attendance = "mellon arena" AND record = "2-5-2" |
What year did the team make conference semifinals? | CREATE TABLE table_70378 ("Year" real,"Division" text,"League" text,"Regular Season" text,"Playoffs" text,"U.S. Open Cup" text,"Avg. Attendance" text) | SELECT COUNT("Year") FROM table_70378 WHERE "Playoffs" = 'conference semifinals' |
Which Goals against have a Club of cd castell n, and Points smaller than 24? | CREATE TABLE table_name_15 (goals_against INTEGER,club VARCHAR,points VARCHAR) | SELECT AVG(goals_against) FROM table_name_15 WHERE club = "cd castellón" AND points < 24 |
what is the name of the treatment which has been given to patient 11579 two times in 06/this year? | CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_items (row_id number,itemid number,label text,linksto ... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 115... |
What was the fastest lap time at the British Grand Prix with Mercedes as the constructor? | CREATE TABLE table_57593 ("Race" text,"Circuit" text,"Date" text,"Pole position" text,"Fastest lap" text,"Winning driver" text,"Constructor" text,"Tyre" text,"Report" text) | SELECT "Fastest lap" FROM table_57593 WHERE "Constructor" = 'mercedes' AND "Race" = 'british grand prix' |
What is the highest number of laps that max biaggi rode on a grid larger than 2? | CREATE TABLE table_name_12 (laps INTEGER,rider VARCHAR,grid VARCHAR) | SELECT MAX(laps) FROM table_name_12 WHERE rider = "max biaggi" AND grid > 2 |
Create a bar chart showing sum student capacity across gender, and order by the bar in asc please. | CREATE TABLE Dorm_amenity (amenid INTEGER,amenity_name VARCHAR(25))CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Dorm (dormid INTEGER,dorm_name VARCHAR(20),student_capacity INTEGER,gender VARCHAR(1))CREA... | SELECT gender, SUM(student_capacity) FROM Dorm GROUP BY gender ORDER BY gender |
What was the To Par of Tiger Woods who won in 1988? | CREATE TABLE table_name_85 (to_par VARCHAR,year_won VARCHAR) | SELECT to_par FROM table_name_85 WHERE year_won = 1988 |
what procedure did patient 010-32698 receive the first time this year. | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,c... | SELECT treatment.treatmentname FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-32698')) AND DATETIME(treatment.treatmenttime, 'start of year... |
Which courses has Prof. Eduardo Matos-martin been assigned to teach for the coming year ? | CREATE TABLE course_tags_count (course_id int,clear_grading int,pop_quiz int,group_projects int,inspirational int,long_lectures int,extra_credit int,few_tests int,good_feedback int,tough_tests int,heavy_papers int,cares_for_students int,heavy_assignments int,respected int,participation int,heavy_reading int,tough_grade... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Eduardo Matos-martin%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instruc... |
south korea has how many more medals that north korea ? | CREATE TABLE table_203_630 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT (SELECT "total" FROM table_203_630 WHERE "nation" = 'south korea') - (SELECT "total" FROM table_203_630 WHERE "nation" = 'north korea') |
Can you tell me what Core classes are offered next Winter ? | 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 ta (campus_job_id int,student_id int,location var... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_cour... |
Who's the Socialist ticket with a Law Preservation ticket of (none), and a Socialist Labor ticket of belle j. rosen? | CREATE TABLE table_39759 ("Office" text,"Democratic ticket" text,"Republican ticket" text,"Law Preservation ticket" text,"Socialist ticket" text,"Socialist Labor ticket" text) | SELECT "Socialist ticket" FROM table_39759 WHERE "Law Preservation ticket" = '(none)' AND "Socialist Labor ticket" = 'belle j. rosen' |
count the number of patients whose diagnoses long title is other specified procedures as the cause of abnormal reaction of patient, or of later complication, without mention of misadventure at time of procedure and drug route is ivpca? | 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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Other specified procedures as the cause of abnormal reaction of patient, or of later compli... |
What Frequency has the Identifier of CBFX-FM-6? | CREATE TABLE table_66627 ("City of license" text,"Identifier" text,"Frequency" text,"Power" text,"Class" text,"RECNet" text) | SELECT "Frequency" FROM table_66627 WHERE "Identifier" = 'cbfx-fm-6' |
how many patients whose year of death is less than or equal to 2111 and lab test name is lactate dehydrogenase (ld)? | 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 lab (subject_id text,hadm_id text,itemid text,charttime tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2111.0" AND lab.label = "Lactate Dehydrogenase (LD)" |
Name the overall record for indian river | CREATE TABLE table_70515 ("School" text,"Team" text,"Division Record" text,"Overall Record" text,"Season Outcome" text) | SELECT "Overall Record" FROM table_70515 WHERE "School" = 'indian river' |
What are the log id and entry description of each problem? | CREATE TABLE problem_status_codes (problem_status_code text,problem_status_description text)CREATE TABLE problems (problem_id number,product_id number,closure_authorised_by_staff_id number,reported_by_staff_id number,date_problem_reported time,date_problem_closed time,problem_description text,other_problem_details text... | SELECT problem_log_id, log_entry_description FROM problem_log |
What is the plural for the Meaning of night? | CREATE TABLE table_39936 ("singular" text,"singular gender" text,"plural" text,"plural gender" text,"meaning" text) | SELECT "plural" FROM table_39936 WHERE "meaning" = 'night' |
What are the colors for the division 2 team with the nickname, the seahawks? | CREATE TABLE table_39925 ("School" text,"Nickname" text,"Colors" text,"League" text,"Class" text,"Division" text) | SELECT "Colors" FROM table_39925 WHERE "Division" = 'division 2' AND "Nickname" = 'seahawks' |
What is the Record of the game with a Result of l 14 16? | CREATE TABLE table_name_82 (record VARCHAR,result VARCHAR) | SELECT record FROM table_name_82 WHERE result = "l 14–16" |
Which silver has a Bronze of 1, a Total of 4, and a Nation of slovakia? | CREATE TABLE table_70671 ("Rank" text,"Nation" text,"Gold" text,"Silver" text,"Bronze" text,"Total" text) | SELECT "Silver" FROM table_70671 WHERE "Bronze" = '1' AND "Total" = '4' AND "Nation" = 'slovakia' |
What status has a role? | CREATE TABLE table_name_56 (status VARCHAR) | SELECT status FROM table_name_56 WHERE "role" = "role" |
How many draws has a Club of real valladolid that was played less than 38? | CREATE TABLE table_name_35 (draws INTEGER,club VARCHAR,played VARCHAR) | SELECT MAX(draws) FROM table_name_35 WHERE club = "real valladolid" AND played < 38 |
Who were the candidates in the Kentucky 4 voting district? | CREATE TABLE table_72399 ("District" text,"Incumbent" text,"Party" text,"First elected" text,"Result" text,"Candidates" text) | SELECT "Candidates" FROM table_72399 WHERE "District" = 'Kentucky 4' |
which posts where ever featured on meta. | 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 UserId AS "user_link", COUNT(PostId) AS "number_of_posts" FROM PostHistory WHERE PostHistoryTypeId IN (3, 6) AND Text LIKE '%<featured>%' GROUP BY UserId ORDER BY COUNT(PostId) DESC |
Record of 0 8 had what lowest week? | CREATE TABLE table_name_25 (week INTEGER,record VARCHAR) | SELECT MIN(week) FROM table_name_25 WHERE record = "0–8" |
Users with the most controversial posts. | CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE ... | SELECT p.OwnerUserId AS "user_link", COUNT(*) AS ContACnt FROM (SELECT PostId, up = SUM(CASE WHEN VoteTypeId = 2 THEN 1 ELSE 0 END), down = SUM(CASE WHEN VoteTypeId = 3 THEN 1 ELSE 0 END) FROM Votes AS v JOIN Posts AS p ON p.Id = v.PostId WHERE VoteTypeId IN (2, 3) AND PostTypeId = 2 GROUP BY PostId) AS ContA JOIN Post... |
Check for profanity in usernames. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location text,AboutMe text,Views number,UpVotes number,DownVotes number,ProfileImageUrl text,EmailHash text,AccountId number)CREATE T... | SELECT Id AS "user_link", DisplayName FROM Users WHERE LOWER(DisplayName) LIKE '%##Keyword##%' |
What is the highest Total trade (tonnes) after 2001 when the Imports are 144,368 tonnes, the Exports are more than 4,024,311 tonnes, and there are more than 91 vessels entering port? | CREATE TABLE table_44428 ("Year" real,"Imports (tonnes)" real,"Exports (tonnes)" real,"Total trade (tonnes)" real,"Vessels entering port" real) | SELECT MAX("Total trade (tonnes)") FROM table_44428 WHERE "Year" > '2001' AND "Vessels entering port" > '91' AND "Imports (tonnes)" = '144,368' AND "Exports (tonnes)" > '4,024,311' |
What score has amblecote as the venue? | CREATE TABLE table_name_97 (score VARCHAR,venue VARCHAR) | SELECT score FROM table_name_97 WHERE venue = "amblecote" |
Who is the Opponent in the game with a Record of 1 3 0? | CREATE TABLE table_13419 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Record" text,"Attendance" text) | SELECT "Opponent" FROM table_13419 WHERE "Record" = '1–3–0' |
What year did the Turku Airport have a total of 116,631 domestic passengers and a total of 308,782 passengers? | CREATE TABLE table_49654 ("Year" real,"Domestic passengers" real,"International passengers" real,"Total passengers" real,"Change" text) | SELECT MAX("Year") FROM table_49654 WHERE "Domestic passengers" > '116,631' AND "Total passengers" = '308,782' |
In the Winter , when does 890 meet ? | CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa float,entered_as varchar,admit_term int,predicted_graduation_semester int,degree varchar,minor varchar,internship varc... | SELECT DISTINCT course_offering.end_time, course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.start_time, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM semester INNER JOIN course_offering ON semester.semester_id = course_o... |
What is the nationality of the player with 2 years of NBA experience for the previously played for the Los Angeles Lakers? | CREATE TABLE table_12451 ("Player" text,"Pos." text,"Nationality" text,"Previous team" text,"Years of NBA experience [a ]" real) | SELECT "Nationality" FROM table_12451 WHERE "Years of NBA experience [a ]" = '2' AND "Previous team" = 'los angeles lakers' |
What was the attendance for the game that had the king's lynn as the home team? | CREATE TABLE table_66644 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Attendance" text) | SELECT "Attendance" FROM table_66644 WHERE "Home team" = 'king''s lynn' |
Give me the number of patients with lab test item id 51218 who had an abnormal lab test status. | 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 lab.itemid = "51218" AND lab.flag = "abnormal" |
from total number of patients who had spinal tap, how many of them were discharge-transfer to psych hosp | 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 = "DISCH-TRAN TO PSYCH HOSP" AND procedures.short_title = "Spinal tap" |
Who is the player in tight end position in a round below 12 that has a pick greater than 17? | CREATE TABLE table_name_81 (player VARCHAR,position VARCHAR,pick VARCHAR,round VARCHAR) | SELECT player FROM table_name_81 WHERE pick > 17 AND round < 12 AND position = "tight end" |
what is the name of the first title ? | CREATE TABLE table_204_208 (id number,"year" text,"title" text,"role" text,"episodes" text) | SELECT "title" FROM table_204_208 WHERE id = 1 |
What is the largest attendance at Memorial Stadium on December 12, 1965? | CREATE TABLE table_34679 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Record" text,"Game Site" text,"Attendance" real) | SELECT MAX("Attendance") FROM table_34679 WHERE "Game Site" = 'memorial stadium' AND "Date" = 'december 12, 1965' |
First & Last Date for Posts Bumped N Times by Community User. | CREATE TABLE PostsWithDeleted (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,Ta... | SELECT P.Id, B.BumpCount, B.FirstBump, B.LastBump, P.Title FROM Posts AS P JOIN (SELECT PostId, COUNT(*) AS BumpCount, MIN(CreationDate) AS FirstBump, MAX(CreationDate) AS LastBump FROM PostHistory WHERE PostHistoryTypeId = 50 GROUP BY PostId HAVING COUNT(*) > 2) AS B ON P.Id = B.PostId ORDER BY B.BumpCount, P.Id |
How many extra points did Paul Jones score? | CREATE TABLE table_14342367_11 (extra_points VARCHAR,player VARCHAR) | SELECT COUNT(extra_points) FROM table_14342367_11 WHERE player = "Paul Jones" |
what is drug code of drug name pneumococcal vac polyvalent? | 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 procedures (subject_id text,hadm_id te... | SELECT prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Pneumococcal Vac Polyvalent" |
Which Date has an Opponent of milton keynes lightning, and an Attendance smaller than 1,771? | CREATE TABLE table_name_96 (date INTEGER,opponent VARCHAR,attendance VARCHAR) | SELECT AVG(date) FROM table_name_96 WHERE opponent = "milton keynes lightning" AND attendance < 1 OFFSET 771 |
Which 2013 has a 2007 of A, and a Tournament of french open? | CREATE TABLE table_name_49 (tournament VARCHAR) | SELECT 2013 FROM table_name_49 WHERE 2007 = "a" AND tournament = "french open" |
how many patients admitted before the year 2170 had liver transplant as the primary disease? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LIVER TRANSPLANT" AND demographic.admityear < "2170" |
how much is the cost for diagnosis of valve replacement < 7days? | 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 microlab (microlabid number,patientunitstayid ... | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'valve replacement < 7days') |
tell me the director of the production code ad1d02. | CREATE TABLE table_51869 ("Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text) | SELECT "Directed by" FROM table_51869 WHERE "Production code" = 'ad1d02' |
Number of posts by user from France or India per age and location. | CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,RevisionGUID other)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate ... | SELECT a2."age" AS "Age", a2.Location AS "Location", COUNT(*) AS "count_posts" FROM "Posts " AS a1 LEFT OUTER JOIN Users AS a2 ON (a2.Id = a1."LastEditorUserId ") WHERE (a2.Location IN ('France', 'India')) GROUP BY a2."age", a2.Location ORDER BY 'Age' DESC, 'Location' DESC |
what is the semifinalists when the surface is hard (i)? | CREATE TABLE table_9215 ("Tournament" text,"Surface" text,"Week" text,"Winner and score" text,"Finalist" text,"Semifinalists" text) | SELECT "Semifinalists" FROM table_9215 WHERE "Surface" = 'hard (i)' |
For those employees who was hired before 2002-06-21, show me about the distribution of hire_date and the average of salary bin hire_date by time in a bar chart, and order total number from low to high order. | CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME ... | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(SALARY) |
What is the outcome of the 4 6, 6 4, 6 3, 7 6 (7 2) score? | CREATE TABLE table_75927 ("Outcome" text,"Year" real,"Championship" text,"Surface" text,"Opponent" text,"Score" text) | SELECT "Outcome" FROM table_75927 WHERE "Score" = '4–6, 6–4, 6–3, 7–6 (7–2)' |
What is the total reg gp of Ilya Krikunov, who has a round of 7 and a pick number larger than 223? | CREATE TABLE table_57102 ("Rd #" real,"Pick #" real,"Player" text,"Team (League)" text,"Reg GP" real,"Pl GP" real) | SELECT COUNT("Reg GP") FROM table_57102 WHERE "Rd #" = '7' AND "Player" = 'ilya krikunov' AND "Pick #" > '223' |
hydralazine, 0.9% sodium chloride or insulin had been prescribed to patient 27242? | CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE patients (row_id number,subject_id number,ge... | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27242) AND prescriptions.drug IN ('hydralazine', '0.9% sodium chloride', 'insulin') |
Show all payment method codes and the number of orders for each code. Show bar chart. | CREATE TABLE Stores (Store_ID VARCHAR(100),Address_ID INTEGER,Marketing_Region_Code CHAR(15),Store_Name VARCHAR(255),Store_Phone VARCHAR(255),Store_Email_Address VARCHAR(255),Other_Details VARCHAR(255))CREATE TABLE Services (Service_ID INTEGER,Service_Type_Code CHAR(15),Workshop_Group_ID INTEGER,Product_Description VAR... | SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code |
What is the game number with a score of 116 138? | CREATE TABLE table_name_31 (game VARCHAR,score VARCHAR) | SELECT COUNT(game) FROM table_name_31 WHERE score = "116–138" |
When the 2nd player's choice is r bb what is the probability the 1st player wins 0.11%? | CREATE TABLE table_33733 ("1st player's choice" text,"2nd player's choice" text,"Probability 1st player wins" text,"Probability 2nd player wins" text,"Probability of a draw" text) | SELECT "Probability of a draw" FROM table_33733 WHERE "2nd player's choice" = 'r bb' AND "Probability 1st player wins" = '0.11%' |
Name the gdp world rank for asian rank being 20 | CREATE TABLE table_25047 ("Asian rank" real,"World rank" real,"Country" text,"GDP per capita" text,"GDP world rank" text) | SELECT "GDP world rank" FROM table_25047 WHERE "Asian rank" = '20' |
In what Tournament was Janet Young a Partner? | CREATE TABLE table_name_18 (tournament VARCHAR,partner VARCHAR) | SELECT tournament FROM table_name_18 WHERE partner = "janet young" |
DALLAS to BALTIMORE | 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 flight_stop (flight_id int,... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMO... |
What is the years coached by the person with a win percentage of 0.667 and 380 losses? | CREATE TABLE table_name_25 (years VARCHAR,pct VARCHAR,lost VARCHAR) | SELECT years FROM table_name_25 WHERE pct = 0.667 AND lost = 380 |
what tests are the three most frequently ordered lab tests since 2101? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE allergy (... | SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE STRFTIME('%y', lab.labresulttime) >= '2101' GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 3 |
Tag edits with empty change. | CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE ... | SELECT 'site://posts/' + CAST(ph.PostId AS TEXT) + '/revisions' AS "revision_history" FROM PostHistory AS ph WHERE (ph.PostHistoryTypeId IN (6, 9)) AND (ph.Text = '') |
what is the song title of the first track on the album smile ! ? | CREATE TABLE table_203_574 (id number,"track number" number,"russian title" text,"english title" text,"music" text,"lyrics" text) | SELECT "english title" FROM table_203_574 WHERE "track number" = 1 |
documented hemoglobin a1c ( hba1c ) < 7.5 % at time of entry | CREATE TABLE table_train_168 ("id" int,"cholesterol" float,"hemoglobin_a1c_hba1c" float,"triglyceride_tg" float,"fasting_glucose" int,"NOUSE" float) | SELECT * FROM table_train_168 WHERE hemoglobin_a1c_hba1c < 7.5 |
How many were first elected in California 7? | CREATE TABLE table_23280 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "First elected" FROM table_23280 WHERE "District" = 'California 7' |
Which January is the lowest one that has an Opponent of florida panthers, and Points smaller than 59? | CREATE TABLE table_36725 ("Game" real,"January" real,"Opponent" text,"Score" text,"Record" text,"Points" real) | SELECT MIN("January") FROM table_36725 WHERE "Opponent" = 'florida panthers' AND "Points" < '59' |
Name the place that was founded in 1920 | CREATE TABLE table_28515 ("Institution" text,"Location" text,"Founded" real,"Type" text,"Enrollment" real,"Joined" real,"Nickname" text,"Primary Conference when joining the MSFA" text,"Current Primary Conference" text) | SELECT "Institution" FROM table_28515 WHERE "Founded" = '1920' |
Name the greek modern for s ysza e by / s ysza a by a | CREATE TABLE table_1841901_1 (greek__modern_ VARCHAR,polish__extinct_ VARCHAR) | SELECT greek__modern_ FROM table_1841901_1 WHERE polish__extinct_ = "słyszałeś był / słyszałaś była" |
How many different items appear in the weight column when Pittsburgh, PA is the hometown? | CREATE TABLE table_31406 ("Name" text,"#" real,"Position" text,"Height" text,"Weight (lb.)" real,"Year" text,"Hometown" text,"Previous School" text) | SELECT COUNT("Weight ( lb. )") FROM table_31406 WHERE "Hometown" = 'Pittsburgh, PA' |
What is the home venue of essendon with a crowd larger than 19,760? | CREATE TABLE table_78414 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Venue" FROM table_78414 WHERE "Crowd" > '19,760' AND "Home team" = 'essendon' |
Which Date has an Against larger than 0? | CREATE TABLE table_name_28 (date VARCHAR,against INTEGER) | SELECT date FROM table_name_28 WHERE against > 0 |
Post scores for top 10. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDi... | SELECT p.OwnerUserId, p.Score FROM Posts AS p WHERE p.OwnerUserId IN (SELECT Id FROM Users ORDER BY Reputation DESC LIMIT 10) AND p.PostTypeId = 2 ORDER BY p.Score DESC |
When has a Result of l 27-7 and an Opponent of at minnesota vikings? | CREATE TABLE table_name_57 (date VARCHAR,result VARCHAR,opponent VARCHAR) | SELECT date FROM table_name_57 WHERE result = "l 27-7" AND opponent = "at minnesota vikings" |
For the Avg/G of 5.9, what was the long? | CREATE TABLE table_name_56 (long VARCHAR,avg_g VARCHAR) | SELECT long FROM table_name_56 WHERE avg_g = "5.9" |
What is the average games a player born on 17 March 1915 and debut before 1935 had? | CREATE TABLE table_name_68 (games INTEGER,date_of_birth VARCHAR,debut_year VARCHAR) | SELECT AVG(games) FROM table_name_68 WHERE date_of_birth = "17 march 1915" AND debut_year < 1935 |
What shows for nation when the Competition is preseason, Year less than 2011, and a Club of chivas de guadalajara? | CREATE TABLE table_name_37 (nation VARCHAR,club VARCHAR,competition VARCHAR,year VARCHAR) | SELECT nation FROM table_name_37 WHERE competition = "preseason" AND year < 2011 AND club = "chivas de guadalajara" |
Name the date of the italian grand prix | CREATE TABLE table_name_34 (date VARCHAR,race VARCHAR) | SELECT date FROM table_name_34 WHERE race = "italian grand prix" |
Which Tournament has a Winning score of 14 (65-69-72-68=274)? | CREATE TABLE table_34803 ("Date" text,"Tournament" text,"Winning score" text,"Margin of victory" text,"Runner-up" text) | SELECT "Tournament" FROM table_34803 WHERE "Winning score" = '−14 (65-69-72-68=274)' |
Alana Boyd of group B with a 4.30 result has what nationality? | CREATE TABLE table_name_24 (nationality VARCHAR,name VARCHAR,group VARCHAR,result VARCHAR) | SELECT nationality FROM table_name_24 WHERE group = "b" AND result = "4.30" AND name = "alana boyd" |
What kind of report is for the Pau circuit? | CREATE TABLE table_16764 ("Race Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Constructor" text,"Report" text) | SELECT "Report" FROM table_16764 WHERE "Circuit" = 'Pau' |
How many times were the winnings $3,816,362? | CREATE TABLE table_19836 ("Year" real,"Starts" real,"Wins" real,"Top 5" real,"Top 10" real,"Poles" real,"Avg. Start" text,"Avg. Finish" text,"Winnings" text,"Position" text,"Team(s)" text) | SELECT COUNT("Avg. Finish") FROM table_19836 WHERE "Winnings" = '$3,816,362' |
Number of questions asked for a specific tag over time (absolute). | CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location text,AboutMe text,Views number,UpVotes number,DownVotes number,ProfileImageUrl text,EmailHash text,AccountId number)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId ... | SELECT TIME_TO_STR(CreationDate, '%y') * 100 + TIME_TO_STR(CreationDate, '%M') AS yyyymm, COUNT(*) AS cnt FROM Posts AS p INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = 'c++' GROUP BY TIME_TO_STR(CreationDate, '%y') * 100 + TIME_TO_STR(CreationDate, '%M') ORDER B... |
what is drug code and drug route of drug name rituximab? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT prescriptions.formulary_drug_cd, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Rituximab" |
What round had a record of 4-1? | CREATE TABLE table_name_17 (round VARCHAR,record VARCHAR) | SELECT round FROM table_name_17 WHERE record = "4-1" |
Give the name of each department and the number of employees in each in a bar chart, and order by the y-axis in asc please. | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE employees (EM... | SELECT DEPARTMENT_NAME, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID GROUP BY T2.DEPARTMENT_NAME ORDER BY COUNT(*) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.