table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, ...
for the first time in 03/this year, what was the drug that patient 40116 was prescribed via iv bolus route?
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 40116) AND prescriptions.route = 'iv bolus' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m'...
CREATE TABLE table_11166 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What venue had an away team of south melbourne?
SELECT "Venue" FROM table_11166 WHERE "Away team" = 'south melbourne'
CREATE TABLE table_7804 ( "Year" real, "Tournament" text, "Venue" text, "Result" text, "Event" text )
What was the most recent year the venue was Barcelona, Spain?
SELECT MAX("Year") FROM table_7804 WHERE "Venue" = 'barcelona, spain'
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,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 T...
For all employees in the Finance department, compare the total number of different job id using a bar chart, and could you list by the bar in descending?
SELECT JOB_ID, COUNT(JOB_ID) FROM employees AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID WHERE T2.DEPARTMENT_NAME = 'Finance' GROUP BY JOB_ID ORDER BY JOB_ID DESC
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 )
For those records from the products and each product's manufacturer, a bar chart shows the distribution of name and the sum of price , and group by attribute name, show in desc by the y axis.
SELECT T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Price DESC
CREATE TABLE table_45152 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real )
What was 1961's qual?
SELECT "Qual" FROM table_45152 WHERE "Year" = '1961'
CREATE TABLE table_19975 ( "No." real, "English name" text, "Bulgarian name" text, "Bulgarian name ( Transliteration )" text, "Old Bulgarian Names" text, "Old Bulgarian name (Transliteration)" text, "Old Bulgarian name - Meaning" text )
Name the english name for orach, zarev
SELECT "English name" FROM table_19975 WHERE "Old Bulgarian name (Transliteration)" = 'Orach, Zarev'
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, value...
what are the three most frequent drugs that were prescribed within 2 months to the patients aged 20s after having been diagnosed with nb obsrv suspct infect, until 2 years ago?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
CREATE TABLE table_name_84 ( year INTEGER, date VARCHAR )
What is the average year of the games with the date December 26?
SELECT AVG(year) FROM table_name_84 WHERE date = "december 26"
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 )
Display a bar chart for what is the total revenue of companies started by founder?, and could you list in asc by the total number of revenue?
SELECT Founder, SUM(Revenue) FROM Manufacturers GROUP BY Founder ORDER BY SUM(Revenue)
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE icustays ( row_id number, ...
what are the top five most common procedures in 2102?
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE STRFTIME('%y', procedures_icd.charttime) = '2102' GROUP BY procedures_icd.icd9_code) AS t1 ...
CREATE TABLE table_name_74 ( game VARCHAR, score VARCHAR )
Which Game has a Score of 122 125?
SELECT game FROM table_name_74 WHERE score = "122–125"
CREATE TABLE table_6044 ( "Month" text, "Week" real, "Offensive" text, "Defensive" text, "Goalkeeper" text, "Rookie" text )
Who is the rookie goalkeeper Rob Scherr who played before week 6?
SELECT "Rookie" FROM table_6044 WHERE "Goalkeeper" = 'rob scherr' AND "Week" < '6'
CREATE TABLE table_72488 ( "Position" real, "Artist" text, "Song title" text, "Highest position" real, "Points" real )
what is the nme of the song performed by billy vaughn?
SELECT "Song title" FROM table_72488 WHERE "Artist" = 'Billy Vaughn'
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, ...
how many of the patients belonging to asian ethnic origin were unmarried?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.ethnicity = "ASIAN"
CREATE TABLE table_16799784_2 ( name VARCHAR, latitude VARCHAR )
Name the name of 36.0n
SELECT name FROM table_16799784_2 WHERE latitude = "36.0N"
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, ...
What is the top league that pays the most to their players?
SELECT league_id FROM salary GROUP BY league_id ORDER BY SUM(salary) DESC LIMIT 1
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 demographic ( subject_id text, hadm_id t...
how many of the patients aged below 31 were treated with sodium fluoride (dental gel)?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "31" AND prescriptions.drug = "Sodium Fluoride (Dental Gel)"
CREATE TABLE table_name_38 ( overall VARCHAR, pick VARCHAR, name VARCHAR )
With the pick of 1 Cecil Martin has what number as the overall?
SELECT COUNT(overall) FROM table_name_38 WHERE pick = 1 AND name = "cecil martin"
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
get me patient 6215's yearly maximum weight until 09/2103.
SELECT MAX(chartevents.valuenum) 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 = 6215)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit...
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 t...
What is the number of patients admitted before 2184 who had overdose as their primary disease?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "OVERDOSE" AND demographic.admityear < "2184"
CREATE TABLE table_4316 ( "Player" text, "Nationality" text, "Position" text, "Years in Toronto" text, "School/Club Team" text )
What Player is from Argentina and whose position is a guard-forward?
SELECT "Player" FROM table_4316 WHERE "Position" = 'guard-forward' AND "Nationality" = 'argentina'
CREATE TABLE table_name_96 ( competition VARCHAR, date VARCHAR )
What is Competition, when Date is 30 December 2005?
SELECT competition FROM table_name_96 WHERE date = "30 december 2005"
CREATE TABLE table_47686 ( "Year [A ]" real, "Pick" text, "Player" text, "Position" text, "College" text )
What is the most recent year georgia tech chose a linebacker?
SELECT MAX("Year [A ]") FROM table_47686 WHERE "Position" = 'linebacker' AND "College" = 'georgia tech'
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 )
How many different products are produced in each headquarter city Visualize by bar chart, sort in ascending by the y axis.
SELECT Headquarter, COUNT(DISTINCT T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code ORDER BY COUNT(DISTINCT T1.Name)
CREATE TABLE table_6762 ( "Date" text, "Pos." text, "Player" text, "From club" text, "Transfer fee" text )
Which Player had a From club of atl tico madrid?
SELECT "Player" FROM table_6762 WHERE "From club" = 'atlético madrid'
CREATE TABLE table_45683 ( "Wicket" text, "Runs" text, "Batting partners" text, "Batting team" text, "Fielding team" text, "Venue" text, "Season" text )
Who were the batting partners in Colombo?
SELECT "Batting partners" FROM table_45683 WHERE "Venue" = 'colombo'
CREATE TABLE table_35324 ( "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text )
Who was the Opponent on a Hard (i) Surface?
SELECT "Opponent" FROM table_35324 WHERE "Surface" = 'hard (i)'
CREATE TABLE table_68955 ( "Sport" text, "Competition name" text, "Competing entities" text, "Age groups" text, "Held every" text )
What is the age group for figure skating?
SELECT "Age groups" FROM table_68955 WHERE "Sport" = 'figure skating'
CREATE TABLE table_60674 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
With a To par of 1, what is Player Henrik Stenson's Score?
SELECT "Score" FROM table_60674 WHERE "To par" = '–1' AND "Player" = 'henrik stenson'
CREATE TABLE table_22730 ( "State and District of Columbia" text, "Obese adults" text, "Overweight (incl. obese) adults" text, "Obese children and adolescents" text, "Obesity rank" real )
What is every state and District of Columbia with 60.0% overweight or obese adults?
SELECT "State and District of Columbia" FROM table_22730 WHERE "Overweight (incl. obese) adults" = '60.0%'
CREATE TABLE table_40276 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
Who were the runner(s)-up when the winning score was 10 (69-68-74-67=278)?
SELECT "Margin of victory" FROM table_40276 WHERE "Winning score" = '–10 (69-68-74-67=278)'
CREATE TABLE table_225102_4 ( vacator VARCHAR, reason_for_change VARCHAR )
Name the vacator for died august 13, 1826
SELECT vacator FROM table_225102_4 WHERE reason_for_change = "Died August 13, 1826"
CREATE TABLE table_name_17 ( drawn INTEGER, points VARCHAR, against VARCHAR )
Which Drawn has a Points of 6, and a Against larger than 16?
SELECT SUM(drawn) FROM table_name_17 WHERE points = 6 AND against > 16
CREATE TABLE table_name_60 ( non_suited_match VARCHAR, number_of_decks INTEGER )
Name the Non-Suited Match that has greater than 6 Number of Decks.
SELECT non_suited_match FROM table_name_60 WHERE number_of_decks > 6
CREATE TABLE table_name_38 ( points INTEGER, drawn VARCHAR, played VARCHAR )
What is the fewest number of points for clubs with less than 2 draws and more than 8 matches played?
SELECT MIN(points) FROM table_name_38 WHERE drawn < 2 AND played > 8
CREATE TABLE table_203_238 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
number of competitions
SELECT COUNT("competition") FROM table_203_238
CREATE TABLE table_name_57 ( player VARCHAR, place VARCHAR, score VARCHAR )
What is the T4 Place Player with a Score of 71-74-66=211?
SELECT player FROM table_name_57 WHERE place = "t4" AND score = 71 - 74 - 66 = 211
CREATE TABLE table_26762 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (million)" text, "Original air date" text, "Production code" text )
What as the production code for the episode directed by Robert Duncan McNeill?
SELECT "Production code" FROM table_26762 WHERE "Directed by" = 'Robert Duncan McNeill'
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varch...
Where should I begin if I want to take a computing infrastructure course ?
SELECT DISTINCT course.department, course.name, course.number FROM area, course WHERE area.area LIKE '%computing infrastructure%' AND course.course_id = area.course_id
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 ) CREATE TABLE icustays ( row_id number, s...
what was the name of the drug that was prescribed to patient 27362 last time through the oral route in 07/last year?
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27362) AND prescriptions.route = 'oral' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') AND STRFTIME('%m', pr...
CREATE TABLE book_club ( book_club_id int, Year int, Author_or_Editor text, Book_Title text, Publisher text, Category text, Result text ) CREATE TABLE culture_company ( Company_name text, Type text, Incorporated_in text, Group_Equity_Shareholding real, book_club_id text,...
Show all book categories and the number of books in each category with a bar chart.
SELECT Category, COUNT(*) FROM book_club GROUP BY Category
CREATE TABLE table_1973321_5 ( points INTEGER, status VARCHAR )
Name the most points for champion, won in the final against am lie mauresmo
SELECT MAX(points) FROM table_1973321_5 WHERE status = "Champion, won in the final against Amélie Mauresmo"
CREATE TABLE table_42124 ( "City" text, "State" text, "AAM Accredited" text, "AAM Member" text, "ASTC Member" text )
What is City, when State is California, when AAM Accredited is No, when ASTC Member is Yes, and when AAM Member is No?
SELECT "City" FROM table_42124 WHERE "State" = 'california' AND "AAM Accredited" = 'no' AND "ASTC Member" = 'yes' AND "AAM Member" = 'no'
CREATE TABLE table_1398 ( "Headphone Model" text, "Headphone Class" text, "Sensitivity (dB)" text, "Impedance (Ohms)" real, "Driver-matched dB" text, "Construction" text, "Earpads" text, "Termination" text, "Succeeded by" text )
Name what succeeded by for foam
SELECT "Succeeded by" FROM table_1398 WHERE "Earpads" = 'Foam'
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 month ( ...
flights from SAN JOSE to ST. PAUL
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 = 'SAN JOSE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ST. P...
CREATE TABLE table_name_49 ( from_club VARCHAR, date VARCHAR )
Which From club has a Date of 20 oct. 2008?
SELECT from_club FROM table_name_49 WHERE date = "20 oct. 2008"
CREATE TABLE member_attendance ( Member_ID int, Performance_ID int, Num_of_Pieces int ) CREATE TABLE member ( Member_ID text, Name text, Nationality text, Role text ) CREATE TABLE performance ( Performance_ID real, Date text, Host text, Location text, Attendance int )
How many performances of each location? Show me the proportion using a pie chart.
SELECT Location, COUNT(Location) FROM performance GROUP BY Location
CREATE TABLE table_14523485_9 ( country VARCHAR, channel VARCHAR )
What country is the show aired on TVNZ?
SELECT country FROM table_14523485_9 WHERE channel = "TVNZ"
CREATE TABLE product ( product_id int, product text, dimensions text, dpi real, pages_per_minute_color real, max_page_size text, interface text ) CREATE TABLE district ( District_ID int, District_name text, Headquartered_City text, City_Population real, City_Area real ) ...
Return a bar chart on what are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?, I want to sort by the bars in asc please.
SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000 ORDER BY District_name
CREATE TABLE table_12259 ( "Built" real, "Ship" text, "Operator" text, "Tonnage" text, "Flag" text )
What ship was built in 2012?
SELECT "Ship" FROM table_12259 WHERE "Built" = '2012'
CREATE TABLE table_25030512_26 ( district VARCHAR, incumbent VARCHAR )
In what district was keith ellison the incumbent?
SELECT district FROM table_25030512_26 WHERE incumbent = "Keith Ellison"
CREATE TABLE table_name_76 ( grid INTEGER, driver VARCHAR )
What is the grid total for david coulthard?
SELECT SUM(grid) FROM table_name_76 WHERE driver = "david coulthard"
CREATE TABLE table_28498999_6 ( country VARCHAR, player VARCHAR )
what is the place where the person is luke donald
SELECT country FROM table_28498999_6 WHERE player = "Luke Donald"
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,...
what number of married patients underwent the procedure titled radiotherapeut proc nec?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "MARRIED" AND procedures.short_title = "Radiotherapeut proc NEC"
CREATE TABLE table_28677723_14 ( style VARCHAR, total VARCHAR )
Name the style for 27
SELECT style FROM table_28677723_14 WHERE total = 27
CREATE TABLE branch ( Branch_ID int, Name text, Open_year text, Address_road text, City text, membership_amount text ) CREATE TABLE purchase ( Member_ID int, Branch_ID text, Year text, Total_pounds real ) CREATE TABLE membership_register_branch ( Member_ID int, Branch_I...
Show the hometown of all members, I want to sort by the X-axis in asc.
SELECT Hometown, COUNT(Hometown) FROM member GROUP BY Hometown ORDER BY Hometown
CREATE TABLE table_65970 ( "Country" text, "1951" real, "1952" real, "1953" real, "1954" real, "1955" real, "1956" real, "1957" real, "1958" real, "1959" real )
What is the 1952 rate when the 1954 is more than 4.2?
SELECT SUM("1952") FROM table_65970 WHERE "1954" > '4.2'
CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int ) CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real...
Find those years for all exhibitions with ticket prices lower than 15, group by year, and count year.
SELECT Year, COUNT(Year) FROM exhibition WHERE Ticket_Price < 15 GROUP BY Year
CREATE TABLE table_11971 ( "CERCLIS ID" text, "Name" text, "County" text, "Partially deleted" text, "Deleted" text )
Which site has the CERCLIS ID fld004092532?
SELECT "Name" FROM table_11971 WHERE "CERCLIS ID" = 'fld004092532'
CREATE TABLE table_75870 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the total number of medals when there are 18 gold medals?
SELECT SUM("Total") FROM table_75870 WHERE "Gold" = '18'
CREATE TABLE table_33015 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Attendance" text )
What was the attendance on 1997-12-14?
SELECT "Attendance" FROM table_33015 WHERE "Date" = '1997-12-14'
CREATE TABLE genres ( id VARCHAR, name VARCHAR ) CREATE TABLE tracks ( name VARCHAR, genre_id VARCHAR )
What is the name of tracks whose genre is Rock?
SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock"
CREATE TABLE table_name_36 ( league_from VARCHAR, pick__number VARCHAR )
What is the league that has the pick #160?
SELECT league_from FROM table_name_36 WHERE pick__number = 160
CREATE TABLE table_12886178_5 ( club VARCHAR, tries_for VARCHAR )
What club has a tries for count of 19?
SELECT club FROM table_12886178_5 WHERE tries_for = "19"
CREATE TABLE table_name_61 ( date VARCHAR, winning_driver VARCHAR )
What Date has a Winning driver of ugo sivocci?
SELECT date FROM table_name_61 WHERE winning_driver = "ugo sivocci"
CREATE TABLE table_name_30 ( home VARCHAR, date VARCHAR, geust VARCHAR )
Who was the home team of the match on 21.10.07, which had bsc young boys (asl) as the geust?
SELECT home FROM table_name_30 WHERE date = "21.10.07" AND geust = "bsc young boys (asl)"
CREATE TABLE table_23589 ( "Title" text, "Author" text, "Reader" text, "Format" text, "Company" text, "Release Date" text, "Notes" text )
who the reader of title department x?
SELECT "Reader" FROM table_23589 WHERE "Title" = 'Department X'
CREATE TABLE table_name_15 ( time VARCHAR, show_name VARCHAR )
What Time has a Show Name of mornings with neil mitchell?
SELECT time FROM table_name_15 WHERE show_name = "mornings with neil mitchell"
CREATE TABLE table_name_75 ( status VARCHAR, authors VARCHAR )
What is varricchio's status?
SELECT status FROM table_name_75 WHERE authors = "varricchio"
CREATE TABLE table_179174_2 ( years VARCHAR, flights VARCHAR )
What years had 134 orbital flights?
SELECT years FROM table_179174_2 WHERE flights = "134 Orbital"
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
what is the average age of patients who have stayed in the hospital for 4 days with a government insurance policy?
SELECT AVG(demographic.age) FROM demographic WHERE demographic.insurance = "Government" AND demographic.days_stay = "4"
CREATE TABLE table_58556 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What was the bronze medal count of the team that finished with 47 total medals?
SELECT AVG("Bronze") FROM table_58556 WHERE "Total" = '47'
CREATE TABLE table_name_33 ( player VARCHAR, position VARCHAR, year VARCHAR )
What player has a no pick position in 1976?
SELECT player FROM table_name_33 WHERE position = "no pick" AND year = 1976
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, res...
how do i get from BWI to WASHINGTON
SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city AS CITY_0, city AS CITY_1, ground_service WHERE airport.airport_code = airport_service.airport_code AND CITY_0.city_name = 'WASHINGTON' AND CITY_1.city_code = airport_service.city_code AND CITY_1.city_name = 'WASHINGTON' AND ground_servic...
CREATE TABLE table_name_10 ( silver VARCHAR, bronze INTEGER )
What is the number of silver when bronze is less than 0?
SELECT COUNT(silver) FROM table_name_10 WHERE bronze < 0
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 )
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and the average of manufacturer , and group by attribute name, and I want to order in desc by the y axis please.
SELECT T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Manufacturer DESC
CREATE TABLE table_12976038_1 ( director VARCHAR, viewers__in_millions_ VARCHAR )
Who directed the episode that had 6.04 million viewers?
SELECT director FROM table_12976038_1 WHERE viewers__in_millions_ = "6.04"
CREATE TABLE table_11677100_17 ( school VARCHAR, player VARCHAR )
How many schools did Bubba Starling attend?
SELECT COUNT(school) FROM table_11677100_17 WHERE player = "Bubba Starling"
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose...
what is the three most frequent drugs that were prescribed within 2 months to a female patient 20s after they have been diagnosed with hyp kid nos w cr kid v, since 4 years ago?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
CREATE TABLE table_44577 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
What event has a 0:49 time?
SELECT "Event" FROM table_44577 WHERE "Time" = '0:49'
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 patients ( row_id number, subject_id number, gender text, dob time, dod time ) CR...
what were the top five common drugs that patients were prescribed within 2 months after they had been prescribed with bystolic since 2 years ago?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'bystolic' AND DATETIME(prescriptions.startdate) >= DATETIME(CURRE...
CREATE TABLE team ( team_id number, name text ) CREATE TABLE match_season ( season number, player text, position text, country number, team number, draft_pick_number number, draft_class text, college text ) CREATE TABLE player ( player_id number, player text, years_...
Count the number of different teams involved in match season.
SELECT COUNT(DISTINCT team) FROM match_season
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 (...
how many patients whose admission location is emergency room admit and year of birth is less than 1850?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.dob_year < "1850"
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE course...
Which of the courses I 've taken is considered the hardest ?
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE program_course.workload = (SELECT MAX(PROGRAM_COURSEalias1.workload) ...
CREATE TABLE table_name_25 ( bronze VARCHAR, silver VARCHAR )
Name the bronze when silver is 1
SELECT bronze FROM table_name_25 WHERE silver = 1
CREATE TABLE table_name_92 ( date VARCHAR, opponent VARCHAR, week VARCHAR, game_site VARCHAR )
What is the date of the game in a week earlier than 10 played in Texas stadium agains the Atlanta Falcons?
SELECT date FROM table_name_92 WHERE week < 10 AND game_site = "texas stadium" AND opponent = "atlanta falcons"
CREATE TABLE table_22288 ( "Departure" text, "Going to" text, "Calling at" text, "Arrival" text, "Operator" text )
Who was the train operator when the train departed at 11.02 in 1922?
SELECT "Operator" FROM table_22288 WHERE "Departure" = '11.02'
CREATE TABLE table_2147588_4 ( vacator VARCHAR, successor VARCHAR )
When nathaniel g. taylor (u) is the successor what is the vacator?
SELECT vacator FROM table_2147588_4 WHERE successor = "Nathaniel G. Taylor (U)"
CREATE TABLE table_2013 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Location" text )
Where is the frequency 92.3mhz?
SELECT "Location" FROM table_2013 WHERE "Frequency" = '92.3MHz'
CREATE TABLE table_name_63 ( surface VARCHAR, championship VARCHAR, outcome VARCHAR )
What surface has indian wells as the championship, with winner as the outcome?
SELECT surface FROM table_name_63 WHERE championship = "indian wells" AND outcome = "winner"
CREATE TABLE Posts ( 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...
Users with most deleted questions.
SELECT Users.Id, COUNT(Posts.Id) FROM Users LEFT JOIN Posts ON Users.Id = Posts.OwnerUserId WHERE Posts.DeletionDate IS NULL AND PostTypeId = 1 GROUP BY Users.Id
CREATE TABLE table_1401 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text, "Attendance" real )
At which stadiums was attendance total 79176?
SELECT "Game Site" FROM table_1401 WHERE "Attendance" = '79176'
CREATE TABLE table_dev_47 ( "id" int, "gender" string, "gestational_diabetes" bool, "systolic_blood_pressure_sbp" int, "leukopenia" int, "hemoglobin_a1c_hba1c" float, "cd4_count" int, "platelets" int, "diabetic" string, "elevated_blood_pressure" bool, "diastolic_blood_pressur...
elevated blood pressure > 130 mmhg systolic, > 85 mmhg diastolic
SELECT * FROM table_dev_47 WHERE elevated_blood_pressure = 1 OR (systolic_blood_pressure_sbp > 130 OR diastolic_blood_pressure_dbp > 85)
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE comment_instructor ( instructor_id int...
What class can I take this semester that 's a prerequisite for most other classes ?
SELECT COUNT(DISTINCT COURSE_PREREQUISITEalias0.course_id), COURSEalias0.department, COURSEalias0.name, COURSEalias0.number FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course AS COURSEalias1, course_offering AS COURSE_OFFERINGali...
CREATE TABLE table_26181 ( "Neighbourhood" text, "% 0-19" text, "% 20-39" text, "% 40-59" text, "% 60-74" text, "% 75 +" text )
What is every value for % 40-59 if % 60-74 is 12,40%?
SELECT "% 40-59" FROM table_26181 WHERE "% 60-74" = '12,40%'
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 )
For those records from the products and each product's manufacturer, find name and price , and group by attribute founder, and visualize them by a bar chart, and sort by the Y from low to high.
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name ORDER BY T1.Price
CREATE TABLE table_35320 ( "Season" real, "Overall" real, "Slalom" text, "Giant Slalom" real, "Super G" text, "Downhill" text, "Combined" text )
What is the value for Slalom in seasons later than 1994 and overall value greater than 22?
SELECT "Slalom" FROM table_35320 WHERE "Season" > '1994' AND "Overall" > '22'
CREATE TABLE table_11803648_21 ( position VARCHAR, player VARCHAR )
What position does Cody Ceci play?
SELECT position FROM table_11803648_21 WHERE player = "Cody Ceci"
CREATE TABLE table_name_55 ( home_team VARCHAR, venue VARCHAR )
Who was home at Princes Park?
SELECT home_team AS score FROM table_name_55 WHERE venue = "princes park"