instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What is the nationality of the School/Club team of Louisville? | CREATE TABLE table_41757 ("Player" text,"Nationality" text,"Position" text,"Years in Orlando" text,"School/Club Team" text) | SELECT "Nationality" FROM table_41757 WHERE "School/Club Team" = 'louisville' |
How many u.s. views were there for the epidosde titled, 'now you lift your eyes to the sun'? | CREATE TABLE table_24969 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text,"U.S. viewers (millions)" text) | SELECT "U.S. viewers (millions)" FROM table_24969 WHERE "Title" = 'Now You Lift Your Eyes to the Sun' |
For those employees who was hired before 2002-06-21, a scatter chart shows the correlation between employee_id and salary . | CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decima... | SELECT EMPLOYEE_ID, SALARY FROM employees WHERE HIRE_DATE < '2002-06-21' |
give me the number of patients diagnosed with morbid obesity/sda and the lab test fluid is pleural. | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "MORBID OBESITY/SDA" AND lab.fluid = "Pleural" |
What is the party for the candidates edwin gray (dr)? | CREATE TABLE table_2668393_18 (party VARCHAR,candidates VARCHAR) | SELECT party FROM table_2668393_18 WHERE candidates = "Edwin Gray (DR)" |
What was the record after the January 18 game? | CREATE TABLE table_68045 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text) | SELECT "Record" FROM table_68045 WHERE "Date" = 'january 18' |
Count the hometown by hometown, I want to sort by the X-axis in asc. | CREATE TABLE membership_register_branch (Member_ID int,Branch_ID text,Register_Year text)CREATE TABLE branch (Branch_ID int,Name text,Open_year text,Address_road text,City text,membership_amount text)CREATE TABLE purchase (Member_ID int,Branch_ID text,Year text,Total_pounds real)CREATE TABLE member (Member_ID int,Card_... | SELECT Hometown, COUNT(Hometown) FROM member GROUP BY Hometown ORDER BY Hometown |
With a Rank of 19, and a Start of 14, what was the finish? | CREATE TABLE table_name_41 (finish VARCHAR,rank VARCHAR,start VARCHAR) | SELECT finish FROM table_name_41 WHERE rank = "19" AND start = "14" |
What is the earliest year for Alabama with a pick under 26? | CREATE TABLE table_6430 ("Year" real,"Pick" real,"Player" text,"Position" text,"College" text) | SELECT MIN("Year") FROM table_6430 WHERE "College" = 'alabama' AND "Pick" < '26' |
In courses taught by Prof. Fraker , what grades have I gotten ? | CREATE TABLE instructor (instructor_id int,name varchar,uniqname varchar)CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement varchar,enforced_requirement varchar,description varchar,num_semesters int,num_enrolled int,has_discussion varchar,has_lab varch... | SELECT DISTINCT student_record.grade FROM student_record INNER JOIN offering_instructor ON student_record.offering_id = offering_instructor.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE LOWER(instructor.name) LIKE '%Fraker%' AND student_record.student_id = 1 |
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of email and commission_pct , could you display from high to low by the total number? | 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_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGE... | SELECT EMAIL, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT DESC |
What is the highest amount of gold medals awarded to a team with more than 9 silver, 7 bronze and more than 13 medals total? | CREATE TABLE table_name_72 (gold INTEGER,bronze VARCHAR,total VARCHAR,silver VARCHAR) | SELECT MAX(gold) FROM table_name_72 WHERE total > 13 AND silver > 9 AND bronze = 7 |
Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order. | CREATE TABLE accounts (name VARCHAR,custid VARCHAR)CREATE TABLE savings (balance VARCHAR,custid VARCHAR) | SELECT T1.name, T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid = T2.custid ORDER BY T2.balance DESC LIMIT 3 |
What was the theme when original artist Rosana's song was performed? | CREATE TABLE table_29672 ("Week #" text,"Theme" text,"Song Choice" text,"Original Artist" text,"Order #" text,"Result" text) | SELECT "Theme" FROM table_29672 WHERE "Original Artist" = 'Rosana' |
What chassis does the shadow built car use? | CREATE TABLE table_74646 ("Entrant" text,"Constructor" text,"Chassis" text,"Engine" text,"Driver" text) | SELECT "Chassis" FROM table_74646 WHERE "Constructor" = 'shadow' |
Get me the number of american indian or alaska native patients who have procedure icd9 code 5101. | 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.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND procedures.icd9_code = "5101" |
What's the version in the 1.0.4 release? | CREATE TABLE table_30589 ("Version" text,"Release" text,"Release date" text,"End of maintenance" text,"Requirement" text) | SELECT "Version" FROM table_30589 WHERE "Release" = '1.0.4' |
on what date did the home team score zero points against their opponent ? | CREATE TABLE table_203_24 (id number,"date" text,"home team" text,"score" text,"away team" text,"notes" text) | SELECT "date" FROM table_203_24 WHERE "score" = 0 |
A bar chart shows the distribution of Name and Weight , rank by the y-axis in asc. | CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real)CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real) | SELECT Name, Weight FROM people ORDER BY Weight |
Find the longest-living answer on the Overlapping Polyglots challenge. | CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE Votes (Id number,Pos... | SELECT Id AS "post_link", OwnerUserId AS "user_link", Score, CreationDate, CAST((JULIANDAY(LEAD(Posts.CreationDate, 1, CURRENT_TIMESTAMP()) OVER (PARTITION BY ParentId, PostTypeId ORDER BY CreationDate)) - JULIANDAY(Posts.CreationDate)) * 24.0 AS INT) AS SurvivalTime FROM Posts WHERE PostTypeId = @answerType AND Parent... |
What was the record for Dec 16? | CREATE TABLE table_61842 ("Game" real,"Date" text,"Opponent" text,"Score" text,"Location/Attendance" text,"Record" text,"Streak" text) | SELECT "Record" FROM table_61842 WHERE "Date" = 'dec 16' |
What is the Nation when there is a total less than 27, gold is less than 1, and bronze is more than 1? | CREATE TABLE table_76081 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT "Nation" FROM table_76081 WHERE "Total" < '27' AND "Gold" < '1' AND "Bronze" > '1' |
What is the largest amount of wins that was before the 2007 season, as well as the Team being silverstone motorsport academy? | CREATE TABLE table_name_92 (wins INTEGER,season VARCHAR,team VARCHAR) | SELECT MAX(wins) FROM table_name_92 WHERE season < 2007 AND team = "silverstone motorsport academy" |
tell me the amount of ostomy (output) that patient 20801 had on 04/02/last year? | 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 microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE patients (row_id numb... | SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20801)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'ost... |
Name the least f/laps | CREATE TABLE table_25375093_1 (f_laps INTEGER) | SELECT MIN(f_laps) FROM table_25375093_1 |
What was the away team's score when Collingwood was the home team? | CREATE TABLE table_name_17 (away_team VARCHAR,home_team VARCHAR) | SELECT away_team AS score FROM table_name_17 WHERE home_team = "collingwood" |
What is the total best for Bruno junqueira | CREATE TABLE table_name_32 (best INTEGER,name VARCHAR) | SELECT SUM(best) FROM table_name_32 WHERE name = "bruno junqueira" |
whats the first height of patient 012-18025 since 07/2104? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 num... | SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-18025') AND NOT patient.admissionheight IS NULL AND STRFTIME('%y-%m', patient.unitadmittime) >= '2104-07' ORDER BY patient.unitadmittime LIMIT 1 |
What position did Nell McAndrew finish? | CREATE TABLE table_19287 ("Celebrity" text,"Famous for" text,"Entered" text,"Exited" text,"Finished" text) | SELECT "Finished" FROM table_19287 WHERE "Celebrity" = 'Nell McAndrew' |
Open posts with closed votes by year. | CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE PostLinks (Id n... | SELECT p.Id AS "post_link", COUNT(v.Id) AS TotalVotes FROM Posts AS p INNER JOIN Votes AS v ON p.Id = v.PostId WHERE v.VoteTypeId = 6 AND p.ClosedDate IS NULL AND YEAR(p.CreationDate) = @year AND p.ViewCount < 100 GROUP BY p.Id ORDER BY totalvotes DESC |
Tags by % of closed questions. | CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Com... | SELECT t.TagName, ROUND(AVG(CASE WHEN p.ClosedDate IS NULL THEN 0.0 ELSE 100.0 END), 2) AS "Close %", COUNT(*) AS "# of questions" FROM Posts AS p INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId GROUP BY t.TagName HAVING COUNT(*) >= 20 ORDER BY 2 DESC LIMIT 100 |
What was the home team score for the game played at Princes Park? | CREATE TABLE table_name_3 (home_team VARCHAR,venue VARCHAR) | SELECT home_team AS score FROM table_name_3 WHERE venue = "princes park" |
what's the name of the specimen test that was first given to patient 031-17834 in 10/this year? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,dr... | SELECT microlab.culturesite FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-17834')) AND DATETIME(microlab.culturetakentime, 'start of year') ... |
Which tourist attraction is associated with the photo 'game1'? Return its name. | CREATE TABLE locations (location_id number,location_name text,address text,other_details text)CREATE TABLE features (feature_id number,feature_details text)CREATE TABLE shops (shop_id number,shop_details text)CREATE TABLE ref_hotel_star_ratings (star_rating_code text,star_rating_description text)CREATE TABLE hotels (ho... | SELECT T2.name FROM photos AS T1 JOIN tourist_attractions AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id WHERE T1.name = "game1" |
What are the categories of events that occurred after 2007 that were World Championships? | CREATE TABLE table_67982 ("Competition" text,"Venue" text,"Year" real,"Category" text,"Result" text) | SELECT "Category" FROM table_67982 WHERE "Year" > '2007' AND "Competition" = 'world championships' |
What is Australia's Disposable USD growth? | CREATE TABLE table_26873 ("Rank" real,"Country" text,"Disposable USD 2011" real,"Disposable USD growth" real,"Compulsory deduction" text,"Gross USD 2011" real) | SELECT MAX("Disposable USD growth") FROM table_26873 WHERE "Country" = 'Australia' |
Who are all writers with original air date of October 23, 1996? | CREATE TABLE table_28380 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by:" text,"Original air date" text) | SELECT "Written by:" FROM table_28380 WHERE "Original air date" = 'October 23, 1996' |
I have fulfilled what prerequisites for REEES 695 already ? | 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_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite, student_record WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND COURSE_1.course_id = course_prerequisite.course_id AND COURSE_1.department = 'REEES' AND COURSE_1.number =... |
What are the ids of the problems which are reported before 1978-06-26? | CREATE TABLE problem_log (problem_log_id number,assigned_to_staff_id number,problem_id number,problem_category_code text,problem_status_code text,log_entry_date time,log_entry_description text,log_entry_fix text,other_log_details text)CREATE TABLE problem_status_codes (problem_status_code text,problem_status_descriptio... | SELECT problem_id FROM problems WHERE date_problem_reported < "1978-06-26" |
What is the date where the winner was Tom Kite (10)? | CREATE TABLE table_name_24 (date VARCHAR,winner VARCHAR) | SELECT date FROM table_name_24 WHERE winner = "tom kite (10)" |
give the number of patients whose admission type is emergency and the lab test name is cd3 cells percentage. | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND lab.label = "CD3 Cells, Percent" |
What is every English translation when Tamil months is M rkazhi, Tai? | CREATE TABLE table_21669 ("Season in Tamil" text,"English Transliteration" text,"English Translation" text,"Season in Sanskrit" text,"Season in English" text,"Tamil Months" text,"Gregorian Months" text) | SELECT "English Translation" FROM table_21669 WHERE "Tamil Months" = 'mārkazhi, tai' |
What is the church name for the church located in Kyrkjeb ? | CREATE TABLE table_178389_1 (church_name VARCHAR,location_of_the_church VARCHAR) | SELECT church_name FROM table_178389_1 WHERE location_of_the_church = "Kyrkjebø" |
What is the location of the tournament that the share of winning is 7000? | CREATE TABLE table_469 ("Year" text,"Champion" text,"Country" text,"Score" text,"Tournament location" text,"Purse ($)" real,"Winners share ($)" real) | SELECT "Tournament location" FROM table_469 WHERE "Winners share ($)" = '7000' |
what's the maximum peru vs. world (percent) with 9672 species in the world | CREATE TABLE table_11727969_1 (peru_vs_world__percent_ INTEGER,species_in_the_world VARCHAR) | SELECT MAX(peru_vs_world__percent_) FROM table_11727969_1 WHERE species_in_the_world = 9672 |
Name the city with Feb of 66 f / 18.9 c | CREATE TABLE table_name_63 (city VARCHAR,feb VARCHAR) | SELECT city FROM table_name_63 WHERE feb = "66 °f / 18.9 °c" |
what is the measure number for the init type? | CREATE TABLE table_73835 ("meas. num" real,"passed" text,"YES votes" real,"NO votes" real,"% YES" text,"Const. Amd.?" text,"type" text,"description" text) | SELECT "meas. num" FROM table_73835 WHERE "type" = 'Init' |
What upper level electives are offered before noon ? | 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 semester (semester_id int,semester varchar,year int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit i... | SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.end_time <= '12:00:00' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semest... |
Which player has 18-50 .360 field goals? | CREATE TABLE table_22875514_3 (player VARCHAR,field_goals VARCHAR) | SELECT player FROM table_22875514_3 WHERE field_goals = "18-50 .360" |
What team belongs to Delmar? | CREATE TABLE table_67112 ("School" text,"Team" text,"Division Record" text,"Overall Record" text,"Season Outcome" text) | SELECT "Team" FROM table_67112 WHERE "School" = 'delmar' |
What is the total difference for teams that played less than 6 games? | CREATE TABLE table_33276 ("Club" text,"Played" real,"Lost" real,"Drawn" real,"Against" real,"Diff." real,"Points" real) | SELECT SUM("Diff.") FROM table_33276 WHERE "Played" < '6' |
What was the result for the nomination of Best Revival of a Musical? | CREATE TABLE table_name_90 (result VARCHAR,category VARCHAR) | SELECT result FROM table_name_90 WHERE category = "best revival of a musical" |
What is the Official Name of the Community with an Area km 2 of 16.13? | CREATE TABLE table_name_50 (official_name VARCHAR,area_km_2 VARCHAR) | SELECT official_name FROM table_name_50 WHERE area_km_2 = 16.13 |
What was the to par for Tino Schuster? | CREATE TABLE table_name_7 (to_par VARCHAR,player VARCHAR) | SELECT to_par FROM table_name_7 WHERE player = "tino schuster" |
What are the carriers of devices that are not in stock anywhere? | CREATE TABLE shop (shop_id number,shop_name text,location text,open_date text,open_year number)CREATE TABLE device (device_id number,device text,carrier text,package_version text,applications text,software_platform text)CREATE TABLE stock (shop_id number,device_id number,quantity number) | SELECT carrier FROM device WHERE NOT device_id IN (SELECT device_id FROM stock) |
When is sample 3763 collected? | CREATE TABLE resultsdata15 (sample_pk number,commod text,commtype text,lab text,pestcode text,testclass text,concen number,lod number,conunit text,confmethod text,confmethod2 text,annotate text,quantitate text,mean text,extract text,determin text)CREATE TABLE sampledata15 (sample_pk number,state text,year text,month te... | SELECT year, month, day FROM sampledata15 WHERE sample_pk = 3763 |
What is the City/State of the Oran Park race? | CREATE TABLE table_4949 ("Race Title" text,"Circuit" text,"City / State" text,"Date" text,"Winner" text) | SELECT "City / State" FROM table_4949 WHERE "Race Title" = 'oran park' |
How many entries for highest when the low team was baltimore rays? | CREATE TABLE table_2937 ("Season" real,"Lowest" real,"Low Team" text,"Average" real,"Highest" real,"High Team" text,"2nd Highest" real,"2nd Team" text) | SELECT COUNT("Highest") FROM table_2937 WHERE "Low Team" = 'Baltimore Rays' |
What is the pages per minute (color) of the machine that has a max page size of a4 and dimensions (mm) of 303 x 94 x 60? | CREATE TABLE table_name_31 (pages_per_minute__color_ VARCHAR,max_page_size VARCHAR,dimensions__mm_ VARCHAR) | SELECT pages_per_minute__color_ FROM table_name_31 WHERE max_page_size = "a4" AND dimensions__mm_ = "303 x 94 x 60" |
What is the gender for Otama? | CREATE TABLE table_69792 ("Name" text,"Years" text,"Gender" text,"Area" text,"Authority" text,"Decile" real,"Roll" real) | SELECT "Gender" FROM table_69792 WHERE "Area" = 'otama' |
What season has a league 3rd liga, and away of 1-0? | CREATE TABLE table_60699 ("Season" text,"League" text,"Teams" text,"Home" text,"Away" text) | SELECT "Season" FROM table_60699 WHERE "League" = '3rd liga' AND "Away" = '1-0' |
What are the number of the names of all products? | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT Name, COUNT(Name) FROM Products GROUP BY Name |
What is Opposing Teams, when Status is 'Test Match', and when Date is '25/11/2000'? | CREATE TABLE table_name_96 (opposing_teams VARCHAR,status VARCHAR,date VARCHAR) | SELECT opposing_teams FROM table_name_96 WHERE status = "test match" AND date = "25/11/2000" |
What is the latest episode written by John Shiban & Thomas Schnauz? | CREATE TABLE table_28978 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"U.S. viewers (millions)" text) | SELECT MAX("No. in series") FROM table_28978 WHERE "Written by" = 'John Shiban & Thomas Schnauz' |
Name the analysts | CREATE TABLE table_25204 ("Year" real,"Network" text,"Race caller" text,"s Host" text,"s Analyst" text,"Reporters" text,"Trophy presentation" text) | SELECT "s Analyst" FROM table_25204 |
What is listed as the lowest Year with a Wins that's smaller than 0? | CREATE TABLE table_37833 ("Year" real,"Class" text,"Team" text,"Points" real,"Wins" real) | SELECT MIN("Year") FROM table_37833 WHERE "Wins" < '0' |
which location had the most conferences listed ? | CREATE TABLE table_204_278 (id number,"name of president" text,"picture" text,"life span" text,"year of presidency" text,"place of conference" text) | SELECT "place of conference" FROM table_204_278 GROUP BY "place of conference" ORDER BY COUNT(*) DESC LIMIT 1 |
Show all movie titles, years, and directors, ordered by budget. | CREATE TABLE movie (movie_id number,title text,year number,director text,budget_million number,gross_worldwide number)CREATE TABLE book_club (book_club_id number,year number,author_or_editor text,book_title text,publisher text,category text,result text)CREATE TABLE culture_company (company_name text,type text,incorpora... | SELECT title, year, director FROM movie ORDER BY budget_million |
What is John Marvin Wierenga's occupation? | CREATE TABLE table_66709 ("Riding" text,"Candidate's Name" text,"Gender" text,"Residence" text,"Occupation" text,"Votes" real,"Rank" text) | SELECT "Occupation" FROM table_66709 WHERE "Candidate's Name" = 'john marvin wierenga' |
What Weight has a 2008 Club of Acqua Paradiso Gabeca? | CREATE TABLE table_63578 ("Name" text,"Height" text,"Weight" text,"Spike" text,"2008 club" text) | SELECT "Weight" FROM table_63578 WHERE "2008 club" = 'acqua paradiso gabeca' |
Which birth place has the most player awards? | CREATE TABLE salary (year number,team_id text,league_id text,player_id text,salary number)CREATE TABLE player_award (player_id text,award_id text,year number,league_id text,tie text,notes text)CREATE TABLE hall_of_fame (player_id text,yearid number,votedby text,ballots text,needed text,votes text,inducted text,category... | SELECT birth_country FROM player AS T1 JOIN player_award AS T2 ON T1.player_id = T2.player_id GROUP BY T1.birth_country ORDER BY COUNT(*) DESC LIMIT 1 |
show me the flight with the smallest seating capacity which leaves PITTSBURGH and arrives in BALTIMORE on 6 14 | CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport text,arrival_time int,arrival_airline text,arrival_flight_number int,departure_time int,departure_airline text,departure_flight_number i... | SELECT DISTINCT FLIGHT_0.flight_id FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, airport_service AS AIRPORT_SERVICE_3, city AS CITY_0, city AS CITY_1, city AS CITY_2, city AS CITY_3, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days A... |
find the number of female patients whose diagnoses is titled lap surg convert to open. | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.short_title = "Lap surg convert to open" |
What is the game that the location attendance is pepsi center 19,894? | CREATE TABLE table_11959669_6 (game INTEGER,location_attendance VARCHAR) | SELECT MAX(game) FROM table_11959669_6 WHERE location_attendance = "Pepsi Center 19,894" |
For those employees who did not have any job in the past, show me about the correlation between employee_id and department_id in a scatter chart. | CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))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),EMAI... | SELECT EMPLOYEE_ID, DEPARTMENT_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) |
What is South Africa's to par? | CREATE TABLE table_name_35 (to_par VARCHAR,country VARCHAR) | SELECT to_par FROM table_name_35 WHERE country = "south africa" |
provide the number of patients whose admission year is less than 2194 and lab test abnormal status is delta? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2194" AND lab.flag = "delta" |
What player from the United States had a total of 297? | CREATE TABLE table_61580 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" text,"Finish" text) | SELECT "Player" FROM table_61580 WHERE "Country" = 'united states' AND "Total" = '297' |
information on flights from BOSTON to WASHINGTON | CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport text,arrival_time int,arrival_airline text,arrival_flight_number i... | 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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHING... |
Which start station had the most trips starting from August? Give me the name and id of the station. | CREATE TABLE status (station_id number,bikes_available number,docks_available number,time text)CREATE TABLE station (id number,name text,lat number,long number,dock_count number,city text,installation_date text)CREATE TABLE trip (id number,duration number,start_date text,start_station_name text,start_station_id number,... | SELECT start_station_name, start_station_id FROM trip WHERE start_date LIKE "8/%" GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1 |
Get body and score of questions in specified date interval. | CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,R... | SELECT Body, Score, CreationDate FROM Posts WHERE PostTypeId = 1 AND CreationDate BETWEEN '##Startdate:string##' AND '##Enddate:string##' |
Which lava domes erupted or had a growth episode during the Holocene period? | CREATE TABLE table_1081235_1 (name_of_lava_dome VARCHAR,last_eruption_or_growth_episode VARCHAR) | SELECT name_of_lava_dome FROM table_1081235_1 WHERE last_eruption_or_growth_episode = "Holocene" |
What is the location and attendance on October 18? | CREATE TABLE table_27713030_3 (location_attendance VARCHAR,date VARCHAR) | SELECT location_attendance FROM table_27713030_3 WHERE date = "October 18" |
calculate the total number of patients diagnosed with obstructive chronic bronchitis with acute bronchitis | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Obstructive chronic bronchitis with acute bronchitis" |
what number of swat games were made for microsoft windows ? | CREATE TABLE table_203_633 (id number,"title" text,"year" number,"platform" text,"developer" text,"publisher" text) | SELECT COUNT("title") FROM table_203_633 WHERE "platform" = 'microsoft windows' |
What is the name when the position is de and college is ohio state? | CREATE TABLE table_401 ("Name" text,"Position" text,"Height" text,"Weight(lbs)" real,"Born" text,"College" text,"Drafted" text,"Pro Team" text) | SELECT "Name" FROM table_401 WHERE "Position" = 'DE' AND "College" = 'Ohio State' |
Is it true that Geoffrey E. Hinton has more citations than Yann Lecun ? | CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE paperkeyphrase (paperid int,keyphraseid int)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE field (fieldid int)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABL... | SELECT DISTINCT author.authorname, COUNT(writes.paperid) FROM author, writes WHERE author.authorname IN ('Geoffrey E. Hinton', 'Yann Lecun') AND writes.authorid = author.authorid GROUP BY author.authorname ORDER BY COUNT(writes.paperid) DESC |
Find the total population of the districts where the area is bigger than the average city area. | CREATE TABLE store_district (store_id number,district_id number)CREATE TABLE product (product_id number,product text,dimensions text,dpi number,pages_per_minute_color number,max_page_size text,interface text)CREATE TABLE store (store_id number,store_name text,type text,area_size number,number_of_product_category number... | SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district) |
tell me the total magnesium sulfate dose that patient 11426 has been prescribed until 36 months ago? | CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,sta... | SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11426) AND prescriptions.drug = 'magnesium sulfate' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-36 month') |
Who was the opponent in the 2011 event with less than 113 players? | CREATE TABLE table_name_72 (opponent VARCHAR,player VARCHAR,event VARCHAR) | SELECT opponent FROM table_name_72 WHERE player < 113 AND event = 2011 |
give me the number of patients whose admission type is urgent and procedure icd9 code is 5771? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.icd9_code = "5771" |
What was the constructor in the Belgian Grand Prix round? | CREATE TABLE table_2911781_3 (constructor VARCHAR,grand_prix VARCHAR) | SELECT constructor FROM table_2911781_3 WHERE grand_prix = "Belgian grand_prix" |
show me the evening flights from PHILADELPHIA to ATLANTA | CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)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_s... | 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 = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '... |
What's the rank that has a total of less than 1? | CREATE TABLE table_61819 ("Rank" real,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT SUM("Rank") FROM table_61819 WHERE "Total" < '1' |
What is the recorded conference that was a Wac Conference? | CREATE TABLE table_name_73 (record__conf_ VARCHAR,conference VARCHAR) | SELECT record__conf_ FROM table_name_73 WHERE conference = "wac" |
How many earnings have Wins larger than 3? | CREATE TABLE table_34474 ("Rank" real,"Player" text,"Country" text,"Earnings ($)" real,"Events" real,"Wins" real) | SELECT SUM("Earnings ( $ )") FROM table_34474 WHERE "Wins" > '3' |
On what date is St Kilda the away team? | CREATE TABLE table_name_31 (date VARCHAR,away_team VARCHAR) | SELECT date FROM table_name_31 WHERE away_team = "st kilda" |
how many patients whose primary disease is left femur fracture and admission year is less than 2203? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LEFT FEMUR FRACTURE" AND demographic.admityear < "2203" |
Who is the usual teacher of MO 899 ? | CREATE TABLE course_offering (offering_id int,course_id int,semester int,section_number int,start_time time,end_time time,monday varchar,tuesday varchar,wednesday varchar,thursday varchar,friday varchar,saturday varchar,sunday varchar,has_final_project varchar,has_final_exam varchar,textbook varchar,class_address varch... | SELECT COUNT(instructor.name), instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'MO' AND course.number = 899 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = cour... |
What is the title for the Korean progran on KBS2? | CREATE TABLE table_name_96 (title VARCHAR,language VARCHAR,network VARCHAR) | SELECT title FROM table_name_96 WHERE language = "korean" AND network = "kbs2" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.