instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Which College has a Position of Offensive Tackle? | CREATE TABLE table_65136 ("Pick" real,"Team" text,"Player" text,"Position" text,"College" text) | SELECT "College" FROM table_65136 WHERE "Position" = 'offensive tackle' |
What episode took place in Belfast Waterfront Hall? | CREATE TABLE table_23122988_1 (episode VARCHAR,location VARCHAR) | SELECT episode FROM table_23122988_1 WHERE location = "Belfast Waterfront Hall" |
What is the horizontal bar score with a pommel horse of n/a, and the position is less than 27, and the parallel bars score is 15.800? | CREATE TABLE table_64211 ("Position" real,"Gymnast" text,"Floor" text,"Pommel Horse" text,"Rings" text,"Vault" text,"Parallel Bars" text,"Horizontal Bar" text,"Total" real) | SELECT "Horizontal Bar" FROM table_64211 WHERE "Pommel Horse" = 'n/a' AND "Position" < '27' AND "Parallel Bars" = '15.800' |
What candidates were in the election when james patrick sutton was incumbent? | CREATE TABLE table_1342013_41 (candidates VARCHAR,incumbent VARCHAR) | SELECT candidates FROM table_1342013_41 WHERE incumbent = "James Patrick Sutton" |
What is the description of the role named 'Proof Reader'? | CREATE TABLE ref_document_types (document_type_code text,document_type_name text,document_type_description text)CREATE TABLE employees (employee_id number,role_code text,employee_name text,gender_mfu text,date_of_birth time,other_details text)CREATE TABLE ref_locations (location_code text,location_name text,location_de... | SELECT role_description FROM roles WHERE role_name = "Proof Reader" |
When Symbian/Series 40 is 0.40%, what is the percentage of 'other'? | CREATE TABLE table_16678 ("Source" text,"Date" text,"Method" text,"iOS" text,"Android" text,"BlackBerry" text,"Symbian / Series 40" text,"Bada" text,"Windows" text,"Other" text) | SELECT "Other" FROM table_16678 WHERE "Symbian / Series 40" = '0.40%' |
how much metronidazole was prescribed for the last time the last month to patient 23070? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_i... | SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 23070) AND prescriptions.drug = 'metronidazole' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') ORD... |
What round did the spartak moscow club play? | CREATE TABLE table_13228 ("Season" text,"Competition" text,"Round" text,"Club" text,"Home" text,"Away" text,"Aggregate" text) | SELECT "Round" FROM table_13228 WHERE "Club" = 'spartak moscow' |
For those employees who was hired before 2002-06-21, draw a bar chart about the distribution of job_id and the average of employee_id , and group by attribute job_id. | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE locations (LOCATION_ID decimal(4,0)... | SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID |
When was Color of green first issued? | CREATE TABLE table_name_51 (first_issued INTEGER,color VARCHAR) | SELECT MIN(first_issued) FROM table_name_51 WHERE color = "green" |
Which home team played at Princes Park? | CREATE TABLE table_name_67 (home_team VARCHAR,venue VARCHAR) | SELECT home_team FROM table_name_67 WHERE venue = "princes park" |
Which CFL team drafted a pick from Boston College? | CREATE TABLE table_name_5 (cfl_team VARCHAR,college VARCHAR) | SELECT cfl_team FROM table_name_5 WHERE college = "boston college" |
What is the match total for a score over 299 and under 412 innings? | CREATE TABLE table_name_26 (matches INTEGER,high_score VARCHAR,innings VARCHAR) | SELECT SUM(matches) FROM table_name_26 WHERE high_score = "299" AND innings < 412 |
Return a bar chart on how many hours do the students spend studying in each department? | CREATE TABLE PROFESSOR (EMP_NUM int,DEPT_CODE varchar(10),PROF_OFFICE varchar(50),PROF_EXTENSION varchar(4),PROF_HIGH_DEGREE varchar(5))CREATE TABLE DEPARTMENT (DEPT_CODE varchar(10),DEPT_NAME varchar(30),SCHOOL_CODE varchar(8),EMP_NUM int,DEPT_ADDRESS varchar(20),DEPT_EXTENSION varchar(4))CREATE TABLE EMPLOYEE (EMP_NU... | SELECT DEPT_CODE, SUM(STU_HRS) FROM STUDENT GROUP BY DEPT_CODE |
do you have a flight from BOSTON to FORT WORTH | CREATE TABLE code_description (code varchar,description text)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_required text,minimum_stay int,maximum_stay int,application text,no_discounts text)CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TAB... | 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 = 'FORT WO... |
What kind of bleeding does aspirin cause? | CREATE TABLE table_17570 ("Condition" text,"Prothrombin time" text,"Partial thromboplastin time" text,"Bleeding time" text,"Platelet count" text) | SELECT "Bleeding time" FROM table_17570 WHERE "Condition" = 'Aspirin' |
When dietrich fischer-dieskau is the olivier who is the conductor? | CREATE TABLE table_31319 ("Year" text,"Conductor" text,"Opera House or Orchestra" text,"Label" text,"Countess" text,"Count" text,"Flamand" text,"Olivier" text,"La Roche" text,"Clairon" text) | SELECT "Conductor" FROM table_31319 WHERE "Olivier" = 'Dietrich Fischer-Dieskau' |
Who won the womens singles in the 1958/1959 season? | CREATE TABLE table_17583 ("Season" text,"Mens singles" text,"Womens singles" text,"Mens doubles" text,"Womens doubles" text,"Mixed doubles" text) | SELECT "Womens singles" FROM table_17583 WHERE "Season" = '1958/1959' |
Who was the GTO winning team in round 5 when the GTU winning team was #59 Brumos Porsche - Audi? | CREATE TABLE table_851 ("Rnd" real,"Circuit" text,"GTO Winning Team" text,"GTU Winning Team" text,"TO Winning Team" text,"TU Winning Team" text,"Results" text) | SELECT "GTO Winning Team" FROM table_851 WHERE "Rnd" = '5' AND "GTU Winning Team" = '#59 Brumos Porsche - Audi' |
what is the number of patients whose days of hospital stay is greater than 4 and item id is 51347? | 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.days_stay > "4" AND lab.itemid = "51347" |
List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order. | CREATE TABLE has_amenity (amenid VARCHAR,dormid VARCHAR)CREATE TABLE dorm_amenity (amenity_name VARCHAR,amenid VARCHAR)CREATE TABLE dorm (dormid VARCHAR,dorm_name VARCHAR) | SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid = T1.amenid JOIN dorm AS T3 ON T2.dormid = T3.dormid WHERE T3.dorm_name = 'Anonymous Donor Hall' ORDER BY T1.amenity_name |
For those employees who do not work in departments with managers that have ids between 100 and 200, visualize the relationship between commission_pct and department_id . | CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME var... | SELECT COMMISSION_PCT, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) |
What republican candidate was first elected most recently? | CREATE TABLE table_18363 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT MAX("First elected") FROM table_18363 WHERE "Party" = 'Republican' |
total # of post history. | CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body ... | SELECT COUNT(*) FROM PostHistory |
how many patients aged below 79 years had the procedure short title suture of artery? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "79" AND procedures.short_title = "Suture of artery" |
What loss has october 1 as the date? | CREATE TABLE table_67846 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Record" text) | SELECT "Loss" FROM table_67846 WHERE "Date" = 'october 1' |
when is the first procedure time of patient 12797 in 2102? | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code... | SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12797) AND STRFTIME('%y', procedures_icd.charttime) = '2102' ORDER BY procedures_icd.charttime LIMIT 1 |
Show me about the correlation between School_ID and All_Games_Percent , and group by attribute Team_Name in a scatter chart. | CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Perce... | SELECT School_ID, All_Games_Percent FROM basketball_match GROUP BY Team_Name |
What is the Time/Retired with over 56 laps and a grid of 5? | CREATE TABLE table_56266 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT "Time/Retired" FROM table_56266 WHERE "Laps" > '56' AND "Grid" = '5' |
How many patients with diagnoses icd9 code 3572 are still unmarried? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "SINGLE" AND diagnoses.icd9_code = "3572" |
What is the highest Pick, when Round is greater than 15, and when College is 'Tennessee'? | CREATE TABLE table_77071 ("Round" real,"Pick" real,"Overall" real,"Name" text,"Position" text,"College" text) | SELECT MAX("Pick") FROM table_77071 WHERE "Round" > '15' AND "College" = 'tennessee' |
What is the rank of the team with 1 bronze and 0 gold medals? | CREATE TABLE table_name_2 (rank VARCHAR,bronze VARCHAR,gold VARCHAR) | SELECT rank FROM table_name_2 WHERE bronze = 1 AND gold = 0 |
what was the only year the team was relegated ? | CREATE TABLE table_204_589 (id number,"season" text,"tier" number,"division" text,"pos." text,"notes" text) | SELECT "season" FROM table_204_589 WHERE "notes" = 'relegated' |
What region is on 11 August 2008? | CREATE TABLE table_name_4 (region VARCHAR,date VARCHAR) | SELECT region FROM table_name_4 WHERE date = "11 august 2008" |
Who is the opponent in the final on August 14, 2006? | CREATE TABLE table_name_3 (opponent_in_the_final VARCHAR,date VARCHAR) | SELECT opponent_in_the_final FROM table_name_3 WHERE date = "august 14, 2006" |
Which Eliminated has an Entered smaller than 2? | CREATE TABLE table_65171 ("Eliminated" text,"Tag Team" text,"Entered" real,"Eliminated by" text,"Time" text) | SELECT "Eliminated by" FROM table_65171 WHERE "Entered" < '2' |
What is Call Sign, when City of License is Brownfield, Texas? | CREATE TABLE table_77227 ("Call sign" text,"Frequency MHz" real,"City of license" text,"ERP W" real,"Class" text,"FCC info" text) | SELECT "Call sign" FROM table_77227 WHERE "City of license" = 'brownfield, texas' |
Show the names of aircrafts that are associated with both an airport named 'London Heathrow' and an airport named 'London Gatwick | CREATE TABLE pilot (pilot_id number,name text,age number)CREATE TABLE airport (airport_id number,airport_name text,total_passengers number,%_change_2007 text,international_passengers number,domestic_passengers number,transit_passengers number,aircraft_movements number,freight_metric_tonnes number)CREATE TABLE airport_a... | SELECT T1.aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.aircraft_id = T2.aircraft_id JOIN airport AS T3 ON T2.airport_id = T3.airport_id WHERE T3.airport_name = "London Heathrow" INTERSECT SELECT T1.aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.aircraft_id = T2.aircraft_id JOIN airport... |
what is drug code and drug route of drug name cefpodoxime proxetil? | 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 prescriptions.formulary_drug_cd, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Cefpodoxime Proxetil" |
What was the competition for goal 8? | CREATE TABLE table_name_73 (competition VARCHAR,goal VARCHAR) | SELECT competition FROM table_name_73 WHERE goal = 8 |
What is the total number of Years that has the Group, Method Fest Independent Film Festival? | CREATE TABLE table_name_45 (year VARCHAR,group VARCHAR) | SELECT COUNT(year) FROM table_name_45 WHERE group = "method fest independent film festival" |
What is the name of the country that has internetlists of , and ONIsecurityfiltering of ? | CREATE TABLE table_name_80 (country VARCHAR,internetlists VARCHAR,onisecurityfiltering VARCHAR) | SELECT country FROM table_name_80 WHERE internetlists = "—" AND onisecurityfiltering = "—" |
What is the frequency for the radio owned by bell media with a call sign of chsu-fm? | CREATE TABLE table_name_6 (frequency VARCHAR,owner VARCHAR,call_sign VARCHAR) | SELECT frequency FROM table_name_6 WHERE owner = "bell media" AND call_sign = "chsu-fm" |
Which classes are handled by Dr. Tanya Logan ? | CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa float,entered_as varchar,admit_term int,predicted_graduation_semester int,degree varcha... | 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... |
Which Copa Libertadores 1996 has a Team of estudiantes? | CREATE TABLE table_name_10 (copa_libertadores_1996 VARCHAR,team VARCHAR) | SELECT copa_libertadores_1996 FROM table_name_10 WHERE team = "estudiantes" |
calculate the maximum age of unmarried patients who have st-elevation myocardial infarction 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 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,ethni... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "STEMI" |
Which Player has a Pick larger than 20? | CREATE TABLE table_8852 ("Pick" real,"Player" text,"Position" text,"Nationality" text,"Former Team" text) | SELECT "Player" FROM table_8852 WHERE "Pick" > '20' |
Name the first elected for new york 1 | CREATE TABLE table_18195 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT COUNT("First elected") FROM table_18195 WHERE "District" = 'New York 1' |
in 2005 , what city had the most population recorded ? | CREATE TABLE table_204_381 (id number,"sum" number,"mongolian" number,"population\n(2005)" number,"population\n(2008)" number,"population\n(2009)" number,"area\nkm2" number,"density\n/km2" number,"sum centre\npopulation" number) | SELECT "sum" FROM table_204_381 ORDER BY "population\n(2005)" DESC LIMIT 1 |
What are the ids and names of all start stations that were the beginning of at least 200 trips? | CREATE TABLE trip (id number,duration number,start_date text,start_station_name text,start_station_id number,end_date text,end_station_name text,end_station_id number,bike_id number,subscription_type text,zip_code number)CREATE TABLE weather (date text,max_temperature_f number,mean_temperature_f number,min_temperature_... | SELECT start_station_id, start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*) >= 200 |
Get quarterly breakdown of answered/unanswered questions for a tag. | CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,... | SELECT DATEADD(quarter, DATEDIFF(quarter, 0, CreationDate), 0) AS quart, COUNT(p.Id) AS total_posts, SUM(CASE WHEN p.PostTypeId = 1 THEN 1 ELSE 0 END) AS questions, SUM(CASE WHEN p.PostTypeId = 2 THEN 1 ELSE 0 END) AS answers, SUM(CASE WHEN p.PostTypeId = 1 AND NOT p.AcceptedAnswerId IS NULL THEN 1 ELSE 0 END) AS answe... |
What percentage of browsers were using Internet Explorer during the period in which 24.91% were using Chrome? | CREATE TABLE table_65828 ("Internet Explorer" text,"Firefox,Other Mozilla" text,"Chrome" text,"Safari" text,"Opera" text) | SELECT "Internet Explorer" FROM table_65828 WHERE "Chrome" = '24.91%' |
What are the grapes, appelations, and wines with scores above 93, sorted by Name? | CREATE TABLE appellations (no number,appelation text,county text,state text,area text,isava text)CREATE TABLE wine (no number,grape text,winery text,appelation text,state text,name text,year number,price number,score number,cases number,drink text)CREATE TABLE grapes (id number,grape text,color text) | SELECT grape, appelation, name FROM wine WHERE score > 93 ORDER BY name |
what are flights from BOSTON to ST. PETERSBURG | CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE time_interval (period text,begin_time int,end_time int)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE date_day (month_number int,day_number... | 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 = 'ST. PET... |
Where is the headquarter of the company founded by James? | CREATE TABLE products (code number,name text,price number,manufacturer number)CREATE TABLE manufacturers (code number,name text,headquarter text,founder text,revenue number) | SELECT headquarter FROM manufacturers WHERE founder = 'James' |
Bar chart x axis location y axis sum total passengers, show from low to high by the x axis. | CREATE TABLE train_station (Train_ID int,Station_ID int)CREATE TABLE train (Train_ID int,Name text,Time text,Service text)CREATE TABLE station (Station_ID int,Name text,Annual_entry_exit real,Annual_interchanges real,Total_Passengers real,Location text,Main_Services text,Number_of_Platforms int) | SELECT Location, SUM(Total_Passengers) FROM station GROUP BY Location ORDER BY Location |
where did i put that comment. | CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABL... | SELECT * FROM Comments WHERE UserId = '3604745' AND Text LIKE '%example%' |
Who was the coach who had 215 losses? | CREATE TABLE table_name_33 (coach VARCHAR,losses VARCHAR) | SELECT coach FROM table_name_33 WHERE losses = 215 |
What is the title of the episode written by Vanessa Bates? | CREATE TABLE table_19517621_4 (title VARCHAR,written_by VARCHAR) | SELECT title FROM table_19517621_4 WHERE written_by = "Vanessa Bates" |
What are the draft pick numbers and draft classes for players who play the Defender position Show bar chart, and could you order x-axis in descending order? | CREATE TABLE country (Country_id int,Country_name text,Capital text,Official_native_language text)CREATE TABLE player (Player_ID int,Player text,Years_Played text,Total_WL text,Singles_WL text,Doubles_WL text,Team int)CREATE TABLE match_season (Season real,Player text,Position text,Country int,Team int,Draft_Pick_Numbe... | SELECT Draft_Class, Draft_Pick_Number FROM match_season WHERE Position = "Defender" ORDER BY Draft_Class DESC |
What was the number of others votes in Columbia county? | CREATE TABLE table_20693870_1 (others_number INTEGER,county VARCHAR) | SELECT MIN(others_number) FROM table_20693870_1 WHERE county = "Columbia" |
A bar chart for showing the number of the facility codes of apartments with more than 4 bedrooms, and I want to display in ascending by the facility_code. | CREATE TABLE Guests (guest_id INTEGER,gender_code CHAR(1),guest_first_name VARCHAR(80),guest_last_name VARCHAR(80),date_of_birth DATETIME)CREATE TABLE Apartments (apt_id INTEGER,building_id INTEGER,apt_type_code CHAR(15),apt_number CHAR(10),bathroom_count INTEGER,bedroom_count INTEGER,room_count CHAR(5))CREATE TABLE Ap... | SELECT facility_code, COUNT(facility_code) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4 GROUP BY facility_code ORDER BY facility_code |
What event was the competition World Junior Championships in 2010? | CREATE TABLE table_14175 ("Year" real,"Competition" text,"Venue" text,"Position" text,"Event" text) | SELECT "Event" FROM table_14175 WHERE "Competition" = 'world junior championships' AND "Year" = '2010' |
What is Viewers, when 18-49 is 'N/A', and when Weekly Winner is 'Wedding DJ Chris Dixon'? | CREATE TABLE table_61838 ("Air Date" text,"Rating" text,"18-49" text,"Viewers" text,"Weekly Winner" text) | SELECT "Viewers" FROM table_61838 WHERE "18-49" = 'n/a' AND "Weekly Winner" = 'wedding dj chris dixon' |
Find the number of courses offered by Psychology department in each year with a line chart. | CREATE TABLE classroom (building varchar(15),room_number varchar(7),capacity numeric(4,0))CREATE TABLE department (dept_name varchar(20),building varchar(15),budget numeric(12,2))CREATE TABLE section (course_id varchar(8),sec_id varchar(8),semester varchar(6),year numeric(4,0),building varchar(15),room_number varchar(7... | SELECT year, COUNT(year) FROM course AS T1 JOIN section AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' GROUP BY year |
Name the high points for pepsi center 18,611 | CREATE TABLE table_17355408_5 (high_points VARCHAR,location_attendance VARCHAR) | SELECT high_points FROM table_17355408_5 WHERE location_attendance = "Pepsi Center 18,611" |
How many times has the points total for the afc cup competion been 289? | CREATE TABLE table_14460937_1 (afc_cup VARCHAR,points__total_500_ VARCHAR) | SELECT COUNT(afc_cup) FROM table_14460937_1 WHERE points__total_500_ = 289 |
How many items appear in the dividend per share when the turnover is 0.42? | CREATE TABLE table_74297 ("Period ended" text,"Turnover (\u00a3m)" text,"Profit before tax (\u00a3m)" text,"Dividend per share (p)" text,"Adjusted earnings per share diluted (p)" text) | SELECT COUNT("Dividend per share (p)") FROM table_74297 WHERE "Turnover (\u00a3m)" = '0.42' |
What was the CPI of West Manila when its share of 1996 real tariff is 189%? | CREATE TABLE table_21484 ("Year" real,"West Manila" text,"East Manila" text,"Consumer Price Index (2005=100)" text,"West Manila as a share of 1996 real tariff" text,"East Manila as a share of 1996 real tariff" text) | SELECT "Consumer Price Index (2005=100)" FROM table_21484 WHERE "West Manila as a share of 1996 real tariff" = '189%' |
provide the number of patients whose admission location is trsf within this facility and drug name is prismasate (b22 k4)? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND prescriptions.drug = "Prismasate (B22 K4)" |
who is the NBA team for the draft year after 2003 with a height of 6'10' and home town of st. charles, mo? | CREATE TABLE table_70626 ("Position" text,"Name" text,"Height" text,"Weight (lbs.)" real,"Hometown" text,"Draft Year" real,"Pick" text,"All-Stars" text,"NBA Championships" text,"NBA Team" text) | SELECT "NBA Team" FROM table_70626 WHERE "Draft Year" > '2003' AND "Height" = '6''10' AND "Hometown" = 'st. charles, mo' |
what are the five most frequently ordered lab tests for patients who have been diagnosed with cerebral subdural hematoma - secondary to trauma earlier until 2101 during the same hospital visit? | 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 t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cerebral subdural... |
what is the number of opponents that play at 4pm ? | CREATE TABLE table_204_718 (id number,"date" text,"opponent" text,"time" text,"score" text,"record" text) | SELECT COUNT("opponent") FROM table_204_718 WHERE "time" = '4 p.m' |
What is reserved for the constituency of 228? | CREATE TABLE table_66575 ("Constituency number" text,"Name" text,"Reserved for (SC / ST /None)" text,"District" text,"Number of electorates (2009)" real) | SELECT "Reserved for ( SC / ST /None)" FROM table_66575 WHERE "Constituency number" = '228' |
What was the date of game 75? | CREATE TABLE table_46723 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "Date" FROM table_46723 WHERE "Game" = '75' |
How many kids stay in the rooms reserved by ROY SWEAZY? | CREATE TABLE Reservations (kids VARCHAR,FirstName VARCHAR,LastName VARCHAR) | SELECT kids FROM Reservations WHERE FirstName = "ROY" AND LastName = "SWEAZY" |
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the amount of name , and group by attribute name, could you show x axis in desc order? | CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL)CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER) | SELECT T2.Name, COUNT(T2.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC |
When was the home game for the NY Islanders? | CREATE TABLE table_name_20 (date VARCHAR,home VARCHAR) | SELECT date FROM table_name_20 WHERE home = "ny islanders" |
What district is Ray Musto the incumbent of? | CREATE TABLE table_18299 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "District" FROM table_18299 WHERE "Incumbent" = 'Ray Musto' |
List the number of courses in year 2008 for each instructor in a bar chart, and list name in asc order. | CREATE TABLE course (course_id varchar(8),title varchar(50),dept_name varchar(20),credits numeric(2,0))CREATE TABLE time_slot (time_slot_id varchar(4),day varchar(1),start_hr numeric(2),start_min numeric(2),end_hr numeric(2),end_min numeric(2))CREATE TABLE instructor (ID varchar(5),name varchar(20),dept_name varchar(20... | SELECT name, COUNT(name) FROM course AS T1 JOIN teaches AS T2 ON T1.course_id = T2.course_id JOIN instructor AS T3 ON T2.ID = T3.ID WHERE year = 2008 GROUP BY name ORDER BY name |
What is the sum of Wins, when Year is 1959? | CREATE TABLE table_name_2 (wins INTEGER,year VARCHAR) | SELECT SUM(wins) FROM table_name_2 WHERE year = 1959 |
What is Liscumb when Haydon is 1632? | CREATE TABLE table_16795 ("Ward" text,"Bello" text,"Ben-Tahir" text,"Doucet" text,"Furtenbacher" text,"Gauthier" text,"Haydon" text,"Larter" text,"Lawrance" text,"Libweshya" text,"Liscumb" text) | SELECT "Liscumb" FROM table_16795 WHERE "Haydon" = '1632' |
Who is the opponent on June 6? | CREATE TABLE table_name_23 (opponent VARCHAR,date VARCHAR) | SELECT opponent FROM table_name_23 WHERE date = "june 6" |
For those records from the products and each product's manufacturer, find headquarter and the sum of price , and group by attribute headquarter, and visualize them by a bar chart, and show by the y-axis in ascending please. | 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 Headquarter, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY SUM(Price) |
what is the minimum yearly number of patients who suffer from stroke? | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,l... | SELECT MIN(t1.c1) FROM (SELECT COUNT(DISTINCT diagnosis.patientunitstayid) AS c1 FROM diagnosis WHERE diagnosis.diagnosisname = 'stroke' GROUP BY STRFTIME('%y', diagnosis.diagnosistime)) AS t1 |
What was the attendance for the away team Solihull Moors? | CREATE TABLE table_name_10 (attendance VARCHAR,away_team VARCHAR) | SELECT attendance FROM table_name_10 WHERE away_team = "solihull moors" |
What is the Undecided the others was 4%? | CREATE TABLE table_name_70 (undecided VARCHAR,others VARCHAR) | SELECT undecided FROM table_name_70 WHERE others = "4%" |
What is the sum of Points, when Equipment was 'Zabel-BSU', and when Position was 42? | CREATE TABLE table_50488 ("Position" real,"Equipment" text,"Points" real,"Wins" text,"Second" text,"Third" text) | SELECT SUM("Points") FROM table_50488 WHERE "Equipment" = 'zabel-bsu' AND "Position" = '42' |
How many films were in hindi? | CREATE TABLE table_28197 ("Name of Award" text,"Name of Film" text,"Language" text,"Awardee(s)" text,"Cash Prize" text) | SELECT COUNT("Name of Film") FROM table_28197 WHERE "Language" = 'Hindi' |
How many drama workshop groups are there in each city? Return both the city and the count Plot them as bar chart, and show in asc by the the total number . | CREATE TABLE Performers_in_Bookings (Order_ID INTEGER,Performer_ID INTEGER)CREATE TABLE Marketing_Regions (Marketing_Region_Code CHAR(15),Marketing_Region_Name VARCHAR(255),Marketing_Region_Descriptrion VARCHAR(255),Other_Details VARCHAR(255))CREATE TABLE Order_Items (Order_Item_ID INTEGER,Order_ID INTEGER,Product_ID I... | SELECT City_Town, COUNT(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID = T2.Address_ID GROUP BY T1.City_Town ORDER BY COUNT(*) |
What Player is from the Southern Illinois team? | CREATE TABLE table_52827 ("Player" text,"Nationality" text,"Position" text,"Years for Jazz" text,"School/Club Team" text) | SELECT "Player" FROM table_52827 WHERE "School/Club Team" = 'southern illinois' |
when was the next coach appointed after niger tornadoes fired their coach? | CREATE TABLE table_30339 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Incoming manager" text,"Date of appointment" text) | SELECT "Date of appointment" FROM table_30339 WHERE "Manner of departure" = 'fired' AND "Team" = 'Niger Tornadoes' |
How many candidates are there? | CREATE TABLE candidate (Id VARCHAR) | SELECT COUNT(*) FROM candidate |
What is the status when the rank is 2? | CREATE TABLE table_31232 ("Seed" real,"Rank" real,"Player" text,"Points" real,"Points defending" real,"Points won" real,"New points" real,"Status" text) | SELECT "Status" FROM table_31232 WHERE "Rank" = '2' |
What is the rank for Murphy Oil? | CREATE TABLE table_24672 ("State Rank by Revenue" real,"Company Name" text,"National Rank" real,"Revenue ($billions) 2012 estimate" text,"Headquarters City" text,"Known for" text) | SELECT "State Rank by Revenue" FROM table_24672 WHERE "Company Name" = 'Murphy Oil' |
Draw a bar chart for what are the names and average prices of products for manufacturers whose products cost on average 150 or more?, display by the names from low to high. | 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 T2.Name, AVG(T1.Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name |
what is the average total of the transfer fee in million ? | CREATE TABLE table_204_402 (id number,"rank" number,"player" text,"from" text,"to" text,"transfer fee\n(\u20ac million)" number,"year" number) | SELECT AVG("transfer fee\n(\u20ac million)") FROM table_204_402 |
i want the flights from DENVER to PITTSBURGH | CREATE TABLE code_description (code varchar,description text)CREATE TABLE airport (airport_code varchar,airport_name text,airport_location text,state_code varchar,country_name varchar,time_zone_code varchar,minimum_connect_time int)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_descript... | 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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PITTSBU... |
What is Wayne Grady's total? | CREATE TABLE table_name_93 (total INTEGER,player VARCHAR) | SELECT SUM(total) FROM table_name_93 WHERE player = "wayne grady" |
provide the number of patients whose admission year is less than 2166 and item id is 50885? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2166" AND lab.itemid = "50885" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.