table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_50635 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What player has the score of 67-72=139?
SELECT "Player" FROM table_50635 WHERE "Score" = '67-72=139'
CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Movie ( mID int, title text, year int, director text ) CREATE TABLE Reviewer ( rID int, name text )
A bar chart about what is the average rating star for each reviewer?, display in ascending by the x axis please.
SELECT name, AVG(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID = T2.rID GROUP BY T2.name ORDER BY name
CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_...
flights from COLUMBUS to MILWAUKEE
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 = 'COLUMBUS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MILWA...
CREATE TABLE table_203_55 ( id number, "japanese title" text, "western title" text, "regions" text, "release" number, "platform(s)" text, "genre" text )
when was the last super chinese game released ?
SELECT MAX("release") FROM table_203_55
CREATE TABLE table_52952 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the top crowd when collingwood played home?
SELECT MAX("Crowd") FROM table_52952 WHERE "Home team" = 'collingwood'
CREATE TABLE table_45773 ( "Rank" text, "Figures" text, "Player" text, "Opponent" text, "Venue" text, "Season" text )
What is Venue, when Figures is 5/29?
SELECT "Venue" FROM table_45773 WHERE "Figures" = '5/29'
CREATE TABLE assets ( asset_id number, maintenance_contract_id number, supplier_company_id number, asset_details text, asset_make text, asset_model text, asset_acquired_date time, asset_disposed_date time, other_asset_details text ) CREATE TABLE parts ( part_id number, part_...
Which skill is used in fixing the most number of faults? List the skill id and description.
SELECT T1.skill_id, T1.skill_description FROM skills AS T1 JOIN skills_required_to_fix AS T2 ON T1.skill_id = T2.skill_id GROUP BY T1.skill_id ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE table_22514845_4 ( reporters VARCHAR, year VARCHAR )
Who are the reporters for the year of 1984?
SELECT reporters FROM table_22514845_4 WHERE year = 1984
CREATE TABLE table_name_47 ( name VARCHAR, losses VARCHAR, matches VARCHAR )
Who has 5 losses and has played 11 matches?
SELECT name FROM table_name_47 WHERE losses = "5" AND matches = "11"
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...
how many patients were transferred within the facility have the procedure icd9 code 5059?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND procedures.icd9_code = "5059"
CREATE TABLE university ( school_id number, school text, location text, founded number, affiliation text, enrollment number, nickname text, primary_conference text ) CREATE TABLE basketball_match ( team_id number, school_id number, team_name text, acc_regular_season text...
What is the founded year of the non public school that was founded most recently?
SELECT founded FROM university WHERE affiliation <> 'Public' ORDER BY founded DESC LIMIT 1
CREATE TABLE table_204_628 ( id number, "trial number" text, "date" text, "name of trial" text, "celebrity/ies taking part" text, "winner/number of stars" text, "notes" text )
jan and scott took part in trial number 10 . who took part in the previous trial ?
SELECT "celebrity/ies taking part" FROM table_204_628 WHERE "trial number" = 10 - 1
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, ...
Report the number of patients with left femur fracture primary disease who died in or before 2115.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "LEFT FEMUR FRACTURE" AND demographic.dod_year <= "2115.0"
CREATE TABLE table_204_506 ( id number, "seasons" number, "team" text, "ch.wins" number, "promotions" number, "relegations" number )
other than scafati basket , who appeared in 9 seasons ?
SELECT "team" FROM table_204_506 WHERE "team" <> 'scafati basket' AND "seasons" = 9
CREATE TABLE table_80181 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" text )
What finish qualified at 141.071?
SELECT "Finish" FROM table_80181 WHERE "Qual" = '141.071'
CREATE TABLE table_name_68 ( constructor VARCHAR, grid VARCHAR, laps VARCHAR )
I want the constructor for grid less than 20 and Laps of 6
SELECT constructor FROM table_name_68 WHERE grid < 20 AND laps = 6
CREATE TABLE table_67405 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
What chassis has more than 0 points?
SELECT "Chassis" FROM table_67405 WHERE "Points" > '0'
CREATE TABLE table_27754 ( "Series" real, "Season" text, "Played in" text, "First Match" text, "Tests played (sched)" text, "Tests won by Australia" real, "Tests won by England" real, "Tests drawn" real, "Series result" text, "Holder at series end" text )
Name the series result for season being 1998
SELECT "Series result" FROM table_27754 WHERE "Season" = '1998'
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title 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 chartevents ( ...
what is the total amount of nepro intake in patient 269 on 11/22/2100?
SELECT SUM(inputevents_cv.amount) 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 = 269)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label...
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE diagnoses_icd ( row_id n...
how many cases of 0.83% sodium chloride prescription since 2 years ago?
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.drug = '0.83% sodium chloride' AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-2 year')
CREATE TABLE table_name_1 ( runners_up VARCHAR, result VARCHAR, champions VARCHAR )
What is the Runners-up of the game with a Result of 4 1 and Champions of Wonju Dongbu Promy?
SELECT runners_up FROM table_name_1 WHERE result = "4–1" AND champions = "wonju dongbu promy"
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 ) C...
what is death status of subject name charles nilsson?
SELECT demographic.expire_flag FROM demographic WHERE demographic.name = "Charles Nilsson"
CREATE TABLE Acceptance ( Submission_ID int, Workshop_ID int, Result text ) CREATE TABLE workshop ( Workshop_ID int, Date text, Venue text, Name text ) CREATE TABLE submission ( Submission_ID int, Scores real, Author text, College text )
Return the number of venues of each workshop in a bar chart, and could you rank y-axis in desc order?
SELECT Venue, COUNT(Venue) FROM workshop GROUP BY Venue ORDER BY COUNT(Venue) DESC
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number...
when did the first time during the first hospital visit patient 033-4763 received a bun lab test?
SELECT 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 = '033-4763' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitalad...
CREATE TABLE table_58753 ( "\"Long\" vowels" text, "17th c." text, "American" text, "British" text, "Australian" text )
What's the American pronunciation when the Australian is ?
SELECT "American" FROM table_58753 WHERE "Australian" = 'əʉ'
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, ...
since 2105, what were the top four most frequent diagnoses with which patients were diagnosed within the same month after diagnosis of human immuno virus dis?
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, 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...
CREATE TABLE table_name_97 ( class VARCHAR, wheels VARCHAR )
What is the value for the item 'Class' when the value of the item 'Wheels' is 137?
SELECT class FROM table_name_97 WHERE wheels = 137
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, h...
what age does patient 015-23047 have in the current hospital encounter?
SELECT patient.age FROM patient WHERE patient.uniquepid = '015-23047' AND patient.hospitaldischargetime IS NULL
CREATE TABLE table_204_654 ( id number, "year" number, "song" text, "u.s." number, "u.s.\nr&b" number, "u.s.\nac" number, "uk" number, "album" text )
how many songs from the album intentions charted in the uk ?
SELECT COUNT("uk") FROM table_204_654 WHERE "album" = 'intentions'
CREATE TABLE table_60904 ( "Name" text, "Mail transfer agent" text, "Mail storage type" text, "IMAP server" text, "IMAP shared" text, "Calendar format" text, "Calendar shared" text, "IM server" text, "WebDAV" text, "Web UI" text, "Contacts shared" text, "Files shared" tex...
What IMAP sharing options exist for software with a web UI?
SELECT "IMAP shared" FROM table_60904 WHERE "Web UI" = 'web ui'
CREATE TABLE table_204_959 ( id number, "club" text, "founded" number, "nickname" text, "location" text, "home ground" text, "entered competition" number, "most recent promotion" number )
which football club had its most recent promotion a year before the heidelberg football club ?
SELECT "club" FROM table_204_959 WHERE "most recent promotion" = (SELECT "most recent promotion" FROM table_204_959 WHERE "club" = 'heidelberg football club') - 1
CREATE TABLE table_59677 ( "Abbr" text, "Common English" text, "French" text, "Italian" text, "Romansh" text )
What is the italian word for Glarus?
SELECT "Italian" FROM table_59677 WHERE "Common English" = 'glarus'
CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, baseP...
Show the minimum of the rooms in different decor using a bar chart.
SELECT decor, MIN(basePrice) FROM Rooms GROUP BY decor
CREATE TABLE advisor ( s_ID varchar(5), i_ID varchar(5) ) CREATE TABLE student ( ID varchar(5), name varchar(20), dept_name varchar(20), tot_cred numeric(3,0) ) CREATE TABLE teaches ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(...
Return a histogram on what are the names and budgets of departments with budgets greater than the average?, display by the bars from low to high.
SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department) ORDER BY dept_name
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 demographic ...
how many patients whose discharge location is long term care hospital and primary disease is s/p hanging?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "LONG TERM CARE HOSPITAL" AND demographic.diagnosis = "S/P HANGING"
CREATE TABLE Transactions ( transaction_id INTEGER, investor_id INTEGER, transaction_type_code VARCHAR(10), date_of_transaction DATETIME, amount_of_transaction DECIMAL(19,4), share_count VARCHAR(40), other_details VARCHAR(255) ) CREATE TABLE Investors ( investor_id INTEGER, Investor...
Show the ids and details of the investors who have at least two transactions with type code 'SALE' Plot them as bar chart, order total number in asc order.
SELECT T1.Investor_details, T1.investor_id FROM Investors AS T1 JOIN Transactions AS T2 ON T1.investor_id = T2.investor_id WHERE T2.transaction_type_code = "SALE" ORDER BY T1.investor_id
CREATE TABLE table_name_34 ( year VARCHAR, score VARCHAR )
What year was the score 269?
SELECT COUNT(year) FROM table_name_34 WHERE score = 269
CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE days ( days_code varchar, day_name varchar ) CR...
give me all the flights from MIAMI to CHICAGO on AA
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 = 'CHICAGO' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MIAMI...
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 (...
calculate the total number of male patients who were dead/expired on discharge
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.discharge_location = "DEAD/EXPIRED"
CREATE TABLE table_53326 ( "Unit" text, "Reactor Type" text, "Net Capacity" text, "Gross Capacity" text, "Construction Start" text, "Grid Connection" text, "Commercial Operation" text, "Status" text )
What is the gross capacity where the reactor is ABWR type?
SELECT "Gross Capacity" FROM table_53326 WHERE "Reactor Type" = 'abwr'
CREATE TABLE table_21917 ( "Year" real, "Date" text, "Driver" text, "Manufacturer" text, "Laps" real, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text )
What year was the winning race time 1:55:13?
SELECT MAX("Year") FROM table_21917 WHERE "Race Time" = '1:55:13'
CREATE TABLE director ( did int, gender text, name text, nationality text, birth_city text, birth_year int ) CREATE TABLE copyright ( id int, msid int, cid int ) CREATE TABLE genre ( gid int, genre text ) CREATE TABLE writer ( wid int, gender text, name text, ...
What is the number of movies in which ' Jennifer Aniston ' acted after 2010 ?
SELECT COUNT(DISTINCT (movie.title)) FROM actor, cast, movie WHERE actor.name = 'Jennifer Aniston' AND cast.aid = actor.aid AND movie.mid = cast.msid AND movie.release_year > 2010
CREATE TABLE table_28394 ( "Institution" text, "Location" text, "Nickname" text, "Founded" real, "Type" text, "Enrollment" real, "Joined MAC" real )
What institution(s) are located in wilkes-barre, pennsylvania?
SELECT "Institution" FROM table_28394 WHERE "Location" = 'Wilkes-Barre, Pennsylvania'
CREATE TABLE tweets ( uid VARCHAR ) CREATE TABLE user_profiles ( name VARCHAR, uid VARCHAR )
Find the name of the user who tweeted more than once, and number of tweets tweeted by them.
SELECT T1.name, COUNT(*) FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid = T2.uid GROUP BY T2.uid HAVING COUNT(*) > 1
CREATE TABLE table_name_56 ( season VARCHAR, runner_up VARCHAR )
Name the season for runner up of judean rebels
SELECT season FROM table_name_56 WHERE runner_up = "judean rebels"
CREATE TABLE table_name_14 ( tournament VARCHAR, runner_s__up VARCHAR )
Howard Twitty was the runner-up of what tournament?
SELECT tournament FROM table_name_14 WHERE runner_s__up = "howard twitty"
CREATE TABLE table_298550_1 ( population__1_july_2005_est_ INTEGER, area__km²_ VARCHAR )
What is the highest value for population when area is 9104?
SELECT MAX(population__1_july_2005_est_) FROM table_298550_1 WHERE area__km²_ = 9104
CREATE TABLE table_8970 ( "City" text, "Chinese" text, "Pinyin" text, "Province" text, "Urban Population (2010)" real, "Administrative Population (2010)" real )
What is the urban population for the city of Fuzhou?
SELECT AVG("Urban Population (2010)") FROM table_8970 WHERE "City" = 'fuzhou'
CREATE TABLE table_67449 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What's the smallest week that had a result of t 17 17?
SELECT MIN("Week") FROM table_67449 WHERE "Result" = 't 17–17'
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 ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE restrict...
show me the flights from DENVER to ATLANTA on friday
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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND date_day.day_number = 25 AND date_day.month_number = 6 AND d...
CREATE TABLE table_name_28 ( revenue__ INTEGER, team VARCHAR, rank VARCHAR )
What is the average revenue for Bayern Munich with a rank greater than 4?
SELECT AVG(revenue__) AS $m_ FROM table_name_28 WHERE team = "bayern munich" AND rank > 4
CREATE TABLE table_15606 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real )
What is the qual for rank 18 in 1964?
SELECT "Qual" FROM table_15606 WHERE "Rank" = '18' AND "Year" = '1964'
CREATE TABLE table_name_61 ( high_points VARCHAR, date VARCHAR )
Who had the highest points on March 27?
SELECT high_points FROM table_name_61 WHERE date = "march 27"
CREATE TABLE table_78115 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Rams points" real, "Opponents" real, "Record" text, "Attendance" real )
What was the attendance where the record was 8-4?
SELECT MIN("Attendance") FROM table_78115 WHERE "Record" = '8-4'
CREATE TABLE table_name_39 ( in_production VARCHAR, toxic_materials VARCHAR, technology VARCHAR )
What's the production if the technology is sodium-sulfur batteries and yes to toxic materials?
SELECT in_production FROM table_name_39 WHERE toxic_materials = "yes" AND technology = "sodium-sulfur batteries"
CREATE TABLE table_2562572_2 ( population__1991_ VARCHAR, city___municipality VARCHAR )
What is the number of 1991 populations named Be ej?
SELECT COUNT(population__1991_) FROM table_2562572_2 WHERE city___municipality = "Bečej"
CREATE TABLE table_37186 ( "Ship" text, "Hull No." text, "Builder" text, "Home Port" text, "Commissioned\u2013 Decommissioned" text, "NVR page" text )
Name the hull number of Commissioned Decommissioned of 1973 1996
SELECT "Hull No." FROM table_37186 WHERE "Commissioned\u2013 Decommissioned" = '1973–1996'
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, ...
StackOverflow Count more than X Reputation.
SELECT COUNT(*) FROM Users WHERE Reputation > '##MinRep##'
CREATE TABLE table_32989 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which Away team has Away team score 5.8 (38)?
SELECT "Away team" FROM table_32989 WHERE "Away team score" = '5.8 (38)'
CREATE TABLE table_11711 ( "Airing date" text, "English Title (Chinese title)" text, "Number of episodes" real, "Theme song (T) Sub-theme song (ST)" text, "Genre" text, "Official website" text )
Which genre aired on 12 feb- 9 mar?
SELECT "Genre" FROM table_11711 WHERE "Airing date" = '12 feb- 9 mar'
CREATE TABLE table_name_21 ( year INTEGER, title VARCHAR, category VARCHAR )
What is the earliest year in which Requiem for a Dream was in the running for Best Director?
SELECT MIN(year) FROM table_name_21 WHERE title = "requiem for a dream" AND category = "best director"
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
provide the number of patients whose admission location is emergency room admit and primary disease is bradycardia
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.diagnosis = "BRADYCARDIA"
CREATE TABLE table_43282 ( "Administrative Panel" real, "Agricultural Panel" real, "Cultural and Educational Panel" real, "Industrial and Commercial Panel" real, "Labour Panel" real, "National University of Ireland" real, "University of Dublin" real, "Nominated by the Taoiseach" real, ...
What is the smallest cultural and educational panel with a nominated by the Taoiseach less than 5 and the total greater than 19?
SELECT MIN("Cultural and Educational Panel") FROM table_43282 WHERE "Nominated by the Taoiseach" < '5' AND "Total" > '19'
CREATE TABLE table_2759 ( "Pos" text, "##" real, "Name" text, "Team" text, "Lap One" text, "Lap Two" text, "Lap Three" text, "Lap Four" text, "Total Time" text, "Avg. Speed" text )
Which positions have a lap two time of 22.7290?
SELECT "Pos" FROM table_2759 WHERE "Lap Two" = '22.7290'
CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TEXT, Year INTEGER, Price INTEGER, Score INTEGER, Cases INTEGER, Drink TEXT ) CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE appellations ( No...
What are the numbers of wines for different grapes Plot them as bar chart, and list from low to high by the Grape please.
SELECT Grape, COUNT(*) FROM wine GROUP BY Grape ORDER BY Grape
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters ...
In Spring or Summer , what courses offered meet the PreMajor requirement ?
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id...
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TA...
looking for a flight to SALT LAKE CITY
SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'SALT LAKE CITY' AND flight.to_airport = airport_service.airport_code
CREATE TABLE Gradeconversion ( lettergrade VARCHAR(2), gradepoint FLOAT ) CREATE TABLE Minor_in ( StuID INTEGER, DNO INTEGER ) CREATE TABLE Faculty ( FacID INTEGER, Lname VARCHAR(15), Fname VARCHAR(15), Rank VARCHAR(15), Sex VARCHAR(1), Phone INTEGER, Room VARCHAR(5), B...
Find Days and the average of Instructor , and group by attribute Days, and visualize them by a bar chart.
SELECT Days, AVG(Instructor) FROM Course GROUP BY Days ORDER BY Credits
CREATE TABLE table_61977 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text )
Who has a total of 272?
SELECT "Player" FROM table_61977 WHERE "Total" = '272'
CREATE TABLE table_name_10 ( s_no INTEGER, opponent VARCHAR )
what is the number of people in sri lanka
SELECT AVG(s_no) FROM table_name_10 WHERE opponent = "sri lanka"
CREATE TABLE table_72220 ( "Player" text, "No.(s)" text, "Height in Ft." text, "Position" text, "Years for Rockets" text, "School/Club Team/Country" text )
What position is number 35 whose height is 6-6?
SELECT "Position" FROM table_72220 WHERE "Height in Ft." = '6-6' AND "No.(s)" = '35'
CREATE TABLE table_204_73 ( id number, "date" text, "opponent" text, "score" text, "result" text, "record" text )
how many home games did they play ?
SELECT COUNT(*) FROM table_204_73 WHERE "opponent" = 'home'
CREATE TABLE table_45462 ( "Year" real, "Seed" real, "Round" text, "Opponent" text, "Result/Score" text )
What is Result/Score, when Year is greater than 2005, and when Opponent is #8 Arkansas #1 Memphis?
SELECT "Result/Score" FROM table_45462 WHERE "Year" > '2005' AND "Opponent" = '#8 arkansas #1 memphis'
CREATE TABLE table_14070062_4 ( won VARCHAR, points_for VARCHAR )
tell how many wins there was when the score was 490
SELECT COUNT(won) FROM table_14070062_4 WHERE points_for = "490"
CREATE TABLE table_77025 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the lowest Gold, when Nation is Canada, and when Rank is greater than 4?
SELECT MIN("Gold") FROM table_77025 WHERE "Nation" = 'canada' AND "Rank" > '4'
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 demographic ...
give me the number of patients whose gender is f and age is less than 43?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.age < "43"
CREATE TABLE table_73562 ( "Order number" text, "Build date" text, "Serial numbers" text, "Country" text, "Railroad" text, "Numbers" text, "Quantity" real )
What are the numbers for the order number 713096-713119?
SELECT "Numbers" FROM table_73562 WHERE "Order number" = '713096-713119'
CREATE TABLE table_22871239_9 ( visitor VARCHAR, date VARCHAR )
Name the visitor for march 23
SELECT visitor FROM table_22871239_9 WHERE date = "March 23"
CREATE TABLE table_25745 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real, "U.S. viewers (millions)" text )
If the number in the season is 22, what is the original air date?
SELECT "Original air date" FROM table_25745 WHERE "No. in season" = '22'
CREATE TABLE table_name_7 ( opponent VARCHAR, date VARCHAR, method VARCHAR, location VARCHAR )
Which Opponent has a Method of tko, and a Location of elgin, illinois, usa on 2001-02-11?
SELECT opponent FROM table_name_7 WHERE method = "tko" AND location = "elgin, illinois, usa" AND date = "2001-02-11"
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE admissions ( row_id number, subject_id number, ...
how many intensive care unit visits were patient 26886 having until 3 years ago?
SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26886) AND DATETIME(icustays.intime) <= DATETIME(CURRENT_TIME(), '-3 year')
CREATE TABLE table_59230 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text )
What is District, when Incumbent is 'Richard Neal'?
SELECT "District" FROM table_59230 WHERE "Incumbent" = 'richard neal'
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
what is the procedure of the patient id 6983?
SELECT procedures.short_title FROM procedures WHERE procedures.subject_id = "6983"
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,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 regions ( REGION_ID decimal(5,0), ...
For those employees who did not have any job in the past, give me the comparison about the average of employee_id over the job_id , and group by attribute job_id by a bar chart.
SELECT JOB_ID, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID
CREATE TABLE table_69904 ( "Kanji" text, "Name" text, "Builder" text, "Laid down" text, "Launched" text, "Completed" text )
What is the laid down date of Kaki?
SELECT "Laid down" FROM table_69904 WHERE "Name" = 'kaki'
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 ) C...
give me the number of patients whose diagnoses icd9 code is 5770 and drug type is additive?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "5770" AND prescriptions.drug_type = "ADDITIVE"
CREATE TABLE table_name_36 ( release_date VARCHAR, title VARCHAR, developer VARCHAR, version VARCHAR, category VARCHAR )
What Release date has a Version of 1.0, a Category of utilities, a Developer of microsoft, and a Title of msn money?
SELECT release_date FROM table_name_36 WHERE version = "1.0" AND category = "utilities" AND developer = "microsoft" AND title = "msn money"
CREATE TABLE table_203_254 ( id number, "position" number, "team" text, "points" number, "played" number, "won" number, "drawn" number, "lost" number, "for" number, "against" number, "difference" number )
who finished first ?
SELECT "team" FROM table_203_254 WHERE "position" = 1
CREATE TABLE table_name_41 ( team VARCHAR, best VARCHAR )
What Team had a 1:25.602 Best?
SELECT team FROM table_name_41 WHERE best = "1:25.602"
CREATE TABLE table_78694 ( "Seat Order (Right to Left)" real, "Series 1" text, "Series 2" text, "Series 3" text, "Series 5" text, "Series 9" text, "Series 11" text )
Which Series 2 has a Series 3 of deborah meaden?
SELECT "Series 2" FROM table_78694 WHERE "Series 3" = 'deborah meaden'
CREATE TABLE table_43423 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
Which Date has a Week smaller than 11, and a Attendance of 54,094?
SELECT "Date" FROM table_43423 WHERE "Week" < '11' AND "Attendance" = '54,094'
CREATE TABLE table_203_437 ( id number, "year" number, "laureate" text, "relation" text, "category" text, "rationale" text )
how many laureates were in the field of physics ?
SELECT COUNT("laureate") FROM table_203_437 WHERE "category" = 'physics'
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, find name and revenue , and group by attribute headquarter, and visualize them by a bar chart, and could you rank in descending by the y-axis?
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T2.Revenue DESC
CREATE TABLE table_name_62 ( losses INTEGER, year VARCHAR, finish VARCHAR, percentage VARCHAR, wins VARCHAR )
What is the most losses that the Royals had when they had a percentage over 0.461, won over 86 games, and finished 2nd in 1953?
SELECT MAX(losses) FROM table_name_62 WHERE percentage > 0.461 AND wins > 86 AND finish = "2nd" AND year = 1953
CREATE TABLE table_23248940_6 ( record VARCHAR, game VARCHAR )
What is every record for game 11?
SELECT record FROM table_23248940_6 WHERE game = 11
CREATE TABLE table_name_89 ( position VARCHAR, vehicle VARCHAR, year VARCHAR )
What position did the BMW vehicle made in 2006 hold?
SELECT position FROM table_name_89 WHERE vehicle = "bmw" AND year = 2006
CREATE TABLE table_20360535_3 ( television_order VARCHAR, written_by VARCHAR )
What TV order is written by gail simone?
SELECT television_order FROM table_20360535_3 WHERE written_by = "Gail Simone"
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, ...
show me the flights from ST. PETERSBURG to TORONTO that arrive early in the morning
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 ((flight.arrival_time <= 800 AND flight.arrival_time >= 0) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TORONTO' AND flight.to_airp...
CREATE TABLE appellations ( no number, appelation text, county text, state text, area text, isava text ) CREATE TABLE wine ( no number, grape text, winery text, appelation text, state text, name text, year number, price number, score number, cases number,...
What are the names of wines, sorted in alphabetical order?
SELECT DISTINCT name FROM wine ORDER BY name
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, Creatio...
Top Flutter users in Turkey.
WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.Id =...