instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Find all actors from Austin born after 1980 | CREATE TABLE writer (wid int,gender text,name text,nationality text,birth_city text,birth_year int)CREATE TABLE written_by (id int,msid int,wid int)CREATE TABLE director (did int,gender text,name text,nationality text,birth_city text,birth_year int)CREATE TABLE company (id int,name text,country_code varchar)CREATE TABL... | SELECT name FROM actor WHERE birth_city = 'Austin' AND birth_year > 1980 |
Which opponent was played at Forbes Field after week 4? | CREATE TABLE table_34555 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Game Site" text) | SELECT "Opponent" FROM table_34555 WHERE "Game Site" = 'forbes field' AND "Week" > '4' |
How many seasons did the canterbury bulldogs (8) win? | CREATE TABLE table_11236195_5 (season VARCHAR,winningteam VARCHAR) | SELECT COUNT(season) FROM table_11236195_5 WHERE winningteam = "Canterbury Bulldogs (8)" |
I need to take ORTHO 568 - will it be offered in the Spring-Summer ? | CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE program_course (program_id int,course_id int,workload int,category varchar)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... | SELECT COUNT(*) > 0 FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND NOT COURSEalias0.course_id IN... |
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and the average of manufacturer , and group by attribute name, and order y-axis in descending order. | 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 T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Manufacturer DESC |
has patient 5310 taken a d10w drug in a month before? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE d_icd_diagnoses (row_i... | SELECT COUNT(*) > 0 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 = 5310)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'd10w' AND... |
what is the title when the release date is 1938-12-17 and the production number is 8610? | CREATE TABLE table_name_86 (title VARCHAR,release_date VARCHAR,production_num VARCHAR) | SELECT title FROM table_name_86 WHERE release_date = "1938-12-17" AND production_num = "8610" |
What is the time of retirement with Laps smaller than 66, a grid less than 10, and a Driver of heinz-harald frentzen? | CREATE TABLE table_58190 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT "Time/Retired" FROM table_58190 WHERE "Laps" < '66' AND "Grid" < '10' AND "Driver" = 'heinz-harald frentzen' |
How many races did the German racer that won less than 10 races ride? | CREATE TABLE table_63958 ("Name" text,"Nationality" text,"Races won" real,"Races ridden" real,"Win average" real) | SELECT COUNT("Races ridden") FROM table_63958 WHERE "Nationality" = 'german' AND "Races won" < '10' |
what was the yearly average dose of volume (ml) norepinephrine that patient 028-56914 was taking until 8 months ago? | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,disch... | SELECT AVG(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-56914')) AND intakeoutput.celllabel = 'volum... |
Avg/G of 2.7 is what effic? | CREATE TABLE table_80001 ("Name" text,"GP-GS" text,"Effic" real,"Att-Cmp-Int" text,"Avg/G" real) | SELECT "Effic" FROM table_80001 WHERE "Avg/G" = '2.7' |
What is the smallest Weight, when Spike is less than 330, when Block is 315, and when Height is greater than 187? | CREATE TABLE table_7545 ("Name" text,"Date of Birth" text,"Height" real,"Weight" real,"Spike" real,"Block" real) | SELECT MIN("Weight") FROM table_7545 WHERE "Spike" < '330' AND "Block" = '315' AND "Height" > '187' |
Show the transaction types and the total amount of transactions with a bar chart. | CREATE TABLE Financial_Transactions (transaction_id INTEGER,account_id INTEGER,invoice_number INTEGER,transaction_type VARCHAR(15),transaction_date DATETIME,transaction_amount DECIMAL(19,4),transaction_comment VARCHAR(255),other_transaction_details VARCHAR(255))CREATE TABLE Order_Items (order_item_id INTEGER,order_id I... | SELECT transaction_type, SUM(transaction_amount) FROM Financial_Transactions GROUP BY transaction_type |
What is the Name, when the Time is 8:10.1? | CREATE TABLE table_name_92 (name VARCHAR,time VARCHAR) | SELECT name FROM table_name_92 WHERE time = "8:10.1" |
What is the Player from appalachian state? | CREATE TABLE table_40001 ("Round" real,"Overall" real,"Player" text,"Position" text,"College" text) | SELECT "Player" FROM table_40001 WHERE "College" = 'appalachian state' |
What 2007 has 236 for 2006? | CREATE TABLE table_name_70 (Id VARCHAR) | SELECT 2007 FROM table_name_70 WHERE 2006 = "236" |
What are the types of competition and number of competitions for that type Show bar chart, I want to display by the X-axis in descending. | CREATE TABLE player (Player_ID int,name text,Position text,Club_ID int,Apps real,Tries real,Goals text,Points real)CREATE TABLE club (Club_ID int,name text,Region text,Start_year text)CREATE TABLE competition_result (Competition_ID int,Club_ID_1 int,Club_ID_2 int,Score text)CREATE TABLE club_rank (Rank real,Club_ID int... | SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type ORDER BY Competition_type DESC |
When playing against Yi Jingqian in the final on a hard surface what was the score? | CREATE TABLE table_name_29 (score VARCHAR,surface VARCHAR,opponent_in_the_final VARCHAR) | SELECT score FROM table_name_29 WHERE surface = "hard" AND opponent_in_the_final = "yi jingqian" |
what is the highest draw when points is less than 11 and language is norwegian? | CREATE TABLE table_65354 ("Draw" real,"Language" text,"Artist" text,"Place" real,"Points" real) | SELECT MAX("Draw") FROM table_65354 WHERE "Points" < '11' AND "Language" = 'norwegian' |
What lane had a heat after 12, a rank of 38 and a time larger than 22.67? | CREATE TABLE table_64755 ("Rank" real,"Heat" real,"Lane" real,"Name" text,"Nationality" text,"Time" real) | SELECT AVG("Lane") FROM table_64755 WHERE "Heat" > '12' AND "Rank" = '38' AND "Time" > '22.67' |
Find the number of students in one classroom. | CREATE TABLE list (classroom VARCHAR) | SELECT COUNT(*), classroom FROM list GROUP BY classroom |
What is the number of matches played for the team with 0 draws and 33 points? | CREATE TABLE table_name_49 (played VARCHAR,drawn VARCHAR,points VARCHAR) | SELECT played FROM table_name_49 WHERE drawn = "0" AND points = "33" |
What was the score when the Tie no less than 2? | CREATE TABLE table_name_11 (score VARCHAR,tie_no INTEGER) | SELECT score FROM table_name_11 WHERE tie_no < 2 |
Tell me the race name for ferrari on 25 april | CREATE TABLE table_56811 ("Race Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Constructor" text,"Report" text) | SELECT "Race Name" FROM table_56811 WHERE "Constructor" = 'ferrari' AND "Date" = '25 april' |
What is the total quantity of populace (2010) where location (km ) is 134.51 | CREATE TABLE table_73802 ("City / Municipality" text,"No. of s Barangay" real,"District" real,"Area (km\u00b2)" text,"Population (2010)" real,"Income class (2007)" text,"ZIP code" real,"Mayor" text) | SELECT COUNT("Population (2010)") FROM table_73802 WHERE "Area (km\u00b2)" = '134.51' |
report the total number of degrees granted between 1998 and 2002. | CREATE TABLE csu_fees (campus number,year number,campusfee number)CREATE TABLE campuses (id number,campus text,location text,county text,year number)CREATE TABLE enrollments (campus number,year number,totalenrollment_ay number,fte_ay number)CREATE TABLE degrees (year number,campus number,degrees number)CREATE TABLE fac... | SELECT T1.campus, SUM(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id = T2.campus WHERE T2.year >= 1998 AND T2.year <= 2002 GROUP BY T1.campus |
Name the 1997 for atp masters series 1992 | CREATE TABLE table_name_65 (Id VARCHAR) | SELECT 1997 FROM table_name_65 WHERE 1992 = "atp masters series" |
what is the total number of patients who had combined right and left heart angiocardiography on elective admission? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND procedures.long_title = "Combined right and left heart angiocardiography" |
Most popular StackOverflow tags in Jan 2015. | CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE PostFeedback (Id... | SELECT num.TagName AS Tag, ROW_NUMBER() OVER (ORDER BY rate.Rate DESC) AS JanRank, ROW_NUMBER() OVER (ORDER BY num.Num DESC) AS TotalRank, rate.Rate AS QuestionsInJan, num.Num AS QuestionsTotal FROM (SELECT COUNT(PostId) AS Rate, TagName FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AN... |
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, could you list bar in descending order? | 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 |
what is the number of patients whose primary disease is stemi and admission year is less than 2155? | 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 WHERE demographic.diagnosis = "STEMI" AND demographic.admityear < "2155" |
What play has a loss of 2? | CREATE TABLE table_name_1 (played VARCHAR,lost VARCHAR) | SELECT played FROM table_name_1 WHERE lost = "2" |
What is the authority who set the budget limit ( m) at 900? | CREATE TABLE table_27548 ("Authority" text,"Rate or precept" text,"Budget limit (\u00a3m)" text,"Budget plans (\u00a3m)" text,"Rate limit (p)" text,"Rate change (%)" text,"Desired rate (p)" text,"Desired rate change (%)" text) | SELECT "Authority" FROM table_27548 WHERE "Budget limit (\u00a3m)" = '900' |
Name the played with try bonus of 6 and drawn of 0 | CREATE TABLE table_name_76 (played VARCHAR,try_bonus VARCHAR,drawn VARCHAR) | SELECT played FROM table_name_76 WHERE try_bonus = "6" AND drawn = "0" |
What is the score of the game on 8 Sep 1990? | CREATE TABLE table_name_92 (score VARCHAR,date VARCHAR) | SELECT score FROM table_name_92 WHERE date = "8 sep 1990" |
Where was the disaster located that took place on 1916? | CREATE TABLE table_37223 ("Disaster" text,"Type" text,"Location" text,"Deaths" text,"Date" text) | SELECT "Location" FROM table_37223 WHERE "Date" = '1916' |
What is the average hexadecimal with a decimal less than 53, an octal less than 61, and a glyph greater than 0? | CREATE TABLE table_name_62 (hexadecimal INTEGER,glyph VARCHAR,decimal VARCHAR,octal VARCHAR) | SELECT AVG(hexadecimal) FROM table_name_62 WHERE decimal < 53 AND octal < 61 AND glyph > 0 |
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about salary over the first_name . | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))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 (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME var... | SELECT FIRST_NAME, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) |
Show me about the distribution of Date_of_Birth and Weight in a bar chart, and could you rank by the y axis from low to high? | CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real)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) | SELECT Date_of_Birth, Weight FROM people ORDER BY Weight |
what airlines have BUSINESS class service between BOSTON and SAN FRANCISCO | CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_... | SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND fare_basis.class_type = 'B... |
what are the number of pga winning golfers that zimbabwe has ? | CREATE TABLE table_204_396 (id number,"country" text,"masters" number,"u.s. open" number,"the open" number,"pga" number,"total" number) | SELECT "pga" FROM table_204_396 WHERE "country" = 'zimbabwe' |
When the occupation was utility worker on-air talent, what was the game status? | CREATE TABLE table_34428 ("Player" text,"Hometown" text,"Occupation" text,"Education" text,"Game Status" text) | SELECT "Game Status" FROM table_34428 WHERE "Occupation" = 'utility worker on-air talent' |
what is the cost of LIMOUSINE service at BOSTON airport | CREATE TABLE code_description (code varchar,description text)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE fare_basis (fare_basis_code text,booking_class text,class_type text,premium text,economy text,discounted text,night text,season text,basis_days text... | SELECT DISTINCT ground_service.ground_fare FROM airport, airport_service, city, ground_service WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'BOSTON' AND ground_service.airport_code = airport.airport_code AND ground_service.transport_type =... |
Visualize the average smallest rating of different movie title using a bar chart, and order by the total number in desc. | CREATE TABLE Rating (rID int,mID int,stars int,ratingDate date)CREATE TABLE Reviewer (rID int,name text)CREATE TABLE Movie (mID int,title text,year int,director text) | SELECT T2.title, AVG(MIN(T1.stars)) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID GROUP BY T2.title ORDER BY AVG(MIN(T1.stars)) DESC |
When 13 is the share (18-49) what is the rank (timeslot)? | CREATE TABLE table_28980706_4 (rank__timeslot_ VARCHAR,share__18_49_ VARCHAR) | SELECT rank__timeslot_ FROM table_28980706_4 WHERE share__18_49_ = 13 |
how many of the patients with left heart cardiac cath have unspecified death status? | CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.short_title = "Left heart cardiac cath" |
On what week were there 26,243 in attendance on September 21, 1969? | CREATE TABLE table_name_51 (week VARCHAR,date VARCHAR,attendance VARCHAR) | SELECT COUNT(week) FROM table_name_51 WHERE date = "september 21, 1969" AND attendance < 26 OFFSET 243 |
Stacked bar chart of the number of left office for with each Minister in each left office, could you display in asc by the y-axis? | CREATE TABLE region (Region_ID int,Region_name text,Date text,Label text,Format text,Catalogue text)CREATE TABLE party_events (Event_ID int,Event_Name text,Party_ID int,Member_in_charge_ID int)CREATE TABLE party (Party_ID int,Minister text,Took_office text,Left_office text,Region_ID int,Party_name text)CREATE TABLE mem... | SELECT Left_office, COUNT(Left_office) FROM party GROUP BY Minister ORDER BY COUNT(Left_office) |
What is the year of the season that was 12? | CREATE TABLE table_15943 ("Season" real,"Timeslot (ET)" text,"Season premiere" text,"Season finale" text,"TV season" text,"Rank" text,"Viewers (millions)" text) | SELECT "TV season" FROM table_15943 WHERE "Season" = '12' |
What is the Report of Winning Team Penske Racing, and what was Rick Mears' Pole position? | CREATE TABLE table_name_68 (report VARCHAR,winning_team VARCHAR,pole_position VARCHAR) | SELECT report FROM table_name_68 WHERE winning_team = "penske racing" AND pole_position = "rick mears" |
For those employees who did not have any job in the past, return a bar chart about the distribution of hire_date and the sum of manager_id bin hire_date by time, order from low to high by the Y-axis please. | CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))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 loc... | SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(MANAGER_ID) |
What is the Club during the Years 1995 1996? | CREATE TABLE table_46501 ("Name" text,"Club" text,"Position" text,"Years" text,"Current status" text) | SELECT "Club" FROM table_46501 WHERE "Years" = '1995–1996' |
Name the total number of african record | CREATE TABLE table_23619492_3 (paula_radcliffe___gbr__ VARCHAR,world_record VARCHAR) | SELECT COUNT(paula_radcliffe___gbr__) FROM table_23619492_3 WHERE world_record = "African record" |
Tell me the sum of Grid for giancarlo fisichella | CREATE TABLE table_58524 ("Driver" text,"Constructor" text,"Laps" real,"Time/Retired" text,"Grid" real) | SELECT SUM("Grid") FROM table_58524 WHERE "Driver" = 'giancarlo fisichella' |
cost of levothyroxine sodium 50 mcg po tabs and how much does it cost. | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid numbe... | SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'medication' AND cost.eventid IN (SELECT medication.medicationid FROM medication WHERE medication.drugname = 'levothyroxine sodium 50 mcg po tabs') |
Who wrote the episode with series number 56? | CREATE TABLE table_25800134_1 (writer_s_ VARCHAR,series__number VARCHAR) | SELECT writer_s_ FROM table_25800134_1 WHERE series__number = 56 |
what flights does AA fly from PHILADELPHIA to DALLAS | CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code varchar)CREATE TABLE date_day (month_number int,day_number int,year int,day_name varchar)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_required text,minimum_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 = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILAD... |
What is the Place of the Player with a To par of +2 and a Score of 70-72-73=215? | CREATE TABLE table_name_22 (place VARCHAR,to_par VARCHAR,score VARCHAR) | SELECT place FROM table_name_22 WHERE to_par = "+2" AND score = 70 - 72 - 73 = 215 |
What is Tournament, when Date is '6 October 2008'? | CREATE TABLE table_name_82 (tournament VARCHAR,date VARCHAR) | SELECT tournament FROM table_name_82 WHERE date = "6 october 2008" |
what is the definition of the last channel ? | CREATE TABLE table_203_51 (id number,"channel" text,"definition" text,"organisation" text,"ownership" text,"notes" text) | SELECT "definition" FROM table_203_51 ORDER BY id DESC LIMIT 1 |
provide me the number of black/haitian patients who were admitted before the year 2124. | 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 WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.admityear < "2124" |
For the transaction dates if share count is smaller than 10, bin the dates into the year interval, and count them using a line chart, could you sort X from high to low order? | CREATE TABLE Sales (sales_transaction_id INTEGER,sales_details VARCHAR(255))CREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR(10),transaction_type_description VARCHAR(80))CREATE TABLE Purchases (purchase_transaction_id INTEGER,purchase_details VARCHAR(255))CREATE TABLE Investors (investor_id INTEGER,Inv... | SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE share_count < 10 ORDER BY date_of_transaction DESC |
What was the term of office for noel beaton? | CREATE TABLE table_name_1 (term_of_office VARCHAR,member VARCHAR) | SELECT term_of_office FROM table_name_1 WHERE member = "noel beaton" |
how many patients were admitted before the year 2175 with aspergillosis as the diagnosis long title? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2175" AND diagnoses.long_title = "Aspergillosis" |
What's the constituency number of the Seoni district and has none reserved? | CREATE TABLE table_name_94 (constituency_number VARCHAR,reserved_for___sc___st__none_ VARCHAR,district VARCHAR) | SELECT constituency_number FROM table_name_94 WHERE reserved_for___sc___st__none_ = "none" AND district = "seoni" |
return me the keywords in PVLDB . | CREATE TABLE domain_author (aid int,did int)CREATE TABLE keyword (keyword varchar,kid int)CREATE TABLE publication (abstract varchar,cid int,citation_num int,jid int,pid int,reference_num int,title varchar,year int)CREATE TABLE author (aid int,homepage varchar,name varchar,oid int)CREATE TABLE publication_keyword (kid ... | SELECT keyword.keyword FROM journal, keyword, publication, publication_keyword WHERE journal.name = 'PVLDB' AND publication_keyword.kid = keyword.kid AND publication.jid = journal.jid AND publication.pid = publication_keyword.pid |
who are the candidates for district new york 10? | CREATE TABLE table_28902 ("District" text,"Incumbent" text,"Party" text,"First elected" text,"Result" text,"Candidates" text) | SELECT "Candidates" FROM table_28902 WHERE "District" = 'New York 10' |
What was the name of race #28? | CREATE TABLE table_1749567_2 (name VARCHAR,number VARCHAR) | SELECT name FROM table_1749567_2 WHERE number = 28 |
Find the average age of journalists working on different role type, show the result with a bar chart, sort y axis in ascending order. | CREATE TABLE event (Event_ID int,Date text,Venue text,Name text,Event_Attendance int)CREATE TABLE news_report (journalist_ID int,Event_ID int,Work_Type text)CREATE TABLE journalist (journalist_ID int,Name text,Nationality text,Age text,Years_working int) | SELECT Work_Type, AVG(t1.Age) FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_ID = t2.journalist_ID GROUP BY t2.Work_Type ORDER BY AVG(t1.Age) |
Which Copa Libertadores 1992 has a Supercopa Sudamericana 1992 of round of 16, and a Team of gr mio? | CREATE TABLE table_name_59 (copa_libertadores_1992 VARCHAR,supercopa_sudamericana_1992 VARCHAR,team VARCHAR) | SELECT copa_libertadores_1992 FROM table_name_59 WHERE supercopa_sudamericana_1992 = "round of 16" AND team = "grêmio" |
Which City has a Colony Name of northeastern crescent colony? | CREATE TABLE table_6037 ("City" text,"State" text,"School" text,"Colony Name" text,"Date Founded" text) | SELECT "City" FROM table_6037 WHERE "Colony Name" = 'northeastern crescent colony' |
provide the number of patients whose gender is f and primary disease is bradycardia? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "BRADYCARDIA" |
Hidden gems: Lowest viewed questions with score 5 or higher. | CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat... | SELECT Posts.Id AS "post_link", Posts.OwnerUserId AS "user_link", Score, ViewCount, Score * 1000 / ViewCount AS "Score per Thousand Views" FROM Posts WHERE Score >= 5 AND PostTypeId = 1 ORDER BY ViewCount LIMIT 1000 |
Average score of answers per month. | CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate t... | SELECT LAST_DATE_OF_MONTH(p.CreationDate), AVG(CAST(p.Score AS FLOAT)) FROM Posts AS p WHERE (p.PostTypeId = 2) AND (p.CreationDate >= '##Date1?2010-01-01##') AND (p.CreationDate <= '##Date2?2021-01-01##') GROUP BY LAST_DATE_OF_MONTH(p.CreationDate) ORDER BY LAST_DATE_OF_MONTH(p.CreationDate) |
what is the venue when the date is 16 january 1996? | CREATE TABLE table_name_99 (venue VARCHAR,date VARCHAR) | SELECT venue FROM table_name_99 WHERE date = "16 january 1996" |
If the skip is Kelly Scott, what is the PF total number? | CREATE TABLE table_73871 ("Locale" text,"Skip" text,"W" real,"L" real,"PF" real,"PA" real,"Ends Won" real,"Ends Lost" real,"Blank Ends" real,"Stolen Ends" real,"Shot Pct." real) | SELECT COUNT("PF") FROM table_73871 WHERE "Skip" = 'Kelly Scott' |
mini mental status exam ( mmse ) between 15 _ 26 ; | CREATE TABLE table_train_85 ("id" int,"mini_mental_state_examination_mmse" int,"elevated_serum_phenylalanine" int,"elevated_creatinine" float,"renal_disease" bool,"geriatric_depression_scale_gds" int,"NOUSE" float) | SELECT * FROM table_train_85 WHERE mini_mental_state_examination_mmse >= 15 AND mini_mental_state_examination_mmse <= 26 |
Which Score has a Result of third place, and a Style of cha-cha-cha? | CREATE TABLE table_name_18 (score VARCHAR,result VARCHAR,style VARCHAR) | SELECT score FROM table_name_18 WHERE result = "third place" AND style = "cha-cha-cha" |
how much was the total hospital bill for patient 30733's stay in a year before? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CRE... | SELECT SUM(cost.cost) FROM cost WHERE cost.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30733) AND DATETIME(cost.chargetime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') |
Which Season originally aired on September 17, 1955 | CREATE TABLE table_72726 ("Series #" real,"Season #" real,"Title" text,"Directed by:" text,"Written by:" text,"Original air date" text) | SELECT "Season #" FROM table_72726 WHERE "Original air date" = 'September 17, 1955' |
What is the minimum money list rank for the players having a best finish of T9? | CREATE TABLE table_73694 ("Player" text,"Starts" real,"Cuts made" real,"Best finish" text,"Money list rank" real,"Earnings ($)" real) | SELECT MIN("Money list rank") FROM table_73694 WHERE "Best finish" = 'T9' |
Which vacancy happened on 4 November 2008? | CREATE TABLE table_18788823_5 (position_in_table VARCHAR,date_of_vacancy VARCHAR) | SELECT position_in_table FROM table_18788823_5 WHERE date_of_vacancy = "4 November 2008" |
What Nationality's time is 2:07.64? | CREATE TABLE table_name_98 (nationality VARCHAR,time VARCHAR) | SELECT nationality FROM table_name_98 WHERE time = "2:07.64" |
Open questions with the Possible Duplicate bit. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score num... | SELECT Score, Id AS "post_link", ViewCount, OwnerUserId AS "user_link", CreationDate FROM Posts WHERE PostTypeId = 1 AND ClosedDate IS NULL AND (Body LIKE '%<strong>Possible Duplicate:</strong>%' OR Body LIKE '%<strong>Possible Duplicates:</strong>%') ORDER BY CreationDate |
What is Qual 2, when Best is 1:27.642? | CREATE TABLE table_name_27 (qual_2 VARCHAR,best VARCHAR) | SELECT qual_2 FROM table_name_27 WHERE best = "1:27.642" |
Drupal 8: Most popular answers 2015. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE Sugg... | SELECT Answers.Id AS "post_link", Questions.Tags, Answers.Score FROM Posts AS Answers, Posts AS Questions, PostTags, Tags WHERE Answers.ParentId = Questions.Id AND Questions.Id = PostTags.PostId AND PostTags.TagId = Tags.Id AND Tags.TagName = '8' AND YEAR(Answers.CreationDate) >= 2015 ORDER BY Answers.Score DESC LIMIT ... |
What is the largest number for trine dehli cleve? | CREATE TABLE table_30674 ("Couple" text,"Style" text,"Music" text,"Trine Dehli Cleve" real,"Tor Fl\u00f8ysvik" real,"Karianne Gulliksen" real,"Christer Tornell" real,"Total" real) | SELECT MAX("Trine Dehli Cleve") FROM table_30674 |
What the air dates for the episodes are episode 3 in the series? | CREATE TABLE table_name_58 (original_air_date VARCHAR,no_in_series INTEGER) | SELECT original_air_date FROM table_name_58 WHERE no_in_series > 3 |
What team was the winner when the result was 90 86? | CREATE TABLE table_name_35 (winner VARCHAR,result VARCHAR) | SELECT winner FROM table_name_35 WHERE result = "90–86" |
How many winners did Halcones uv xalapa have? | CREATE TABLE table_name_83 (winners VARCHAR,team VARCHAR) | SELECT winners FROM table_name_83 WHERE team = "halcones uv xalapa" |
what number of patients with procedure icd9 code 8872 had death status as 0? | 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.expire_flag = "0" AND procedures.icd9_code = "8872" |
how many patients have medicaid insurance and diagnosed with st elevated myocardial infarction\cardiac cath? | 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 WHERE demographic.insurance = "Medicaid" AND demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" |
count the number of patients whose primary disease is bradycardia and year of death is less than or equal to 2131? | 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 WHERE demographic.diagnosis = "BRADYCARDIA" AND demographic.dod_year <= "2131.0" |
What game was released before 2010 with a Metacritic of 85/100? | CREATE TABLE table_61654 ("Game Title" text,"Year Released" real,"Platform" text,"GameRankings" text,"Metacritic" text) | SELECT "Game Title" FROM table_61654 WHERE "Metacritic" = '85/100' AND "Year Released" < '2010' |
What is the highest pick for the position of defensive end? | CREATE TABLE table_79579 ("Pick" real,"Team" text,"Player" text,"Position" text,"College" text) | SELECT MAX("Pick") FROM table_79579 WHERE "Position" = 'defensive end' |
In 1961, what was the Chassis when the points were lower than 6? | CREATE TABLE table_71423 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real) | SELECT "Chassis" FROM table_71423 WHERE "Points" < '6' AND "Year" = '1961' |
what 's the lowest round trip fare from DALLAS to BALTIMORE | 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 int,stop_time int)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_n... | SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DALLAS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_... |
How many gb's have an iso number of cn-65? | CREATE TABLE table_27668 ("GB" text,"ISO \u2116" text,"Province" text,"Chinese Name" text,"Capital" text,"Population\u00b9" real,"Density\u00b2" text,"Area\u00b3" real,"Abbreviation/Symbol" text) | SELECT COUNT("GB") FROM table_27668 WHERE "ISO \u2116" = 'CN-65' |
What is the tyre for the circuit of Prince George, which had Jim Clark as the fastest lap? | CREATE TABLE table_77969 ("Race" text,"Circuit" text,"Date" text,"Pole position" text,"Fastest lap" text,"Winning driver" text,"Constructor" text,"Tyre" text,"Report" text) | SELECT "Tyre" FROM table_77969 WHERE "Fastest lap" = 'jim clark' AND "Circuit" = 'prince george' |
how many hours have elapsed since the last time patient 006-195316 was given a -lymphs lab test during their current hospital visit? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE patient (uniquepid text,patienthealthsystemsta... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-195316' AND patient.hos... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.