instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
Name the opponent that has attendance of 76,965 | CREATE TABLE table_52629 ("Week" text,"Opponent" text,"Result" text,"Game site" text,"Time" text,"Attendance" text) | SELECT "Opponent" FROM table_52629 WHERE "Attendance" = '76,965' |
What is Brown Motors best point total using the Offenhauser L4 engine since 1950? | CREATE TABLE table_name_72 (points INTEGER,entrant VARCHAR,year VARCHAR,engine VARCHAR) | SELECT MAX(points) FROM table_name_72 WHERE year > 1950 AND engine = "offenhauser l4" AND entrant = "brown motors" |
What was the surface for the game that was played on 12-Apr-2005? | CREATE TABLE table_name_50 (surface VARCHAR,date VARCHAR) | SELECT surface FROM table_name_50 WHERE date = "12-apr-2005" |
in this year, what are the top four most frequent specimen tests ordered for patients within 2 months after diagnosis of hypocalcemia? | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname... | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hypocalcemia' AND DATETIME(diagnosis.diagnos... |
Give me the names of members whose address is in Harford or Waterbury. | CREATE TABLE happy_hour_member (hh_id number,member_id number,total_amount number)CREATE TABLE member (member_id number,name text,membership_card text,age number,time_of_purchase number,level_of_membership number,address text)CREATE TABLE happy_hour (hh_id number,shop_id number,month text,num_of_shaff_in_charge number)... | SELECT name FROM member WHERE address = 'Harford' OR address = 'Waterbury' |
what is the date of the game 23? | CREATE TABLE table_29736 ("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_29736 WHERE "Game" = '23' |
how many points did the nuggets win by on april 9 ? | CREATE TABLE table_204_833 (id number,"game" number,"date" text,"team" text,"score" text,"high points" text,"high rebounds" text,"high assists" text,"location\nattendance" text,"record" text) | SELECT "score" - "score" FROM table_204_833 WHERE "date" = 'april 9' |
Name the lowest Seats 2010 which has Seats 2005 smaller than 9, and a Governorate of al muthanna governorate, and an In/de-creased by larger than 2? | CREATE TABLE table_name_46 (seats_2010 INTEGER,in_de_creased_by VARCHAR,seats_2005 VARCHAR,governorate VARCHAR) | SELECT MIN(seats_2010) FROM table_name_46 WHERE seats_2005 < 9 AND governorate = "al muthanna governorate" AND in_de_creased_by > 2 |
What conference was the churchill chargers team in? | CREATE TABLE table_11094950_1 (conference VARCHAR,team VARCHAR) | SELECT conference FROM table_11094950_1 WHERE team = "Churchill Chargers" |
What is the average salary for each job title Show bar chart, and show y-axis in desc order please. | 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 job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE regions (REGIO... | SELECT JOB_TITLE, AVG(SALARY) FROM employees AS T1 JOIN jobs AS T2 ON T1.JOB_ID = T2.JOB_ID GROUP BY T2.JOB_TITLE ORDER BY AVG(SALARY) DESC |
In the Winter period , are there special topic classes available ? | CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE course_offering (offering_id int,course_id int,semester int,section_number int,start_time time,end_time time,monday varchar,tuesday varchar,wedn... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE (course.number = 398 OR course.number = 498 OR course.number = 598) AND course.department = 'E... |
Which location includes Sakakita BS? | CREATE TABLE table_39596 ("Name" text,"Dist. from Origin" text,"Dist. from Terminus" text,"Speed Limit" text,"Location (all in Nagano)" text) | SELECT "Location (all in Nagano )" FROM table_39596 WHERE "Name" = 'sakakita bs' |
What is the agg when team #2 is 2006 UEFA Intertoto Cup? | CREATE TABLE table_48302 ("Round" text,"Team #1" text,"Agg." text,"Team #2" text,"1st leg" text,"2nd leg" text) | SELECT "Agg." FROM table_48302 WHERE "Team #2" = '2006 uefa intertoto cup' |
What location is nicknamed the 49ers? | CREATE TABLE table_255188_3 (location VARCHAR,nickname VARCHAR) | SELECT location FROM table_255188_3 WHERE nickname = "49ers" |
provide the number of patients whose primary disease is s/p fall and lab test fluid is urine. | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "S/P FALL" AND lab.fluid = "Urine" |
What are the different customer ids, and how many cards does each one hold? | CREATE TABLE customers_cards (card_id number,customer_id number,card_type_code text,card_number text,date_valid_from time,date_valid_to time,other_card_details text)CREATE TABLE customers (customer_id number,customer_first_name text,customer_last_name text,customer_address text,customer_phone text,customer_email text,o... | SELECT customer_id, COUNT(*) FROM customers_cards GROUP BY customer_id |
Which record is dated April 8? | CREATE TABLE table_name_60 (record VARCHAR,date VARCHAR) | SELECT record FROM table_name_60 WHERE date = "april 8" |
Titles and Tags Top 500. | CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,RevisionGUID other)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE PendingFlags (Id number,F... | SELECT Title, Body, Tags FROM Posts WHERE NOT Tags IS NULL LIMIT 500 |
For those products with a price between 60 and 120, return a bar chart about the distribution of name and price , and order in ascending by the Y. | 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 Name, Price FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Price |
What was the original air date where there were u.s. viewers (millions) is 5.60? | CREATE TABLE table_28042 ("Series no." real,"No. in season" real,"Title" text,"Written by" text,"Directed by" text,"Original air date" text,"U.S. viewers (millions)" text) | SELECT "Original air date" FROM table_28042 WHERE "U.S. viewers (millions)" = '5.60' |
HOw many films did martin repka category:articles with hcards direct? | CREATE TABLE table_22032599_1 (film_title_used_in_nomination VARCHAR,director VARCHAR) | SELECT COUNT(film_title_used_in_nomination) FROM table_22032599_1 WHERE director = "Martin Repka Category:Articles with hCards" |
What is the total number of first prizes in USD for the Canadian Open? | CREATE TABLE table_36971 ("Date" text,"Tournament" text,"Location" text,"Winner" text,"Score" text,"1st prize ($)" real) | SELECT SUM("1st prize ( $ )") FROM table_36971 WHERE "Tournament" = 'canadian open' |
Which analog channel has a digital channel of 4.1? | CREATE TABLE table_name_31 (analog_channel VARCHAR,digital_channel VARCHAR) | SELECT analog_channel FROM table_name_31 WHERE digital_channel = "4.1" |
What is the U.S. air date when the U.S. viewers are 7.5 million? | CREATE TABLE table_2866503_1 (us_air_date VARCHAR,us_viewers__million_ VARCHAR) | SELECT us_air_date FROM table_2866503_1 WHERE us_viewers__million_ = "7.5" |
Where is nac breda club located? | CREATE TABLE table_name_76 (location VARCHAR,club VARCHAR) | SELECT location FROM table_name_76 WHERE club = "nac breda" |
get me the number of inpatient hospital admitted patients who had blood lab test. | CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag text,admission_location text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND lab.fluid = "Blood" |
Create a pie chart showing total number of transaction amount across transaction type. | CREATE TABLE Product_Categories (production_type_code VARCHAR(15),product_type_description VARCHAR(80),vat_rating DECIMAL(19,4))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),tr... | SELECT transaction_type, SUM(transaction_amount) FROM Financial_Transactions GROUP BY transaction_type |
What Soap Opera with the character Teemu Luotola? | CREATE TABLE table_64020 ("Actor" text,"Character" text,"Soap Opera" text,"Years" text,"Duration" text) | SELECT "Soap Opera" FROM table_64020 WHERE "Character" = 'teemu luotola' |
Can you tell me the Record that has the Home of detroit, and the Visitor of phoenix? | CREATE TABLE table_name_59 (record VARCHAR,home VARCHAR,visitor VARCHAR) | SELECT record FROM table_name_59 WHERE home = "detroit" AND visitor = "phoenix" |
tell me the birth date of patient 1819? | CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime 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 labevents (row_id number,subject_id number,hadm_id number,itemid... | SELECT patients.dob FROM patients WHERE patients.subject_id = 1819 |
Sandbox: Inactive > 1 month && Score < 0. | CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount numb... | SELECT SUM(CASE WHEN LastActivityDate < DATEADD(mm, -1, GETDATE()) AND Score < 0 THEN 1 ELSE 0 END) FROM Posts WHERE ParentId = 2140 |
Who is the player from Japan? | CREATE TABLE table_name_9 (player VARCHAR,country VARCHAR) | SELECT player FROM table_name_9 WHERE country = "japan" |
What is the name in Basque of the municipality whose official name is Kuartango? | CREATE TABLE table_300283_1 (name_in_basque VARCHAR,official_name VARCHAR) | SELECT name_in_basque FROM table_300283_1 WHERE official_name = "Kuartango" |
What's the nationality of Cardinal-Bishop of Albano? | CREATE TABLE table_name_32 (nationality VARCHAR,cardinalatial_order_and_title VARCHAR) | SELECT nationality FROM table_name_32 WHERE cardinalatial_order_and_title = "cardinal-bishop of albano" |
What's the total when the position was more than 6 and had an A Score of less than 7.6? | CREATE TABLE table_name_83 (total INTEGER,position VARCHAR,a_score VARCHAR) | SELECT MAX(total) FROM table_name_83 WHERE position > 6 AND a_score < 7.6 |
What's the average amount of Runs that has 40 innings, and Not outs larger than 6? | CREATE TABLE table_name_70 (runs INTEGER,innings VARCHAR,not_outs VARCHAR) | SELECT AVG(runs) FROM table_name_70 WHERE innings = 40 AND not_outs > 6 |
What was the score on February 21 when the home team was the Pittsburgh Penguins? | CREATE TABLE table_60623 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text) | SELECT "Score" FROM table_60623 WHERE "Home" = 'pittsburgh penguins' AND "Date" = 'february 21' |
list the number of patients admitted before the year2105. | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)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 ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admityear < "2105" |
has the human temperature c (calc) of patient 6196 been normal until 07/2103? | CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)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 transfers (row_id number,subject_id number,hadm_id numb... | 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 = 6196)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'temperature c (cal... |
If the qatari male is 1104, what is the grand total? | CREATE TABLE table_3506 ("Year" real,"Qatari Male" real,"Qatari Female" real,"Total Qatari" real,"Non Qatari Male" real,"Non Qatari Female" real,"Total Non Qatar" real,"Total Male" real,"Total Female" real,"Grand Total" real) | SELECT MAX("Grand Total") FROM table_3506 WHERE "Qatari Male" = '1104' |
papers using WordNet and Dbpedia | CREATE TABLE dataset (datasetid int,datasetname varchar)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE author (authorid int,authorname varchar)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE paperkeyphrase (paperid int,k... | SELECT DISTINCT paper.paperid FROM dataset, paper, paperdataset WHERE dataset.datasetname IN ('WordNet', 'Dbpedia') AND paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid GROUP BY paper.paperid |
What is the highest number of successful defenses in brandon, florida and a reign less than 1? | CREATE TABLE table_name_13 (successful_defenses INTEGER,location VARCHAR,reign VARCHAR) | SELECT MAX(successful_defenses) FROM table_name_13 WHERE location = "brandon, florida" AND reign < 1 |
Who has friends that are older than the average age? Print their names and their ages as well using a pie chart. | CREATE TABLE PersonFriend (name varchar(20),friend varchar(20),year INTEGER)CREATE TABLE Person (name varchar(20),age INTEGER,city TEXT,gender TEXT,job TEXT) | SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM Person) |
Which railway has a class of 250 and year 1936? | CREATE TABLE table_name_76 (railway VARCHAR,class VARCHAR,year VARCHAR) | SELECT railway FROM table_name_76 WHERE class = "250" AND year = "1936" |
Who is the pitcher from the 1994 season that had the Cleveland Indians as an opponent? | CREATE TABLE table_63221 ("Season" text,"Pitcher" text,"Decision" text,"Opponent" text,"Location" text) | SELECT "Pitcher" FROM table_63221 WHERE "Opponent" = 'cleveland indians' AND "Season" = '1994' |
When george hill (29) has the highest amount of points what is the date? | CREATE TABLE table_73464 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Series" text) | SELECT "Date" FROM table_73464 WHERE "High points" = 'George Hill (29)' |
What's the stepping amount for adh4450iaa5do? | CREATE TABLE table_33932 ("Model Number" text,"Stepping" text,"Frequency" text,"L2 Cache" text,"Multi 1" text,"V Core" text,"Socket" text,"Release Date" text,"Part Number(s)" text) | SELECT "Stepping" FROM table_33932 WHERE "Part Number(s)" = 'adh4450iaa5do' |
What is the smallest figure in 1960 when 1940 is 1,115 and 1990 is less than 928? | CREATE TABLE table_10998 ("1910" real,"1920" real,"1930" real,"1940" real,"1950" real,"1960" real,"1970" real,"1980" real,"1990" real,"2000" real) | SELECT MIN("1960") FROM table_10998 WHERE "1940" = '1,115' AND "1990" < '928' |
What is the total number of values for 'Teleplay by' category for series # 35? | CREATE TABLE table_72542 ("Series #" real,"Season #" real,"Title" text,"Story by" text,"Teleplay by" text,"Directed by" text,"Original air date" text) | SELECT COUNT("Teleplay by") FROM table_72542 WHERE "Series #" = '35' |
How many times was #7 Oregon a visiting team? | CREATE TABLE table_26842217_6 (time VARCHAR,visiting_team VARCHAR) | SELECT time FROM table_26842217_6 WHERE visiting_team = "#7 Oregon" |
What was the score for the South American Championship dated December 13, 1925? | CREATE TABLE table_40787 ("Date" text,"Result" text,"Score" text,"Brazil scorers" text,"Competition" text) | SELECT "Result" FROM table_40787 WHERE "Competition" = 'south american championship' AND "Date" = 'december 13, 1925' |
what was the result on 01x06 | CREATE TABLE table_29141354_1 (scores VARCHAR,episode VARCHAR) | SELECT scores FROM table_29141354_1 WHERE episode = "01x06" |
what's the builder where withdrawn is 1954 1958 | CREATE TABLE table_344 ("Number Range" text,"Introduced" text,"Builder" text,"Engine" text,"Weight (long tons)" text,"Seats" text,"Withdrawn" text,"Notes" text) | SELECT "Builder" FROM table_344 WHERE "Withdrawn" = '1954–1958' |
What is the make of car 31? | CREATE TABLE table_77726 ("Driver" text,"Car #" real,"Make" text,"Points" real,"Laps" real,"Winnings" text) | SELECT "Make" FROM table_77726 WHERE "Car #" = '31' |
Was the University of Michigan Signed? | CREATE TABLE table_68515 ("Round" real,"Name" text,"Position" text,"School" text,"Signed" text) | SELECT "Signed" FROM table_68515 WHERE "School" = 'university of michigan' |
What is the Mountains Classification for Winner Thor hushovd with Sprints Classification of no award? | CREATE TABLE table_45372 ("Stage" text,"Winner" text,"General Classification" text,"Mountains Classification" text,"Points Classification" text,"Sprints classification" text,"Team Classification" text) | SELECT "Mountains Classification" FROM table_45372 WHERE "Winner" = 'thor hushovd' AND "Sprints classification" = 'no award' |
How many blockings occured in the game with 198 rebounds? | CREATE TABLE table_73476 ("Player" text,"Games Played" real,"Minutes" real,"Field Goals" real,"Three Pointers" real,"Free Throws" real,"Rebounds" real,"Assists" real,"Blocks" real,"Steals" real,"Points" real) | SELECT MAX("Blocks") FROM table_73476 WHERE "Rebounds" = '198' |
What is the nationality of the player on the Jazz from 1974-79? | CREATE TABLE table_name_60 (nationality VARCHAR,years_for_jazz VARCHAR) | SELECT nationality FROM table_name_60 WHERE years_for_jazz = "1974-79" |
In what year was the artist Afro-dite? | CREATE TABLE table_name_54 (year VARCHAR,artist VARCHAR) | SELECT year FROM table_name_54 WHERE artist = "afro-dite" |
How many questions have I helped to close?. Shows the breakdown of the close reasons you've used in successfully closed questions. | CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId numbe... | SELECT t.Name AS "Close Reason", SUM(Count) AS Count FROM (SELECT CAST(PostHistory.Comment AS INT) AS CloseReasonId, 1 AS Count FROM PostHistory WHERE (PostHistoryTypeId = 10) AND ((Text LIKE @searchUserId1) OR (Text LIKE @searchUserId2))) AS a, CloseReasonTypes AS t WHERE a.CloseReasonId = t.Id GROUP BY a.CloseReasonI... |
Which Display size (in) has a Model of vaio pcg-u3? | CREATE TABLE table_50134 ("Model" text,"Manufacturer" text,"Weight (kg)" real,"Display size (in)" real,"Processor model" text,"Storage type" text) | SELECT COUNT("Display size (in)") FROM table_50134 WHERE "Model" = 'vaio pcg-u3' |
When is it has 15,557 Attendances? | CREATE TABLE table_name_35 (date VARCHAR,attendance VARCHAR) | SELECT date FROM table_name_35 WHERE attendance = "15,557" |
tell me the time of admission and primary disease of patient bessie giordano. | 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 demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.name = "Bessie Giordano" |
How long did the game go that was played with the Houston Oilers at home? | CREATE TABLE table_35596 ("Length of game" text,"Date" text,"Away team" text,"Score" text,"Home team" text) | SELECT "Length of game" FROM table_35596 WHERE "Home team" = 'houston oilers' |
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of email and salary in a bar chart, and I want to display from high to low by the bar. | 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 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),DEPARTME... | SELECT EMAIL, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL DESC |
Draw a bar chart for what are the different classes of races, and how many races correspond to each? | CREATE TABLE track (Track_ID int,Name text,Location text,Seating real,Year_Opened real)CREATE TABLE race (Race_ID int,Name text,Class text,Date text,Track_ID text) | SELECT Class, COUNT(*) FROM race GROUP BY Class |
When cannot handle non-empty timestamp argument! 2007 is released what is the no.? | CREATE TABLE table_22353 ("No." real,"Album" text,"Artist" text,"Record label" text,"Released" text,"Chart peak" real,"Number of times certified platinum" text) | SELECT "No." FROM table_22353 WHERE "Released" = 'Cannot handle non-empty timestamp argument! 2007' |
what is maximum age of patients whose gender is f and discharge location is snf? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.discharge_location = "SNF" |
Which losing team had a score of 24-12? | CREATE TABLE table_11236195_2 (losingteam VARCHAR,score VARCHAR) | SELECT losingteam FROM table_11236195_2 WHERE score = "24-12" |
Who is the director of the episode 'rain of terror' that was written by John Brown? | CREATE TABLE table_18951 ("Ep. No." real,"Title" text,"Director" text,"Written by" text,"Original Air Date" text,"Production No." real) | SELECT "Director" FROM table_18951 WHERE "Written by" = 'John Brown' AND "Title" = 'Rain of Terror' |
how many times is the seasons 2 and the coach guy lowman? | CREATE TABLE table_9759 ("Coach" text,"Years" text,"Seasons" real,"Record" text,"Winning %" real) | SELECT COUNT("Winning %") FROM table_9759 WHERE "Seasons" = '2' AND "Coach" = 'guy lowman' |
What is the lowest number of matches played that has more than 0 draws, a percentage of 12.50%, and fewer than 3 losses? | CREATE TABLE table_name_14 (played INTEGER,lost VARCHAR,drawn VARCHAR,percentage VARCHAR) | SELECT MIN(played) FROM table_name_14 WHERE drawn > 0 AND percentage = "12.50%" AND lost < 3 |
What was the highest share for the winners in 1959? | CREATE TABLE table_9049 ("Year" real,"Winner" text,"Score" text,"Runner(s)-up" text,"Winner's share ($)" real,"Course" text,"Location" text) | SELECT MAX("Winner's share ($)") FROM table_9049 WHERE "Year" = '1959' |
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, visualize a bar chart about the distribution of hire_date and the sum of salary bin hire_date by weekday, and display sum salary in desc order. | 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 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 jobs (JOB_ID v... | SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(SALARY) DESC |
What is the result of the friendly match? | CREATE TABLE table_37247 ("Goal" real,"Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Result" FROM table_37247 WHERE "Competition" = 'friendly' |
count the number of times patient 012-37411 had had a urine output on 12/29/this year. | CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE microlab (microlabid number,patientuni... | SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-37411')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.ce... |
Competition of friendly, and a Date of 03-jun-62 had what score? | CREATE TABLE table_name_72 (score VARCHAR,competition VARCHAR,date VARCHAR) | SELECT score FROM table_name_72 WHERE competition = "friendly" AND date = "03-jun-62" |
What are the birth places of players won on hall of fame since 1871? | CREATE TABLE hall_of_fame (player_id text,yearid number,votedby text,ballots text,needed text,votes text,inducted text,category text,needed_note text)CREATE TABLE player_award (player_id text,award_id text,year number,league_id text,tie text,notes text)CREATE TABLE player (player_id text,birth_year text,birth_month tex... | SELECT T1.birth_country FROM hall_of_fame AS T2 JOIN player AS T1 ON T1.player_id = T2.player_id WHERE T2.inducted = "Y" AND T2.yearid >= 1871 |
What is the number of sequences for the name Alifoldz? | CREATE TABLE table_34124 ("Name" text,"Number of sequences Number of sequences: ." text,"Alignment Alignment: predicts an alignment,." text,"Structure Structure: predicts structure,." text,"Link" text) | SELECT "Number of sequences Number of sequences: ." FROM table_34124 WHERE "Name" = 'alifoldz' |
What nationality is Larry McMorran? | CREATE TABLE table_name_59 (nationality VARCHAR,player VARCHAR) | SELECT nationality FROM table_name_59 WHERE player = "larry mcmorran" |
What is the Venue with an Attendance that is larger than 6,938? | CREATE TABLE table_7185 ("Date" text,"Opponent" text,"Venue" text,"Result" text,"Attendance" real) | SELECT "Venue" FROM table_7185 WHERE "Attendance" > '6,938' |
what is the difference in touchdowns between raymond philyaw and jerel myers ? | CREATE TABLE table_203_8 (id number,"player" text,"rec." number,"yards" number,"avg." number,"td's" number,"long" number) | SELECT ABS((SELECT "td's" FROM table_203_8 WHERE "player" = 'raymond philyaw') - (SELECT "td's" FROM table_203_8 WHERE "player" = 'jerel myers')) |
What are all sail numbers for the yacht Yendys? | CREATE TABLE table_72589 ("Position" real,"Sail number" text,"Yacht" text,"State/country" text,"Yacht type" text,"LOA (Metres)" text,"Skipper" text,"Corrected time d:hh:mm:ss" text) | SELECT "Sail number" FROM table_72589 WHERE "Yacht" = 'Yendys' |
What is the score of the game that had a decision of Parent, home team of Philadelphia, and visitor of Pittsburgh? | CREATE TABLE table_6273 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Decision" text,"Attendance" real,"Record" text) | SELECT "Score" FROM table_6273 WHERE "Decision" = 'parent' AND "Home" = 'philadelphia' AND "Visitor" = 'pittsburgh' |
What is the venue in 2002? | CREATE TABLE table_name_86 (venue VARCHAR,year VARCHAR) | SELECT venue FROM table_name_86 WHERE year = "2002" |
how many hours have elapsed since the first time in the current hospital visit that patient 004-86136 underwent a treatment of hyperkalemia - intravenous calcium procedure? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,obs... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-86136... |
with more than 32 laps and sylvain guintoli as rider, what's the lowest grid ? | CREATE TABLE table_name_15 (grid INTEGER,rider VARCHAR,laps VARCHAR) | SELECT MIN(grid) FROM table_name_15 WHERE rider = "sylvain guintoli" AND laps > 32 |
What is the status of the airport line? | CREATE TABLE table_1603807_2 (status VARCHAR,line VARCHAR) | SELECT status FROM table_1603807_2 WHERE line = "Airport line" |
what's the record where result is l 24-10 | CREATE TABLE table_11406866_2 (record VARCHAR,result VARCHAR) | SELECT record FROM table_11406866_2 WHERE result = "L 24-10" |
the latest flight from BALTIMORE to OAKLAND please and i'd like a meal with that | 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 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, food_service WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND food_s... |
Name the subject of shiyan | CREATE TABLE table_80079 ("Chapter" real,"Chinese" text,"Pinyin" text,"Translation" text,"Subject" text) | SELECT "Subject" FROM table_80079 WHERE "Pinyin" = 'shiyan' |
Which player has a last name of baron? | CREATE TABLE table_name_93 (bats VARCHAR,surname VARCHAR) | SELECT bats FROM table_name_93 WHERE surname = "baron" |
What tournament was Laura Davies the runner-up? | CREATE TABLE table_9533 ("Date" text,"Tournament" text,"Winning score" text,"Margin of victory" text,"Runner(s)-up" text) | SELECT "Tournament" FROM table_9533 WHERE "Runner(s)-up" = 'laura davies' |
how many hours have it been since the last time that patient 82132 was prescribed with albuterol neb soln during their current hospital visit? | 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 microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE cost (row_id number... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', prescriptions.startdate)) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 82132 AND admissions.dischtime IS NULL) AND prescriptions.drug = 'albuterol neb soln' ORDER BY prescriptions.s... |
what is the highest platform number when the frequency (per hour) is 4, the operator is london overground and the destination is west croydon? | CREATE TABLE table_name_32 (platform INTEGER,destination VARCHAR,frequency__per_hour_ VARCHAR,operator VARCHAR) | SELECT MAX(platform) FROM table_name_32 WHERE frequency__per_hour_ = 4 AND operator = "london overground" AND destination = "west croydon" |
Which character won before 2006? | CREATE TABLE table_name_44 (character VARCHAR,result VARCHAR,year VARCHAR) | SELECT character FROM table_name_44 WHERE result = "won" AND year < 2006 |
What is the name of the cornerback from 1997? | CREATE TABLE table_54140 ("Year" real,"Pick" text,"Player name" text,"Position" text,"College" text) | SELECT "Player name" FROM table_54140 WHERE "Position" = 'cornerback' AND "Year" = '1997' |
What date did the episode with Andy Murray as Jamie and John's guest first broadcast? | CREATE TABLE table_30962 ("Episode" text,"First broadcast" text,"Andrew and Georgies guest Lee Mack replaced Andrew Flintoff as team captain for one week in series 4,episode 2." text,"Jamie and Johns guest" text,"Scores" text) | SELECT "First broadcast" FROM table_30962 WHERE "Jamie and Johns guest" = 'Andy Murray' |
What is the number of meaning where full name is chidinma anulika? | CREATE TABLE table_17247 ("Full Name" text,"Nickname" text,"Gender" text,"Weight at birth" text,"Meaning" text) | SELECT COUNT("Meaning") FROM table_17247 WHERE "Full Name" = 'Chidinma Anulika' |
Is it live or studio before 1983? | CREATE TABLE table_name_98 (live___studio VARCHAR,year INTEGER) | SELECT live___studio FROM table_name_98 WHERE year < 1983 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.