instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What was the number of season number entries that had US Viewers of 12.30 million?
CREATE TABLE table_21781578_2 (season_no VARCHAR,us_viewers__millions_ VARCHAR)
SELECT COUNT(season_no) FROM table_21781578_2 WHERE us_viewers__millions_ = "12.30"
What date was the game when home team crystal palace played?
CREATE TABLE table_name_93 (date VARCHAR,home_team VARCHAR)
SELECT date FROM table_name_93 WHERE home_team = "crystal palace"
When was the game that was held at the Princes Park?
CREATE TABLE table_32808 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Date" FROM table_32808 WHERE "Venue" = 'princes park'
What is the number of Bronze medals of the Nation with 64 total and silver greater than 16?
CREATE TABLE table_39688 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT COUNT("Bronze") FROM table_39688 WHERE "Total" = '64' AND "Silver" > '16'
Name the story number for paul cornell
CREATE TABLE table_18012738_1 (story_no VARCHAR,written_by VARCHAR)
SELECT story_no FROM table_18012738_1 WHERE written_by = "Paul Cornell"
post cardiac arrest
CREATE TABLE table_train_24 ("id" int,"systolic_blood_pressure_sbp" int,"do_not_resuscitate_dnr" bool,"temperature" float,"hypotension" bool,"cardiac_arrest" bool,"age" float,"NOUSE" float)
SELECT * FROM table_train_24 WHERE cardiac_arrest = 1
until 2103, how many patients had been diagnosed with diplopia?
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 icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid nu...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'diplopia') AND STRFTIME('%y', diagnoses_icd.charttime) <= ...
Which NBA draft has a School of huntington high school?
CREATE TABLE table_51899 ("Player" text,"Height" text,"School" text,"Hometown" text,"College" text,"NBA Draft" text)
SELECT "NBA Draft" FROM table_51899 WHERE "School" = 'huntington high school'
What is the average capacity for rooms in each building? Draw a bar chart, rank by the X-axis in descending.
CREATE TABLE prereq (course_id varchar(8),prereq_id varchar(8))CREATE TABLE advisor (s_ID varchar(5),i_ID varchar(5))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),time_slot_id varchar(4))CREATE TABLE takes (ID varchar(5),co...
SELECT building, AVG(capacity) FROM classroom GROUP BY building ORDER BY building DESC
Name the BUSHI when it has kenny omega of yang (7:27)
CREATE TABLE table_name_45 (bushi VARCHAR,kenny_omega VARCHAR)
SELECT bushi FROM table_name_45 WHERE kenny_omega = "yang (7:27)"
What is the proportion of each customer's move in date? Show me the bar chart, and show by the how many date moved in in asc please.
CREATE TABLE Customer_Event_Notes (Customer_Event_Note_ID INTEGER,Customer_Event_ID INTEGER,service_type_code CHAR(15),resident_id INTEGER,property_id INTEGER,date_moved_in DATETIME)CREATE TABLE Residents_Services (resident_id INTEGER,service_id INTEGER,date_moved_in DATETIME,property_id INTEGER,date_requested DATETIME...
SELECT date_moved_in, COUNT(date_moved_in) FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id GROUP BY date_moved_in ORDER BY COUNT(date_moved_in)
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, give me the comparison about the sum of department_id over the hire_date bin hire_date by time by a bar chart.
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),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE countries (COUNTRY_ID varchar(2),COUN...
SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
Give the maximum and minimum product prices for each product type, grouped and ordered by product type.
CREATE TABLE supplier_addresses (supplier_id number,address_id number,date_from time,date_to time)CREATE TABLE products (product_id number,product_type_code text,product_name text,product_price number)CREATE TABLE order_items (order_item_id number,order_id number,product_id number)CREATE TABLE staff (staff_id number,st...
SELECT MAX(product_price), MIN(product_price), product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code
How tall was Player #10?
CREATE TABLE table_12962773_10 (height VARCHAR,no VARCHAR)
SELECT height FROM table_12962773_10 WHERE no = 10
Who is team 1 with an agg of 2-5?
CREATE TABLE table_13644 ("Team 1" text,"Agg." text,"Team 2" text,"1st leg" text,"2nd leg" text)
SELECT "Team 1" FROM table_13644 WHERE "Agg." = '2-5'
What is the Record when antonio davis (14) had the high rebounds?
CREATE TABLE table_7560 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "Record" FROM table_7560 WHERE "High rebounds" = 'antonio davis (14)'
How many season 4 appearances are there by Mrs. Jennifer Knight?
CREATE TABLE table_26240046_1 (season_4 INTEGER,character VARCHAR)
SELECT MIN(season_4) FROM table_26240046_1 WHERE character = "Mrs. Jennifer Knight"
How many male and female assistant professors do we have, display in descending by the X-axis.
CREATE TABLE Participates_in (stuid INTEGER,actid INTEGER)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 Faculty_Participates_in (FacID INTEGER,actid INTEGER)CREATE TABLE Activity (actid INTEGER,activity_...
SELECT Sex, COUNT(*) FROM Faculty WHERE Rank = "AsstProf" GROUP BY Sex ORDER BY Sex DESC
Answers that are possibly link only which were posted by new users and question asker is new.
CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId...
SELECT p.Id AS "post_link", p.CreationDate, LEN(p.Body) AS BodyLength FROM Posts AS p INNER JOIN Users AS u ON u.Id = p.OwnerUserId INNER JOIN Posts AS parentPost ON parentPost.Id = p.ParentId INNER JOIN Users AS parentUser ON parentUser.Id = parentPost.OwnerUserId WHERE p.PostTypeId = 2 AND p.Body LIKE '%a href%' AND ...
what is maximum age of patients whose ethnicity is white and days of hospital stay is 5?
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 text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do...
SELECT MAX(demographic.age) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.days_stay = "5"
What are the nationalities of the player picked from Thunder Bay Flyers (ushl)
CREATE TABLE table_8 ("Pick" real,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text)
SELECT "Nationality" FROM table_8 WHERE "College/junior/club team" = 'Thunder Bay Flyers (USHL)'
What is Team, when Venue is ' kr Saraco lu Stadium'?
CREATE TABLE table_name_4 (team VARCHAR,venue VARCHAR)
SELECT team FROM table_name_4 WHERE venue = "şükrü saracoğlu stadium"
what is the number of the premiere for the 34 peak
CREATE TABLE table_29633639_1 (premiere VARCHAR,peak VARCHAR)
SELECT premiere FROM table_29633639_1 WHERE peak = 34
how many patients whose admission type is emergency and procedure short title is insert 2 vascular stents?
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 procedures (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND procedures.short_title = "Insert 2 vascular stents"
what was patient 16572's intake for the last time until 1926 days ago?
CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code tex...
SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16572)) AND DATETIME(inputevents_cv....
What is Year, when Wins is '0'?
CREATE TABLE table_name_71 (year VARCHAR,wins VARCHAR)
SELECT year FROM table_name_71 WHERE wins = "0"
Which episode was watched by 11.75 million U.S. viewers?
CREATE TABLE table_13301516_1 (title VARCHAR,us_viewers__millions_ VARCHAR)
SELECT title FROM table_13301516_1 WHERE us_viewers__millions_ = "11.75"
What was the winning score in 1980?
CREATE TABLE table_45169 ("Year" real,"Championship" text,"Winning score" text,"Margin" text,"Runner-up" text)
SELECT "Winning score" FROM table_45169 WHERE "Year" = '1980'
What is the record of game 7?
CREATE TABLE table_name_4 (record VARCHAR,game VARCHAR)
SELECT record FROM table_name_4 WHERE game = 7
Name the FCC info for call sign of kpcc
CREATE TABLE table_10783 ("Call sign" text,"Frequency MHz" text,"City of license" text,"ERP W" text,"FCC info" text)
SELECT "FCC info" FROM table_10783 WHERE "Call sign" = 'kpcc'
What was the result of the los angeles rams game?
CREATE TABLE table_9746 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text)
SELECT "Result" FROM table_9746 WHERE "Opponent" = 'los angeles rams'
What is the average number for Northgate which commenced its construction before 1951?
CREATE TABLE table_6864 ("Number on map" real,"Name" text,"Colour" text,"Construction commenced" real,"Population" real)
SELECT AVG("Number on map") FROM table_6864 WHERE "Name" = 'northgate' AND "Construction commenced" < '1951'
UpVotes - DownVotes over time.
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 CONCAT(YEAR(CreationDate), '-', MONTH(CreationDate)) AS "Month", COUNT(PostId) AS "Posts", SUM(CASE VoteTypeId WHEN 2 THEN 1 ELSE 0 END) AS "upvotes", SUM(CASE VoteTypeId WHEN 3 THEN 1 ELSE 0 END) AS "downvotes" FROM Votes GROUP BY YEAR(CreationDate), MONTH(CreationDate) ORDER BY YEAR(CreationDate), MONTH(Creati...
What is the game number for the game with a score of l 90 106 (ot)?
CREATE TABLE table_27698941_6 (game VARCHAR,score VARCHAR)
SELECT game FROM table_27698941_6 WHERE score = "L 90–106 (OT)"
In what year did the Democratic incumbent that was re-elected first take office?
CREATE TABLE table_12873 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Results" text)
SELECT "First elected" FROM table_12873 WHERE "Results" = 're-elected' AND "Party" = 'democratic'
What is the total associated with Bronzes over 35?
CREATE TABLE table_43926 ("Sport" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT "Total" FROM table_43926 WHERE "Bronze" > '35'
tell me the top four most frequently prescribed drugs for patients with an age of 30s since 2101?
CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature n...
SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND STRFTIME('%y', medication.drugstarttime) >= '2101' GROUP BY medication.drugn...
For those records from the products and each product's manufacturer, give me the comparison about the average of code over the name , and group by attribute name, display in desc by the X 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 T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC
How many trademarks list a molecular target of minor groove of dna and a clinical status value of phase i?
CREATE TABLE table_17756 ("Clinical Status" text,"Compound Name" text,"Trademark" text,"Marine Organism \u03b1" text,"Chemical Class" text,"Molecular Target" text,"Clinical Trials \u03b2" text,"Disease Area" text)
SELECT COUNT("Trademark") FROM table_17756 WHERE "Molecular Target" = 'Minor Groove of DNA' AND "Clinical Status" = 'Phase I'
What are the different ids and names of the stations that have had more than 12 bikes available. Plot them as bar chart.
CREATE TABLE station (id INTEGER,name TEXT,lat NUMERIC,long NUMERIC,dock_count INTEGER,city TEXT,installation_date TEXT)CREATE TABLE weather (date TEXT,max_temperature_f INTEGER,mean_temperature_f INTEGER,min_temperature_f INTEGER,max_dew_point_f INTEGER,mean_dew_point_f INTEGER,min_dew_point_f INTEGER,max_humidity INT...
SELECT name, id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12
How many users have reviewed Irish Pub in Dallas ?
CREATE TABLE business (bid int,business_id varchar,name varchar,full_address varchar,city varchar,latitude varchar,longitude varchar,review_count bigint,is_open tinyint,rating float,state varchar)CREATE TABLE neighborhood (id int,business_id varchar,neighborhood_name varchar)CREATE TABLE review (rid int,business_id var...
SELECT COUNT(DISTINCT (user.name)) FROM business, category, review, user WHERE business.city = 'Dallas' AND category.business_id = business.business_id AND category.category_name = 'Irish Pub' AND review.business_id = business.business_id AND user.user_id = review.user_id
What dated the episode written by is adam e. fierro & glen mazzara air?
CREATE TABLE table_30030477_1 (original_air_date VARCHAR,written_by VARCHAR)
SELECT original_air_date FROM table_30030477_1 WHERE written_by = "Adam E. Fierro & Glen Mazzara"
Find the rooms of faculties with rank professor who live in building NEB.
CREATE TABLE FACULTY (Room VARCHAR,Rank VARCHAR,Building VARCHAR)
SELECT Room FROM FACULTY WHERE Rank = "Professor" AND Building = "NEB"
provide the number of patients whose age is less than 31 and lab test category is blood gas?
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 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "31" AND lab."CATEGORY" = "Blood Gas"
Who won soccer when madison won volleyball, lexington won cross country and orrville won softball
CREATE TABLE table_20795 ("School Year" text,"Volleyball" text,"Cross Country" text,"Soccer" text,"Tennis" text,"Golf" text,"Basketball" text,"Swimming" text,"Softball" text,"Track & Field" text)
SELECT "Soccer" FROM table_20795 WHERE "Volleyball" = 'Madison' AND "Cross Country" = 'Lexington' AND "Softball" = 'Orrville'
has the arterial bp mean of patient 22782 ever been less than 76.0 in 04/this 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 inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE diagnoses_icd...
SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22782)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp mean'...
How many tries for are there when 11 were won?
CREATE TABLE table_17625749_3 (tries_for VARCHAR,won VARCHAR)
SELECT tries_for FROM table_17625749_3 WHERE won = "11"
How many games were lost where the win percentage is smaller than 16.7 and the played games is 3?
CREATE TABLE table_name_83 (lost VARCHAR,win__percentage VARCHAR,played VARCHAR)
SELECT COUNT(lost) FROM table_name_83 WHERE win__percentage < 16.7 AND played = 3
What is the lowest number of floors for the number 2 ranked Joyus Housing?
CREATE TABLE table_name_59 (floors INTEGER,name VARCHAR,rank VARCHAR)
SELECT MIN(floors) FROM table_name_59 WHERE name = "joyus housing" AND rank < 2
How many were the show's average weekly ranking when it reached No. 2 in average nightly ranking?
CREATE TABLE table_20041 ("Season" real,"# of Episodes" real,"Timeslot" text,"Season Premiere" text,"Season Final" text,"Peak Audience" real,"Average Audience" real,"Average Nightly Rank" text,"Average Weekly Rank" text,"Average Yearly Ranking" text)
SELECT COUNT("Average Weekly Rank") FROM table_20041 WHERE "Average Nightly Rank" = 'No. 2'
Visualize a bar chart for simply displaying the email address of the employee and the corresponding employee id, and could you order by the Y in desc?
CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))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 employees (...
SELECT EMAIL, EMPLOYEE_ID FROM employees ORDER BY EMPLOYEE_ID DESC
When the nominee(s) is john wells what is the episode for a year before 2004?
CREATE TABLE table_62980 ("Year" real,"Category" text,"Nominee(s)" text,"Episode" text,"Result" text)
SELECT "Episode" FROM table_62980 WHERE "Year" < '2004' AND "Nominee(s)" = 'john wells'
how many patients are diagnosed with primary disease acidosis and are below 79 years of age?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "ACIDOSIS" AND demographic.age < "79"
Who wrote the episode directed by Ken Whittingham?
CREATE TABLE table_2766 ("Series #" real,"Season #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real,"U.S. viewers (millions)" text)
SELECT "Written by" FROM table_2766 WHERE "Directed by" = 'Ken Whittingham'
What is the name of the Count Palatine of the Rhine with a Interregnum began of 2 april 1657 death of ferdinand iii?
CREATE TABLE table_name_65 (count_palatine_of_the_rhine VARCHAR,interregnum_began VARCHAR)
SELECT count_palatine_of_the_rhine FROM table_name_65 WHERE interregnum_began = "2 april 1657 death of ferdinand iii"
Compare occurrence of two tags month by month.
CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId numbe...
SELECT * FROM Posts AS p JOIN PostTags AS pt ON pt.PostId = p.Id WHERE p.Id = 27323
what is the tallest building in bosie , idaho ?
CREATE TABLE table_204_489 (id number,"rank" number,"name" text,"height" text,"floors" number,"year" number,"notes" text)
SELECT "name" FROM table_204_489 ORDER BY "height" DESC LIMIT 1
Name the player for chicago black hawks
CREATE TABLE table_1473672_8 (player VARCHAR,nhl_team VARCHAR)
SELECT player FROM table_1473672_8 WHERE nhl_team = "Chicago Black Hawks"
Name the try bonus and tries for 30
CREATE TABLE table_15467476_2 (try_bonus VARCHAR,tries_for VARCHAR)
SELECT try_bonus FROM table_15467476_2 WHERE tries_for = "30"
Name the date for week more than 1 and game site of bye
CREATE TABLE table_6107 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Game site" text,"Attendance" text)
SELECT "Date" FROM table_6107 WHERE "Game site" = 'bye' AND "Week" > '1'
What is the Round when the series shows 5th place, and a Season of 2006 07?
CREATE TABLE table_name_86 (round VARCHAR,series VARCHAR,season VARCHAR)
SELECT round FROM table_name_86 WHERE series = "5th place" AND season = "2006–07"
Name the driver for race 2 2
CREATE TABLE table_15530244_5 (driver VARCHAR,race_2 VARCHAR)
SELECT driver FROM table_15530244_5 WHERE race_2 = "2"
What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?
CREATE TABLE playlist (playlistid number,name text)CREATE TABLE track (trackid number,name text,albumid number,mediatypeid number,genreid number,composer text,milliseconds number,bytes number,unitprice number)CREATE TABLE artist (artistid number,name text)CREATE TABLE genre (genreid number,name text)CREATE TABLE employ...
SELECT T1.title FROM album AS T1 JOIN track AS T2 ON T1.albumid = T2.albumid JOIN genre AS T3 ON T2.genreid = T3.genreid WHERE T3.name = 'Reggae' INTERSECT SELECT T1.title FROM album AS T1 JOIN track AS T2 ON T1.albumid = T2.albumid JOIN genre AS T3 ON T2.genreid = T3.genreid WHERE T3.name = 'Rock'
against which country did the england women 's rfu not rate at an overall percentage of at least 70 % ?
CREATE TABLE table_203_506 (id number,"opponent" text,"played" number,"won" number,"lost" number,"drawn" number,"% won overall" text)
SELECT "opponent" FROM table_203_506 WHERE "% won overall" < 70
What is the position that is shown for 2011?
CREATE TABLE table_34861 ("Year" real,"Pick" text,"Player" text,"Position" text,"Country" text,"Previous team (League)" text)
SELECT "Position" FROM table_34861 WHERE "Year" = '2011'
return me the number of authors who have papers containing keyword ' Relational Database ' .
CREATE TABLE journal (homepage varchar,jid int,name varchar)CREATE TABLE organization (continent varchar,homepage varchar,name varchar,oid int)CREATE TABLE domain (did int,name varchar)CREATE TABLE domain_journal (did int,jid int)CREATE TABLE domain_keyword (did int,kid int)CREATE TABLE publication_keyword (kid int,pid...
SELECT COUNT(DISTINCT (author.name)) FROM author, keyword, publication, publication_keyword, writes WHERE keyword.keyword = 'Relational Database' AND publication_keyword.kid = keyword.kid AND publication.pid = publication_keyword.pid AND writes.aid = author.aid AND writes.pid = publication.pid
what was the last careunit of patient 73693?
CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number...
SELECT transfers.careunit FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73693) AND NOT transfers.careunit IS NULL ORDER BY transfers.intime DESC LIMIT 1
Show the reign and days held of wrestlers.
CREATE TABLE wrestler (Reign VARCHAR,Days_held VARCHAR)
SELECT Reign, Days_held FROM wrestler
get me the drug that patient 8005 has been last prescribed in 03/last year.
CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharg...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8005) AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', prescriptions.startdate) = '03' ORDE...
calculate the average age of widow patients who were hospitalized for 27 days.
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 text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id tex...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "WIDOWED" AND demographic.days_stay = "27"
What are the different cities listed?
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 DISTINCT headquarter FROM manufacturers
count the number of patients whose drug code is morp2-4 and lab test category is hematology?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "MORP2-4" AND lab."CATEGORY" = "Hematology"
Does anyone else teach Animation for non-Majors other than Prof. Lay ?
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 program_course (program_id int,course_id int,work...
SELECT DISTINCT course.department, course.name, course.number, instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.name LIKE '%Animation for non-Majors%' AND NOT instructor.name LIKE '%Lay%' AND offering_instructor.instructor_id = i...
stomach or bowel problems ( e.g., blockage, muscle weakness, ulcerative colitis )
CREATE TABLE table_train_139 ("id" int,"ascvd_risk_calculator" float,"systolic_blood_pressure_sbp" int,"stomach_problems" bool,"muscle_weakness" bool,"heart_disease" bool,"stroke" bool,"renal_disease" bool,"cerebrovascular_disease" bool,"hepatic_disease" bool,"cardiovascular_disease" bool,"bowel_problems" bool,"diastol...
SELECT * FROM table_train_139 WHERE stomach_problems = 1 OR bowel_problems = 1 OR (blockage = 1 OR muscle_weakness = 1 OR ulcerative_colitis = 1)
Draw a bar chart about the distribution of date_address_to and the amount of date_address_to , and group by attribute other_details and bin date_address_to by time.
CREATE TABLE Behavior_Incident (incident_id INTEGER,incident_type_code VARCHAR(10),student_id INTEGER,date_incident_start DATETIME,date_incident_end DATETIME,incident_summary VARCHAR(255),recommendations VARCHAR(255),other_details VARCHAR(255))CREATE TABLE Addresses (address_id INTEGER,line_1 VARCHAR(120),line_2 VARCHA...
SELECT date_address_to, COUNT(date_address_to) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC
What is every media type for the Psychedelic Trance genre?
CREATE TABLE table_23829490_1 (media_type VARCHAR,genre VARCHAR)
SELECT media_type FROM table_23829490_1 WHERE genre = "Psychedelic Trance"
Which Census Ranking has an Area km 2 larger than 753.06, and an Official Name of stanley?
CREATE TABLE table_name_94 (census_ranking VARCHAR,area_km_2 VARCHAR,official_name VARCHAR)
SELECT census_ranking FROM table_name_94 WHERE area_km_2 > 753.06 AND official_name = "stanley"
Name the high rebounds for american airlines center
CREATE TABLE table_25490 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "High rebounds" FROM table_25490 WHERE "Location Attendance" = 'American Airlines Center'
What are the results of the incumbent who was first elected in 1996?
CREATE TABLE table_name_79 (results VARCHAR,first_elected VARCHAR)
SELECT results FROM table_name_79 WHERE first_elected = 1996
which game had the highest attendance ?
CREATE TABLE table_204_971 (id number,"m" number,"date" text,"tournament" text,"round" text,"ground" text,"opponent" text,"score" text,"attendance" number,"dinamo scorers" text,"report" text)
SELECT "date" FROM table_204_971 ORDER BY "attendance" DESC LIMIT 1
What nation had a ship named Roma?
CREATE TABLE table_name_24 (nat VARCHAR,name VARCHAR)
SELECT nat FROM table_name_24 WHERE name = "roma"
Show the total number of passengers of each location in a bar chart, and sort Y-axis in asc order.
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)CREATE TABLE train_station (Train_ID int,Station_ID int)
SELECT Location, SUM(Total_Passengers) FROM station GROUP BY Location ORDER BY SUM(Total_Passengers)
What was the visitor with a record of 5 8 4?
CREATE TABLE table_name_10 (visitor VARCHAR,record VARCHAR)
SELECT visitor FROM table_name_10 WHERE record = "5–8–4"
What's the venue for the asian games tournament?
CREATE TABLE table_name_55 (venue VARCHAR,tournament VARCHAR)
SELECT venue FROM table_name_55 WHERE tournament = "asian games"
What were the high points on March 29?
CREATE TABLE table_47970 ("Date" text,"Opponent" text,"Home / Away" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location/Attendance" text,"Record" text)
SELECT "High points" FROM table_47970 WHERE "Date" = 'march 29'
Who is the opponent with a score of 6 5 13?
CREATE TABLE table_name_82 (opponent VARCHAR,score VARCHAR)
SELECT opponent FROM table_name_82 WHERE score = "6–5 13"
What is the Visitor on January 1?
CREATE TABLE table_8130 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text)
SELECT "Visitor" FROM table_8130 WHERE "Date" = 'january 1'
What are the login names of the students with family name 'Ward'?
CREATE TABLE student_tests_taken (registration_id number,date_test_taken time,test_result text)CREATE TABLE student_course_enrolment (registration_id number,student_id number,course_id number,date_of_enrolment time,date_of_completion time)CREATE TABLE students (student_id number,date_of_registration time,date_of_latest...
SELECT login_name FROM students WHERE family_name = "Ward"
which tournament was the champion pat cash 4 6, 6 4, 6 3?
CREATE TABLE table_31067 ("Week of" text,"Tournament" text,"Champion" text,"Runner-up" text,"Semifinalists" text,"Quarterfinalists" text)
SELECT "Tournament" FROM table_31067 WHERE "Champion" = 'Pat Cash 4–6, 6–4, 6–3'
How many games were lost by more than 27 but not more 78 with goals less than 300?
CREATE TABLE table_10886 ("Season" text,"Games" real,"Lost" real,"Tied" real,"Points" real,"Goals for" real,"Goals against" real,"Standing" text)
SELECT AVG("Games") FROM table_10886 WHERE "Lost" > '27' AND "Points" < '78' AND "Goals against" < '300'
Name the original title for not nominated result with report on death
CREATE TABLE table_20963074_1 (original_title VARCHAR,result VARCHAR,film_title_used_in_nomination VARCHAR)
SELECT original_title FROM table_20963074_1 WHERE result = "Not Nominated" AND film_title_used_in_nomination = "Report on Death"
count the number of patients whose marital status is divorced and procedure icd9 code is 4523?
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "DIVORCED" AND procedures.icd9_code = "4523"
what year was the first game ?
CREATE TABLE table_203_255 (id number,"no" number,"test no" number,"1st team" text,"2nd team" text,"winner" text,"margin" text,"toss" text,"bat" text,"date" text)
SELECT "date" FROM table_203_255 WHERE id = 1
What is the position with 0 points in Season of 2007 08?
CREATE TABLE table_67182 ("Season" text,"Series" text,"Team" text,"Races" text,"wins" text,"Fast laps" text,"Points" text,"Pos." text)
SELECT "Pos." FROM table_67182 WHERE "Points" = '0' AND "Season" = '2007–08'
Who is the incumbent in district Massachusetts7?
CREATE TABLE table_18206 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Status" text,"Opponent" text)
SELECT "Incumbent" FROM table_18206 WHERE "District" = 'Massachusetts7'
What is the 2013 index of economic freedom of Slovenia?
CREATE TABLE table_name_22 (country VARCHAR)
SELECT 2013 AS _index_of_economic_freedom FROM table_name_22 WHERE country = "slovenia"
Longest gap between question posting and answer acceptance.
CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,R...
SELECT V.PostId AS "post_link", V.CreationDate AS "accept_date", Q.CreationDate AS "question_date", CAST((JULIANDAY(V.CreationDate) - JULIANDAY(Q.CreationDate)) * 86400.0 AS INT) AS "difference" FROM Votes AS V INNER JOIN Posts AS A ON (V.PostId = A.Id AND A.PostTypeId = 2) INNER JOIN Posts AS Q ON (Q.AcceptedAnswerId ...
What was the date of the game when the opponent was the Miami Dolphins?
CREATE TABLE table_17782308_1 (date VARCHAR,opponent VARCHAR)
SELECT date FROM table_17782308_1 WHERE opponent = "Miami Dolphins"
What average drawn has a played greater than 42?
CREATE TABLE table_48984 ("Position" real,"Team" text,"Played" real,"Drawn" real,"Lost" real,"Goals For" real,"Goals Against" real,"Goal Difference" text,"Points 1" real)
SELECT AVG("Drawn") FROM table_48984 WHERE "Played" > '42'
What source gave 26% of the votes to Brian Moran?
CREATE TABLE table_21535453_1 (source VARCHAR,brian_moran VARCHAR)
SELECT source FROM table_21535453_1 WHERE brian_moran = "26%"