table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_name_8 ( region VARCHAR, format VARCHAR )
Which region had a release format of CD Maxi?
SELECT region FROM table_name_8 WHERE format = "cd maxi"
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, ...
what is the number of patients whose diagnoses icd9 code is 412 and lab test fluid is blood?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "412" AND lab.fluid = "Blood"
CREATE TABLE table_41269 ( "Rider" text, "Bike" text, "Laps" real, "Time" text, "Grid" real )
Who was the rider with more than 5 laps on a grid bigger than 29 on a Honda CBR600RR and time at +1:27.385?
SELECT "Rider" FROM table_41269 WHERE "Laps" > '5' AND "Grid" > '29' AND "Bike" = 'honda cbr600rr' AND "Time" = '+1:27.385'
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 code , and group by attribute name.
SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
getting all of the R questions.
SELECT YEAR(Posts.CreationDate) AS the_year, Posts.Id FROM Tags LEFT JOIN PostTags ON PostTags.TagId = Tags.Id LEFT JOIN Posts ON Posts.Id = PostTags.PostId LEFT JOIN PostTypes ON PostTypes.Id = Posts.PostTypeId WHERE Tags.TagName IN ('r')
CREATE TABLE table_6422 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text )
What location did game 64 take place
SELECT "Location" FROM table_6422 WHERE "Game" = '64'
CREATE TABLE table_70052 ( "County" text, "Live births 2006" real, "GFR 2006" real, "TFR 2006" real, "Whites as % of Pop." text )
What is the total number of live births in 2006 with 98.40% of the population as Whites and has more than 2 for the TFR?
SELECT SUM("Live births 2006") FROM table_70052 WHERE "Whites as % of Pop." = '98.40%' AND "TFR 2006" > '2'
CREATE TABLE table_name_23 ( format VARCHAR, catalog VARCHAR )
What is the Format of the Label with Catalog SBP 234999?
SELECT format FROM table_name_23 WHERE catalog = "sbp 234999"
CREATE TABLE table_name_82 ( scored INTEGER, points VARCHAR, played VARCHAR )
What is the lowest score of the team with 19 points and less than 18 played?
SELECT MIN(scored) FROM table_name_82 WHERE points = 19 AND played < 18
CREATE TABLE table_1615980_4 ( no VARCHAR, tournament VARCHAR )
How many tournament wins were at Volvo Masters Andalucia?
SELECT COUNT(no) FROM table_1615980_4 WHERE tournament = "Volvo Masters Andalucia"
CREATE TABLE table_54950 ( "Class" text, "Wheel arrangement" text, "Fleet number(s)" text, "Manufacturer" text, "Year made" text, "Quantity made" text, "Quantity preserved" text, "Year(s) withdrawn" text )
What is the class of the locomotive with a wheel arrangement of 4-6-0 and a quantity made of 14?
SELECT "Class" FROM table_54950 WHERE "Wheel arrangement" = '4-6-0' AND "Quantity made" = '14'
CREATE TABLE table_34837 ( "Locomotive" text, "Pre-conversion" text, "Entered service (T)" text, "Re-entered service (P)" text, "Owner" text )
What date did the T328 that entered service on 18 June 1956 re-enter service?
SELECT "Re-entered service (P)" FROM table_34837 WHERE "Entered service (T)" = '18 june 1956' AND "Pre-conversion" = 't328'
CREATE TABLE table_18047346_4 ( airport_name VARCHAR, location VARCHAR )
If the location is Chicago, Illinois, what is the airport name?
SELECT airport_name FROM table_18047346_4 WHERE location = "Chicago, Illinois"
CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE paperdataset ( paperid ...
How many papers by Luke Zettlemoyer contain the keyphrases Learning Algorithm ?
SELECT DISTINCT COUNT(DISTINCT writes.paperid) FROM author, keyphrase, paperkeyphrase, writes WHERE author.authorname = 'Luke Zettlemoyer' AND keyphrase.keyphrasename = 'Learning Algorithm' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND writes.authorid = author.authorid AND writes.paperid = paperkeyphrase.p...
CREATE TABLE table_8446 ( "Name" text, "Country" text, "Role" text, "Period" text, "Teams" text )
What is the team with the name Boumediene Abderahmane?
SELECT "Teams" FROM table_8446 WHERE "Name" = 'boumediene abderahmane'
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREA...
what is the maximum sao2 of patient 025-35599?
SELECT MAX(vitalperiodic.sao2) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-35599')) AND NOT vitalperiodic.sao2 IS NULL
CREATE TABLE table_name_7 ( roll VARCHAR, name VARCHAR )
What is the total number on roll for Shelly Park school?
SELECT COUNT(roll) FROM table_name_7 WHERE name = "shelly park school"
CREATE TABLE table_name_36 ( shuttle_run__sec_ VARCHAR, grade VARCHAR )
Tell me the shuttle run with grade c
SELECT shuttle_run__sec_ FROM table_name_36 WHERE grade = "c"
CREATE TABLE races ( raceId INTEGER, year INTEGER, round INTEGER, circuitId INTEGER, name TEXT, date TEXT, time TEXT, url TEXT ) CREATE TABLE drivers ( driverId INTEGER, driverRef TEXT, number TEXT, code TEXT, forename TEXT, surname TEXT, dob TEXT, nation...
How many races are held in each year after 2014? Show me a bar chart, rank total number in desc order please.
SELECT year, COUNT(year) FROM races AS T1 JOIN results AS T2 ON T1.raceId = T2.raceId WHERE T1.year > 2014 GROUP BY year ORDER BY COUNT(year) DESC
CREATE TABLE table_67802 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Pts." real )
What is the total number of points for entrants with a Jordan 192 chassis?
SELECT SUM("Pts.") FROM table_67802 WHERE "Chassis" = 'jordan 192'
CREATE TABLE publication ( publication_id number, book_id number, publisher text, publication_date text, price number ) CREATE TABLE book ( book_id number, title text, issues number, writer text )
Show different publishers together with the number of publications they have.
SELECT publisher, COUNT(*) FROM publication GROUP BY publisher
CREATE TABLE farm_competition ( Competition_ID int, Year int, Theme text, Host_city_ID int, Hosts text ) CREATE TABLE competition_record ( Competition_ID int, Farm_ID int, Rank int ) CREATE TABLE farm ( Farm_ID int, Year int, Total_Horses real, Working_Horses real, ...
Show the average of population from each status, and rank by the Y in descending.
SELECT Status, AVG(Population) FROM city GROUP BY Status ORDER BY AVG(Population) DESC
CREATE TABLE table_203_16 ( id number, "name" text, "took office" text, "left office" text, "party" text, "district residence" text, "notes" text )
how many terms did a republican serve before watkins term ?
SELECT COUNT(*) FROM table_203_16 WHERE "party" = 'republican' AND id < (SELECT id FROM table_203_16 WHERE "name" = 'wes watkins')
CREATE TABLE table_name_51 ( result VARCHAR, awards VARCHAR, category VARCHAR, year VARCHAR )
What was the result in the year greaters than 2008 with an award of Jahat and had a category of Stacy?
SELECT result FROM table_name_51 WHERE category = "stacy" AND year > 2008 AND awards = "jahat"
CREATE TABLE table_58408 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Which venue has an Away team score of 17.14 (116)?
SELECT "Venue" FROM table_58408 WHERE "Away team score" = '17.14 (116)'
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_40...
A bar chart shows the distribution of Nationality and the average of ID , and group by attribute Nationality, and could you sort from low to high by the X-axis?
SELECT Nationality, AVG(ID) FROM swimmer GROUP BY Nationality ORDER BY Nationality
CREATE TABLE table_24665 ( "Team" text, "Truck(s)" text, "#" real, "Driver(s)" text, "Primary Sponsor(s)" text, "Listed Owner(s)" text, "Crew Chief" text )
Name the trucks for scott neal
SELECT "Truck(s)" FROM table_24665 WHERE "Crew Chief" = 'Scott Neal'
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
what was patient 030-3247's first output time of the urine catheter until 04/26/2104?
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-3247')) AND intakeoutput.cellpath LIKE '%output%'...
CREATE TABLE table_name_16 ( lost INTEGER, points INTEGER )
What is the highest loss with points less than 7?
SELECT MAX(lost) FROM table_name_16 WHERE points < 7
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 whose lab test category is chemistry?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab."CATEGORY" = "Chemistry"
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CRE...
when was the last time patient 027-140654 got a lab test in this month for chloride?
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 = '027-140654')) AND lab.labname = 'chloride' AND DATETIME(lab.labresulttime, 'start o...
CREATE TABLE table_203_354 ( id number, "party" text, "candidate(s)" text, "votes" number, "percentage" number )
which candidates had the most votes listed ?
SELECT "candidate(s)" FROM table_203_354 ORDER BY "votes" DESC LIMIT 1
CREATE TABLE station_company ( Station_ID int, Company_ID int, Rank_of_the_Year int ) CREATE TABLE company ( Company_ID int, Rank int, Company text, Headquarters text, Main_Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value real ) ...
How many companies without a gas station in each main industry? Draw a bar chart, and display by the total number in asc.
SELECT Main_Industry, COUNT(Main_Industry) FROM company WHERE NOT Company_ID IN (SELECT Company_ID FROM station_company) GROUP BY Main_Industry ORDER BY COUNT(Main_Industry)
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...
provide the number of patients whose lab test category is hematology?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab."CATEGORY" = "Hematology"
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, ...
count the number of patients who were diagnosed with valvular insufficiency - mitral valve and that did not return to the hospital within the same month during this year.
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'valvular insufficiency - mitral valve' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATE...
CREATE TABLE table_name_92 ( points VARCHAR, chassis VARCHAR )
How many points for the simtek s951 chassis?
SELECT COUNT(points) FROM table_name_92 WHERE chassis = "simtek s951"
CREATE TABLE table_25703_2 ( birth_2012 INTEGER, january_december_2012 VARCHAR )
What were the total number of 2012 births for the January December 2012 Tver Oblast region?
SELECT MIN(birth_2012) FROM table_25703_2 WHERE january_december_2012 = "Tver Oblast"
CREATE TABLE table_49267 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
what is the home team when the away team is frickley colliery?
SELECT "Home team" FROM table_49267 WHERE "Away team" = 'frickley colliery'
CREATE TABLE table_8899 ( "Consonant final stem" text, "Example: did-" text, "Vowel final stem" text, "Example: ch'aghara-" text, "Noun example: datv-" text )
What example for did- is shown for a Consonant final stem of - ?
SELECT "Example: did-" FROM table_8899 WHERE "Consonant final stem" = '-ø'
CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Subjects ( subject_id INTEGER, subject_name VARCHAR(120) ) CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATET...
Find the dates of the tests taken with result 'Pass', and count them by a line chart, and order by the x-axis from low to high.
SELECT date_test_taken, COUNT(date_test_taken) FROM Student_Tests_Taken WHERE test_result = "Pass" ORDER BY date_test_taken
CREATE TABLE table_30925 ( "Stage" real, "Winner" text, "General classification" text, "Mountains Classification" text, "Points classification" text, "Sprints Classification" text, "Team Classification" text )
Name the team classification for thomas de gendt
SELECT "Team Classification" FROM table_30925 WHERE "Winner" = 'Thomas De Gendt'
CREATE TABLE table_203_646 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
following the world championships in seville , what was the next venue for the world championships ?
SELECT "venue" FROM table_203_646 WHERE "competition" = 'world championships' AND "year" > (SELECT "year" FROM table_203_646 WHERE "competition" = 'world championships' AND "venue" = 'seville') ORDER BY "year" LIMIT 1
CREATE TABLE table_37730 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
What was the score of the game that led to a 79-77 record?
SELECT "Score" FROM table_37730 WHERE "Record" = '79-77'
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE d_labitems ( row_id number, itemid number, label te...
how much was the total amount patient 30460 had received?
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 = 30460))
CREATE TABLE table_7209 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text )
What is Aberdeen team's date of vacancy?
SELECT "Date of vacancy" FROM table_7209 WHERE "Team" = 'aberdeen'
CREATE TABLE table_name_43 ( points VARCHAR, club VARCHAR )
How many points for the skater from club btsc?
SELECT COUNT(points) FROM table_name_43 WHERE club = "btsc"
CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS numeric(5,0) ) CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) ) CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) )
Find the name and training hours of players whose hours are below 1500. Plot them as pie chart.
SELECT pName, HS FROM Player WHERE HS < 1500
CREATE TABLE table_name_12 ( name VARCHAR, displacement VARCHAR )
what is the name when the displacement is 8,305 t?
SELECT name FROM table_name_12 WHERE displacement = "8,305 t"
CREATE TABLE table_203_374 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number )
how many gold medals does poland have ?
SELECT "gold" FROM table_203_374 WHERE "nation" = 'poland'
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, Cr...
Top 100 users from Hyderbad India.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE Location LIKE '%Hyderabad%' ORDER BY Reputation DESC LIMIT 1000
CREATE TABLE table_204_155 ( id number, "rank" number, "heat" number, "athlete" text, "nationality" text, "time" number, "notes" text )
who is the only cyclist from brazil ?
SELECT "athlete" FROM table_204_155 WHERE "nationality" = 'brazil'
CREATE TABLE table_68791 ( "Institution" text, "Team" text, "City" text, "Province" text, "First season" real, "Head coach" text, "Enrollment" real, "Football stadium" text, "Capacity" real )
What's the name of the city whose first season was in 1996?
SELECT "City" FROM table_68791 WHERE "First season" = '1996'
CREATE TABLE table_10472 ( "Date" text, "Tournament" text, "Location" text, "Purse( $ )" real, "Winner" text, "Score" text, "1st Prize( $ )" real )
What is average prize for first place with a $500,000 purse in the Franklin Quest Championship?
SELECT AVG("1st Prize( $ )") FROM table_10472 WHERE "Purse( $ )" = '500,000' AND "Tournament" = 'franklin quest championship'
CREATE TABLE table_name_84 ( team_1 VARCHAR, team_2 VARCHAR )
What is Team 1, when Team 2 is Saint Louis?
SELECT team_1 FROM table_name_84 WHERE team_2 = "saint louis"
CREATE TABLE table_51933 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
what is the grid when the laps is more than 0, the time/retired is engine and the driver is pedro de la rosa?
SELECT "Grid" FROM table_51933 WHERE "Laps" > '0' AND "Time/Retired" = 'engine' AND "Driver" = 'pedro de la rosa'
CREATE TABLE table_204_416 ( id number, "chip" text, "flash size" text, "eeprom" number, "sram" number, "frequency\n[mhz]" number, "package" text )
what microcontroller has the same flash size as at90s4414
SELECT "chip" FROM table_204_416 WHERE "chip" <> 'at90s4414' AND "flash size" = (SELECT "flash size" FROM table_204_416 WHERE "chip" = 'at90s4414')
CREATE TABLE table_name_1 ( party VARCHAR, municipality VARCHAR )
Municipality of tampere involves which party?
SELECT party FROM table_name_1 WHERE municipality = "tampere"
CREATE TABLE table_204_179 ( id number, "season" number, "division" number, "tms." number, "pos." number, "fa cup" text, "afc cl" number )
which year was the most pos .
SELECT "season" FROM table_204_179 WHERE "pos." = (SELECT MAX("pos.") FROM table_204_179)
CREATE TABLE table_16119 ( "Year" real, "Division" real, "League" text, "Regular Season" text, "Playoffs" text, "Open Cup" text )
what is the total number of playoffs where regular season is 6th, southwest
SELECT COUNT("Playoffs") FROM table_16119 WHERE "Regular Season" = '6th, Southwest'
CREATE TABLE Timed_Status_of_Things ( thing_id INTEGER, Date_and_Date DATETIME, Status_of_Thing_Code CHAR(15) ) CREATE TABLE Customer_Event_Notes ( Customer_Event_Note_ID INTEGER, Customer_Event_ID INTEGER, service_type_code CHAR(15), resident_id INTEGER, property_id INTEGER, date_m...
Show the total number of each type of each thing using a pie chart.
SELECT Type_of_Thing_Code, COUNT(Type_of_Thing_Code) FROM Things AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id GROUP BY Type_of_Thing_Code
CREATE TABLE table_name_61 ( gold VARCHAR, silver VARCHAR, nation VARCHAR )
What is the total number of gold medals of slovakia, which has less than 1 silver medal?
SELECT COUNT(gold) FROM table_name_61 WHERE silver < 1 AND nation = "slovakia"
CREATE TABLE table_2832 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
Who is the high rebounds for game 64?
SELECT "High rebounds" FROM table_2832 WHERE "Game" = '64'
CREATE TABLE table_name_96 ( date VARCHAR, film VARCHAR )
When did the film 'Monsters' come out?
SELECT date FROM table_name_96 WHERE film = "monsters"
CREATE TABLE table_13693 ( "Lane" real, "Name" text, "Country" text, "Reaction Time" real, "Time" real )
How many Times have a Reaction Time larger than 0.17500000000000002, and a Lane of 3?
SELECT COUNT("Time") FROM table_13693 WHERE "Reaction Time" > '0.17500000000000002' AND "Lane" = '3'
CREATE TABLE status ( station_id INTEGER, bikes_available INTEGER, docks_available INTEGER, time TEXT ) CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station...
Bar chart x axis date y axis the number of date, could you display by the total number from high to low?
SELECT date, COUNT(date) FROM weather ORDER BY COUNT(date) DESC
CREATE TABLE table_62382 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What week had an attendance more than 63,268 and Kansas City Chiefs as the opponent?
SELECT COUNT("Week") FROM table_62382 WHERE "Attendance" > '63,268' AND "Opponent" = 'kansas city chiefs'
CREATE TABLE table_46523 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
Which Opponent has a Location of gold coast , australia, and a Method of submission (punches)?
SELECT "Opponent" FROM table_46523 WHERE "Location" = 'gold coast , australia' AND "Method" = 'submission (punches)'
CREATE TABLE table_name_22 ( Id VARCHAR )
What is the 2002 result where 2011 and 2000 are 1R?
SELECT 2002 FROM table_name_22 WHERE 2011 = "1r" AND 2000 = "1r"
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, Dele...
gg test of poorly answer questions for apps.
SELECT * FROM Posts WHERE AnswerCount > 5 AND CommentCount > 5 AND ViewCount > 50 AND CommunityOwnedDate IS NULL AND ClosedDate IS NULL AND AcceptedAnswerId IS NULL AND Tags LIKE '%##Tag1##%' AND CreationDate > '2015-12-21'
CREATE TABLE table_80231 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real )
With a Rank of 19, and a Start of 14, what was the finish?
SELECT "Finish" FROM table_80231 WHERE "Rank" = '19' AND "Start" = '14'
CREATE TABLE table_6326 ( "Year" real, "Chassis" text, "Engine" text, "Start" text, "Finish" text, "Team" text )
What is the Engine with 3 as the start in the year of 2007?
SELECT "Engine" FROM table_6326 WHERE "Start" = '3' AND "Year" = '2007'
CREATE TABLE table_name_76 ( weblink VARCHAR, college_or_campus_name VARCHAR )
What Weblink has a College or Campus Name of anna university college of engineering tindivanam?
SELECT weblink FROM table_name_76 WHERE college_or_campus_name = "anna university college of engineering tindivanam"
CREATE TABLE table_13886 ( "Name" text, "Position" text, "Date of Appointment" text, "Date of Birth" text, "Date of Retirement" text )
What is Hon. Vicente Q. Roxas appointment date?
SELECT "Date of Appointment" FROM table_13886 WHERE "Name" = 'hon. vicente q. roxas'
CREATE TABLE table_name_96 ( delegate VARCHAR, placement_in_miss_universe VARCHAR, hometown VARCHAR )
Which Delegate has a Placement in Miss Universe of fourth runner-up, and a Hometown of makati , rizal?
SELECT delegate FROM table_name_96 WHERE placement_in_miss_universe = "fourth runner-up" AND hometown = "makati , rizal"
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 departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE...
For those employees who did not have any job in the past, visualize a bar chart about the distribution of hire_date and the sum of salary bin hire_date by weekday, and I want to sort y axis in descending order.
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY SUM(SALARY) DESC
CREATE TABLE table_name_40 ( attendance VARCHAR, date VARCHAR )
Where Date is october 14 what is the attendance?
SELECT attendance FROM table_name_40 WHERE date = "october 14"
CREATE TABLE table_27987767_2 ( points_margin VARCHAR, winners VARCHAR )
how many total number of points margin when brive is the winners
SELECT COUNT(points_margin) FROM table_27987767_2 WHERE winners = "Brive"
CREATE TABLE table_31289 ( "Season" text, "Level" text, "Division" text, "Section" text, "Position" text, "Movements" text )
what is the name of the level for the 7th position
SELECT "Level" FROM table_31289 WHERE "Position" = '7th'
CREATE TABLE table_name_25 ( score VARCHAR, opponent VARCHAR, game VARCHAR, february VARCHAR )
What is Score, when Game is less than 61, when February is less than 11, and when Opponent is '@ Buffalo Sabres'?
SELECT score FROM table_name_25 WHERE game < 61 AND february < 11 AND opponent = "@ buffalo sabres"
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id ...
Will Dr. Emily Zinnemann be teaching any classes next semester ?
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Emily Zinnemann%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.o...
CREATE TABLE table_3148 ( "Rank" real, "English title" text, "Chinese title" text, "Average" real, "Peak" real, "Premiere" real, "Finale" real, "HK viewers" text )
What is the largest average for the episode with 1.97 million Hong Kong viewers?
SELECT MAX("Average") FROM table_3148 WHERE "HK viewers" = '1.97 million'
CREATE TABLE table_29504351_2 ( best_finish VARCHAR, earnings__$_ VARCHAR )
What is the best finish for the player whose earnings was $421050?
SELECT best_finish FROM table_29504351_2 WHERE earnings__$_ = 421050
CREATE TABLE table_203_452 ( id number, "pos" number, "no" number, "driver" text, "team" text, "laps" number, "time/retired" text, "grid" number, "points" number )
which driver scored the least amount of points ?
SELECT "driver" FROM table_203_452 ORDER BY "points" LIMIT 1
CREATE TABLE Apartment_Buildings ( building_id INTEGER, building_short_name CHAR(15), building_full_name VARCHAR(80), building_description VARCHAR(255), building_address VARCHAR(255), building_manager VARCHAR(50), building_phone VARCHAR(80) ) CREATE TABLE View_Unit_Status ( apt_id INTEG...
What are dates of birth of all the guests whose gender is 'Male', and count them by a bar chart, sort in ascending by the total number please.
SELECT date_of_birth, COUNT(date_of_birth) FROM Guests WHERE gender_code = "Male" ORDER BY COUNT(date_of_birth)
CREATE TABLE table_name_12 ( team VARCHAR, sponsor VARCHAR )
what is the sponsor of motorola
SELECT team FROM table_name_12 WHERE sponsor = "motorola"
CREATE TABLE table_name_67 ( opponent VARCHAR, date VARCHAR, type VARCHAR, round VARCHAR )
Which Opponent has a Type of tko, and a Round of 2 (6) on 2006-09-20?
SELECT opponent FROM table_name_67 WHERE type = "tko" AND round = "2 (6)" AND date = "2006-09-20"
CREATE TABLE table_name_94 ( opponent VARCHAR, january VARCHAR, score VARCHAR )
What is Opponent, when January is greater than 19, and when Score is '7 - 2'?
SELECT opponent FROM table_name_94 WHERE january > 19 AND score = "7 - 2"
CREATE TABLE table_name_35 ( top_10 VARCHAR, wins VARCHAR, poles VARCHAR )
How many Top 10s have Wins larger than 0, and Poles larger than 0?
SELECT COUNT(top_10) FROM table_name_35 WHERE wins > 0 AND poles > 0
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as ...
In next term is 463 available ?
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 463 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
CREATE TABLE schedule ( Cinema_ID int, Film_ID int, Date text, Show_times_per_day int, Price float ) CREATE TABLE cinema ( Cinema_ID int, Name text, Openning_year int, Capacity int, Location text ) CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_seaso...
For each record in schedule, show average of the price for each day in a bar chart, and show in desc by the X.
SELECT Date, AVG(Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Date ORDER BY Date DESC
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) 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, lan...
list the time of the hospital admission of patient 30267 in this year.
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 30267 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year')
CREATE TABLE table_21322 ( "Rank" real, "1-year peak" text, "5-year peak" text, "10-year peak" text, "15-year peak" text, "20-year peak" text )
What is the highest rank when Garry Kasparov, 2879 is the 1-year peak?
SELECT MAX("Rank") FROM table_21322 WHERE "1-year peak" = 'Garry Kasparov, 2879'
CREATE TABLE table_51446 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real )
Which top ten, having less than 12 cuts less than 2 top five, and events smaller than 14, is the highest?
SELECT MAX("Top-10") FROM table_51446 WHERE "Cuts made" < '12' AND "Top-5" < '2' AND "Events" < '14'
CREATE TABLE ref_characteristic_types ( characteristic_type_code text, characteristic_type_description text ) CREATE TABLE ref_product_categories ( product_category_code text, product_category_description text, unit_of_measure text ) CREATE TABLE characteristics ( characteristic_id number, ...
Count the number of characteristics of the 'flax' product.
SELECT COUNT(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id = t2.product_id JOIN characteristics AS t3 ON t2.characteristic_id = t3.characteristic_id WHERE t1.product_name = "flax"
CREATE TABLE table_14273 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
Name the highest Bronze which has a Gold larger than 2 and a Rank of total?
SELECT MAX("Bronze") FROM table_14273 WHERE "Gold" > '2' AND "Rank" = 'total'
CREATE TABLE table_name_58 ( crowd VARCHAR, away_team VARCHAR )
How many attended the game with north melbourne as the away side?
SELECT crowd FROM table_name_58 WHERE away_team = "melbourne"
CREATE TABLE table_76017 ( "Driver" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real, "Points" real )
What grid has 78 laps, and Ronnie Bremer as driver?
SELECT "Grid" FROM table_76017 WHERE "Laps" = '78' AND "Driver" = 'ronnie bremer'
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
Show me about the correlation between School_ID and ACC_Percent , and group by attribute ACC_Home in a scatter chart.
SELECT School_ID, ACC_Percent FROM basketball_match GROUP BY ACC_Home
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, ...
Answers: Zero-score accepted - Tag parameter.
SELECT a.Id AS "post_link", q.Tags FROM Posts AS q, Posts AS a WHERE a.Score = 0 AND q.AcceptedAnswerId = a.Id AND q.Tags LIKE LOWER('%##Tag##%') ORDER BY q.Id LIMIT 100
CREATE TABLE table_name_26 ( winner VARCHAR, runner_up VARCHAR )
What team was the winner when the runner-up shows both teams awarded championship after a draw.?
SELECT winner FROM table_name_26 WHERE runner_up = "both teams awarded championship after a draw."