instruction
stringlengths
5
766
input
stringlengths
38
5.51k
response
stringlengths
4
3.91k
which film won the most awards ?
CREATE TABLE table_203_393 ( id number, "year" number, "film" text, "director" text, "cast" text, "details" text )
SELECT "film" FROM table_203_393 ORDER BY "details" DESC LIMIT 1
How many weeks have a Date of december 4, 1976, and an Attendance larger than 57,366?
CREATE TABLE table_name_30 ( week INTEGER, date VARCHAR, attendance VARCHAR )
SELECT SUM(week) FROM table_name_30 WHERE date = "december 4, 1976" AND attendance > 57 OFFSET 366
Which team has an overall playoff of (0-0), a home record of (0-1) and played the Green Bay Blizzard team?
CREATE TABLE table_14558 ( "Opponent" text, "OVERALL" text, "HOME" text, "AWAY" text, "PLYFF" text )
SELECT "OVERALL" FROM table_14558 WHERE "PLYFF" = '(0-0)' AND "HOME" = '(0-1)' AND "Opponent" = 'green bay blizzard'
What is the sum of the number of clubs in seasons before 1992 with more than 3 total wins?
CREATE TABLE table_12752 ( "Season" real, "Winners" text, "Total wins" real, "Runners-up" text, "Third-place" text, "Number of clubs" real )
SELECT SUM("Number of clubs") FROM table_12752 WHERE "Season" < '1992' AND "Total wins" > '3'
What is the highest league up with less than 3 championships, a total less than 2, and a FA cup larger than 0?
CREATE TABLE table_62186 ( "Name" text, "Championship" real, "League Cup" real, "FA Cup" real, "Total" real )
SELECT MAX("League Cup") FROM table_62186 WHERE "Championship" < '3' AND "Total" < '2' AND "FA Cup" > '0'
What Event's Time is 4:01.00?
CREATE TABLE table_67971 ( "Event" text, "Time" text, "Nationality" text, "Date" text, "Meet" text, "Location" text )
SELECT "Event" FROM table_67971 WHERE "Time" = '4:01.00'
In Ghent in 2011, what was the rank-qualifying value when the score-qualifying value was 14.850
CREATE TABLE table_26681728_1 ( rank_qualifying INTEGER, score_qualifying VARCHAR, location VARCHAR, year VARCHAR )
SELECT MAX(rank_qualifying) FROM table_26681728_1 WHERE location = "Ghent" AND year = 2011 AND score_qualifying = "14.850"
How much money has a to par of E?
CREATE TABLE table_name_14 ( money___ VARCHAR, to_par VARCHAR )
SELECT COUNT(money___) AS $__ FROM table_name_14 WHERE to_par = "e"
What Time has a Show Name of mornings with neil mitchell?
CREATE TABLE table_name_15 ( time VARCHAR, show_name VARCHAR )
SELECT time FROM table_name_15 WHERE show_name = "mornings with neil mitchell"
What Country's Content is TV Locale?
CREATE TABLE table_40678 ( "Television service" text, "Country" text, "Language" text, "Content" text, "HDTV" text, "Package/Option" text )
SELECT "Country" FROM table_40678 WHERE "Content" = 'tv locale'
Who sang the song composed by Mariah Carey and Walter Afanasieff?
CREATE TABLE table_42631 ( "Rank" real, "Song title" text, "Composer(s)" text, "Performer(s)" text, "Year" real )
SELECT "Performer(s)" FROM table_42631 WHERE "Composer(s)" = 'mariah carey and walter afanasieff'
What is the Term Start date of the Progressive Party Prime Minister?
CREATE TABLE table_47383 ( "Name" text, "Born-Died" text, "Term start" text, "Term end" text, "Political Party" text )
SELECT "Term start" FROM table_47383 WHERE "Political Party" = 'progressive party'
What manufacturer has a year made of 1883?
CREATE TABLE table_13544 ( "Class" text, "Wheel arrangement" text, "Fleet number(s)" text, "Manufacturer" text, "Year made" text, "Quantity made" text, "Quantity preserved" text )
SELECT "Manufacturer" FROM table_13544 WHERE "Year made" = '1883'
Display a pie chart for how many hosts does each nationality have? List the nationality and the count.
CREATE TABLE party_host ( Party_ID int, Host_ID int, Is_Main_in_Charge bool ) CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_hosts int )
SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality
What is the number of production codes for episode #73?
CREATE TABLE table_3517 ( "Episode #" text, "Season Episode #" text, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Prod. code" text )
SELECT COUNT("Prod. code") FROM table_3517 WHERE "Episode #" = '73'
Which engine has a chassis of dallara, is ranked 6th, and has 384 points?
CREATE TABLE table_42451 ( "Year" real, "Team" text, "Chassis" text, "Engine" text, "Rank" text, "Points" real )
SELECT "Engine" FROM table_42451 WHERE "Chassis" = 'dallara' AND "Rank" = '6th' AND "Points" = '384'
What is the content of la7 television service?
CREATE TABLE table_15887683_1 ( content VARCHAR, television_service VARCHAR )
SELECT content FROM table_15887683_1 WHERE television_service = "LA7"
Name the city for los angeles stadium
CREATE TABLE table_30442 ( "Stadium" text, "Capacity" real, "City" text, "Country" text, "Tenant" text, "Opening" text )
SELECT "City" FROM table_30442 WHERE "Stadium" = 'Los Angeles Stadium'
For those records from the products and each product's manufacturer, show me about the distribution of name and code , and group by attribute headquarter in a bar chart, could you show bar from high to low order please?
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name DESC
How many league goals did Dunne have in the season where he had 2 league apps?
CREATE TABLE table_31357 ( "Season" text, "Division" text, "League Apps" real, "League Goals" real, "FA Cup Apps" real, "FA Cup Goals" real, "Other Apps" real, "Other Goals" real, "Total Apps" real, "Total Goals" real )
SELECT "League Goals" FROM table_31357 WHERE "League Apps" = '2'
Can you tell me the Season that has the Score of 1-0?
CREATE TABLE table_name_34 ( season VARCHAR, score VARCHAR )
SELECT season FROM table_name_34 WHERE score = "1-0"
How many joined when the enrollment was 1150 in Sioux City, Iowa?
CREATE TABLE table_28499 ( "Institution" text, "Location" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" real, "Nickname" text )
SELECT "Joined" FROM table_28499 WHERE "Enrollment" = '1150' AND "Location" = 'Sioux City, Iowa'
What is the lowest interview of Texas, with an average larger than 9.531?
CREATE TABLE table_name_86 ( interview INTEGER, state VARCHAR, average VARCHAR )
SELECT MIN(interview) FROM table_name_86 WHERE state = "texas" AND average > 9.531
For part 2 *lauk, what is listed for part 4?
CREATE TABLE table_1745843_2 ( part_4 VARCHAR, part_2 VARCHAR )
SELECT part_4 FROM table_1745843_2 WHERE part_2 = "*lauk"
What season did School/Club Team, East have an Acquisition via of trade?
CREATE TABLE table_43173 ( "Name" text, "Position" text, "Number" text, "School/Club Team" text, "Season" text, "Acquisition via" text )
SELECT "Season" FROM table_43173 WHERE "Acquisition via" = 'trade' AND "School/Club Team" = 'east'
bernadette 's soms and which other song earned the same number of points ?
CREATE TABLE table_204_915 ( id number, "draw" number, "artist" text, "song" text, "points" number, "place" text )
SELECT "song" FROM table_204_915 WHERE "song" <> '"soms"' AND "points" = (SELECT "points" FROM table_204_915 WHERE "song" = '"soms"')
Which IHSAA class has a mascot of the Raiders?
CREATE TABLE table_64419 ( "School" text, "Location" text, "Mascot" text, "Size" real, "IHSAA Class" text, "IHSAA Football Class" text, "County" text )
SELECT "IHSAA Class" FROM table_64419 WHERE "Mascot" = 'raiders'
what is the most bronze when the total is 9?
CREATE TABLE table_name_94 ( bronze INTEGER, total VARCHAR )
SELECT MAX(bronze) FROM table_name_94 WHERE total = 9
What campus is in Brgy. Alangilan, Batangas City?
CREATE TABLE table_name_59 ( campus VARCHAR, location VARCHAR )
SELECT campus FROM table_name_59 WHERE location = "brgy. alangilan, batangas city"
what is the result for October 14, 1956?
CREATE TABLE table_14984039_1 ( result VARCHAR, date VARCHAR )
SELECT result FROM table_14984039_1 WHERE date = "October 14, 1956"
What is the point average for the game that has FGM-FGA of 11-28 and a number smaller than 7?
CREATE TABLE table_name_48 ( points INTEGER, fgm___fga VARCHAR, number VARCHAR )
SELECT AVG(points) FROM table_name_48 WHERE fgm___fga = "11-28" AND number < 7
What is the lowest Took Office, when Senator is Eddie Bernice Johnson, and when District is greater than 23?
CREATE TABLE table_47119 ( "Senator" text, "Party" text, "District" real, "Home Town" text, "Took Office" real )
SELECT MIN("Took Office") FROM table_47119 WHERE "Senator" = 'eddie bernice johnson' AND "District" > '23'
What was the region for the 38xa-5 catalog?
CREATE TABLE table_name_6 ( region VARCHAR, catalog VARCHAR )
SELECT region FROM table_name_6 WHERE catalog = "38xa-5"
How many carries for the player with under 6 yards and an average of over 5?
CREATE TABLE table_name_48 ( car VARCHAR, yards VARCHAR, avg VARCHAR )
SELECT COUNT(car) FROM table_name_48 WHERE yards < 6 AND avg > 5
What was the record when the score was 11-10?
CREATE TABLE table_name_85 ( record VARCHAR, score VARCHAR )
SELECT record FROM table_name_85 WHERE score = "11-10"
What is the name of the player when the category is listed as field goal percentage?
CREATE TABLE table_28628309_8 ( player VARCHAR, category VARCHAR )
SELECT player FROM table_28628309_8 WHERE category = "Field goal percentage"
What is the Points for number of the team with a 10 Tries against number?
CREATE TABLE table_44340 ( "Team" text, "Tries for" text, "Tries against" text, "Try diff" text, "Points for" text, "Points against" text, "Points diff" text )
SELECT "Points for" FROM table_44340 WHERE "Tries against" = '10'
What is the Game site week 1?
CREATE TABLE table_77441 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game site" text )
SELECT "Game site" FROM table_77441 WHERE "Week" = '1'
what was the venue when he placed first ?
CREATE TABLE table_204_706 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
SELECT "venue" FROM table_204_706 WHERE "position" = 1
When was the successor who got his seat because of 'until august 2, 1813' seated?
CREATE TABLE table_25067 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text )
SELECT "Date successor seated" FROM table_25067 WHERE "Reason for change" = 'Until August 2, 1813'
Which Class Pos has a Year larger than 1997, a Team of corvette racing, a Class of gt1, and 327 laps?
CREATE TABLE table_name_25 ( class VARCHAR, laps VARCHAR, year VARCHAR, team VARCHAR )
SELECT class AS pos FROM table_name_25 WHERE year > 1997 AND team = "corvette racing" AND class = "gt1" AND laps = 327
What is the location where shocker was the winner?
CREATE TABLE table_name_14 ( location VARCHAR, winner VARCHAR )
SELECT location FROM table_name_14 WHERE winner = "shocker"
What is the number of Ashmolean with 14s Harrison, and image less than 542?
CREATE TABLE table_67358 ( "Image" real, "Smith" text, "Ashmolean" real, "Foster" real, "Hahland" real, "Dinsmoor" text, "Hofkes-Brukker" text, "Harrison" text, "Cooper" text, "BM/Corbett" text )
SELECT COUNT("Ashmolean") FROM table_67358 WHERE "Harrison" = '14s' AND "Image" < '542'
What is the lowest overall amount of w's?
CREATE TABLE table_31198 ( "Skip (Club)" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real )
SELECT MIN("W") FROM table_31198
How many silver for rank 22 when gold count was more than 0 and Bronze count was less than 5?
CREATE TABLE table_64196 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT SUM("Silver") FROM table_64196 WHERE "Bronze" < '5' AND "Gold" > '0' AND "Rank" = '22'
Which lyricist has a song with a length of 6:14?
CREATE TABLE table_109 ( "Track #" real, "Song" text, "Singers" text, "Picturization" text, "Length" text, "Lyricist" text )
SELECT "Lyricist" FROM table_109 WHERE "Length" = '6:14'
Which week 2 had a week 3 of Cidney Carson?
CREATE TABLE table_name_74 ( week_2 VARCHAR, week_3 VARCHAR )
SELECT week_2 FROM table_name_74 WHERE week_3 = "cidney carson"
Which venue had an against score smaller than 18 when the opposing team was North Auckland?
CREATE TABLE table_77376 ( "Opposing Team" text, "Against" real, "Date" text, "Venue" text, "Status" text )
SELECT "Venue" FROM table_77376 WHERE "Against" < '18' AND "Opposing Team" = 'north auckland'
What age group has a time of 6:37.73 at the 200m breaststroke?
CREATE TABLE table_32538 ( "Pool" text, "Age Group" text, "Time" text, "Event" text, "Date" text )
SELECT "Age Group" FROM table_32538 WHERE "Event" = '200m breaststroke' AND "Time" = '6:37.73'
List the names and phone numbers of all the distinct suppliers who supply red jeans.
CREATE TABLE suppliers ( supplier_name VARCHAR, supplier_phone VARCHAR, supplier_id VARCHAR ) CREATE TABLE product_suppliers ( supplier_id VARCHAR, product_id VARCHAR ) CREATE TABLE products ( product_id VARCHAR, product_name VARCHAR )
SELECT DISTINCT T1.supplier_name, T1.supplier_phone FROM suppliers AS T1 JOIN product_suppliers AS T2 ON T1.supplier_id = T2.supplier_id JOIN products AS T3 ON T2.product_id = T3.product_id WHERE T3.product_name = "red jeans"
What Club team with a Round larger than 5 have a defense position?
CREATE TABLE table_name_9 ( club_team VARCHAR, round VARCHAR, position VARCHAR )
SELECT club_team FROM table_name_9 WHERE round > 5 AND position = "defense"
What is the largest amount of assists that Nicole Levandusky made?
CREATE TABLE table_23192 ( "Player" text, "Games Played" real, "Rebounds" real, "Assists" real, "Steals" real, "Blocks" real, "Points" real )
SELECT MAX("Assists") FROM table_23192 WHERE "Player" = 'Nicole Levandusky'
List the names of buildings in descending order of building height.
CREATE TABLE buildings ( name VARCHAR, Height VARCHAR )
SELECT name FROM buildings ORDER BY Height DESC
What type of car has the model 6cm?
CREATE TABLE table_name_11 ( type VARCHAR, model VARCHAR )
SELECT type FROM table_name_11 WHERE model = "6cm"
Show the proportion of the number of ranks for each rank.
CREATE TABLE Faculty_Participates_in ( FacID INTEGER, actid INTEGER ) CREATE TABLE Faculty ( FacID INTEGER, Lname VARCHAR(15), Fname VARCHAR(15), Rank VARCHAR(15), Sex VARCHAR(1), Phone INTEGER, Room VARCHAR(5), Building VARCHAR(13) ) CREATE TABLE Activity ( actid INTEGER, activity_name varchar(25) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER )
SELECT Rank, COUNT(Rank) FROM Faculty GROUP BY Rank
What is the least amount of wickets?
CREATE TABLE table_27922491_8 ( wickets INTEGER )
SELECT MIN(wickets) FROM table_27922491_8
What is the position of tickets sold/available when the sellout is 82%?
CREATE TABLE table_20680 ( "Dates (MDY)" text, "Position" real, "Gross sales" text, "Tickets sold / available" text, "Sellout (%)" text )
SELECT COUNT("Tickets sold / available") FROM table_20680 WHERE "Sellout (%)" = '82%'
how many total athletes have track records ?
CREATE TABLE table_203_829 ( id number, "event" text, "record" text, "athlete(s)" text, "date" text, "time (s)" number )
SELECT COUNT("athlete(s)") FROM table_203_829 WHERE "record" = 'track'
what is the difference in touchdowns between raymond philyaw and jerel myers ?
CREATE TABLE table_203_8 ( id number, "player" text, "rec." number, "yards" number, "avg." number, "td's" number, "long" number )
SELECT ABS((SELECT "td's" FROM table_203_8 WHERE "player" = 'raymond philyaw') - (SELECT "td's" FROM table_203_8 WHERE "player" = 'jerel myers'))
Name the number of v core for model number mobile athlon 64 3000+
CREATE TABLE table_29399 ( "Model Number" text, "Frequency" text, "L2 Cache" text, "HT" text, "Mult. 1" text, "V Core" text, "TDP" text, "Socket" text, "Release Date" text, "Part Number(s)" text )
SELECT COUNT("V Core") FROM table_29399 WHERE "Model Number" = 'Mobile Athlon 64 3000+'
What is the population where the median household income is $87,832 and there are fewer than 64,886 households?
CREATE TABLE table_name_83 ( population INTEGER, median_household_income VARCHAR, number_of_households VARCHAR )
SELECT AVG(population) FROM table_name_83 WHERE median_household_income = "$87,832" AND number_of_households < 64 OFFSET 886
Which date has opponents, Akgul Amanmuradova Nina Bratchikova, in the final?
CREATE TABLE table_71400 ( "Date" text, "Tournament" text, "Surface" text, "Tier" text, "Partner" text, "Opponents in the final" text, "Score" text )
SELECT "Date" FROM table_71400 WHERE "Opponents in the final" = 'akgul amanmuradova nina bratchikova'
what was the total majority that the dobell seat had ?
CREATE TABLE table_204_659 ( id number, "seat" text, "state" text, "majority" number, "member" text, "party" text )
SELECT "majority" FROM table_204_659 WHERE "seat" = 'dobell'
What Secretary has a Social AO of lieke de boer?
CREATE TABLE table_name_12 ( secretary VARCHAR, social_ao VARCHAR )
SELECT secretary FROM table_name_12 WHERE social_ao = "lieke de boer"
What was the date if the driver was Robert Pressley?
CREATE TABLE table_25162 ( "Year" real, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text )
SELECT "Date" FROM table_25162 WHERE "Driver" = 'Robert Pressley'
How many season had Melgar as a champion?
CREATE TABLE table_26220 ( "Season" real, "Champion" text, "Count" real, "Runners-up" text, "Third place" text, "Top scorer" text, "Top scorers club" text, "Goals" text )
SELECT COUNT("Season") FROM table_26220 WHERE "Champion" = 'Melgar'
How many items were under ranking l.a.(2) when the world ranking was 21st?
CREATE TABLE table_19948664_2 ( ranking_la__2_ VARCHAR, world_ranking__1_ VARCHAR )
SELECT COUNT(ranking_la__2_) FROM table_19948664_2 WHERE world_ranking__1_ = "21st"
How many different roles are there in the club 'Bootup Baltimore'?
CREATE TABLE club ( clubid number, clubname text, clubdesc text, clublocation text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE member_of_club ( stuid number, clubid number, position text )
SELECT COUNT(DISTINCT t2.position) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid WHERE t1.clubname = "Bootup Baltimore"
How many points when under 17,197 attended against the wild?
CREATE TABLE table_57739 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text, "Arena" text, "Points" real )
SELECT AVG("Points") FROM table_57739 WHERE "Attendance" < '17,197' AND "Opponent" = 'wild'
A scatter chart shows the correlation between Team_ID and ACC_Percent .
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text )
SELECT Team_ID, ACC_Percent FROM basketball_match
What was the result of the Georgia 8 district?
CREATE TABLE table_19753079_13 ( result VARCHAR, district VARCHAR )
SELECT result FROM table_19753079_13 WHERE district = "Georgia 8"
Who was the opponent at the game attended by 45,000?
CREATE TABLE table_name_73 ( opponent_number VARCHAR, attendance VARCHAR )
SELECT opponent_number FROM table_name_73 WHERE attendance = "45,000"
What is To Par, when Place is 3?
CREATE TABLE table_name_43 ( to_par VARCHAR, place VARCHAR )
SELECT to_par FROM table_name_43 WHERE place = "3"
what week number was at memorial stadium?
CREATE TABLE table_35471 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Attendance" real )
SELECT AVG("Week") FROM table_35471 WHERE "Game site" = 'memorial stadium'
What are the cities/towns located in the municipality of Moss?
CREATE TABLE table_72719 ( "City/town" text, "Municipality" text, "County" text, "City/town status" real, "Population" real )
SELECT "City/town" FROM table_72719 WHERE "Municipality" = 'Moss'
What is the Record with a Date that is may 20, 1961?
CREATE TABLE table_42209 ( "Record" text, "Athlete" text, "Nation" text, "Venue" text, "Date" text )
SELECT "Record" FROM table_42209 WHERE "Date" = 'may 20, 1961'
List the population density per kilometer for the city of abra de ilog.
CREATE TABLE table_73907 ( "Municipality" text, "No. of Barangays" real, "Area (km\u00b2)" text, "Population (2010)" real, "Pop. density (per km\u00b2)" text, "Income Class (2004)" text )
SELECT "Pop. density (per km\u00b2)" FROM table_73907 WHERE "Municipality" = 'Abra de Ilog'
What is the maximum league cup goals when there has been 0 FA cup appearances, and MF is the position, with 1 league appearance, and smaller than 0 total goals?
CREATE TABLE table_name_23 ( league_cup_goals INTEGER, total_goals VARCHAR, league_apps VARCHAR, fa_cup_apps VARCHAR, position VARCHAR )
SELECT MAX(league_cup_goals) FROM table_name_23 WHERE fa_cup_apps = "0" AND position = "mf" AND league_apps = "1" AND total_goals < 0
Which Power has a Name of 9 ad?
CREATE TABLE table_name_25 ( power VARCHAR, name VARCHAR )
SELECT power FROM table_name_25 WHERE name = "9 ad"
Name the marriage of the person who is married for christian viii
CREATE TABLE table_69586 ( "Birth" text, "Marriage" text, "Became Consort" text, "Ceased to be Consort" text, "Death" text, "Spouse" text )
SELECT "Marriage" FROM table_69586 WHERE "Spouse" = 'christian viii'
How many laps were in 1958?
CREATE TABLE table_name_80 ( laps INTEGER, year VARCHAR )
SELECT SUM(laps) FROM table_name_80 WHERE year = "1958"
what was the last baekje temple ?
CREATE TABLE table_204_465 ( id number, "#" number, "temple name" text, "hangul" text, "hanja" text, "period of reign" text, "personal name" text, "relationship" text, "note" text )
SELECT "temple name" FROM table_204_465 ORDER BY "period of reign" DESC LIMIT 1
For those records from the products and each product's manufacturer, return a bar chart about the distribution of name and manufacturer , and group by attribute headquarter, show y-axis from high to low order.
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Manufacturer DESC
What is the average price of the rooms for each different decor? Show me a bar chart!, and sort y-axis in ascending order.
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, basePrice INTEGER, decor TEXT )
SELECT decor, AVG(basePrice) FROM Rooms GROUP BY decor ORDER BY AVG(basePrice)
Who directed the episode 'Approaching Zero'?
CREATE TABLE table_56430 ( "Episode #" text, "Title" text, "Directed by" text, "Written by" text, "Original airdate" text )
SELECT "Directed by" FROM table_56430 WHERE "Title" = 'approaching zero'
Name the most middle schools for 2005-2006
CREATE TABLE table_2367847_2 ( middle_schools INTEGER, year VARCHAR )
SELECT MAX(middle_schools) FROM table_2367847_2 WHERE year = "2005-2006"
Which player was selected in rounds under 3?
CREATE TABLE table_name_33 ( player VARCHAR, round INTEGER )
SELECT player FROM table_name_33 WHERE round < 3
What is the SZDSZ percentage with an MSZP of 25% on 25/2/2009?
CREATE TABLE table_35704 ( "Source" text, "Date" text, "Fidesz" text, "MSZP" text, "SZDSZ" text, "Jobbik" text, "others" text )
SELECT "SZDSZ" FROM table_35704 WHERE "MSZP" = '25%' AND "Date" = '25/2/2009'
Which state had an average of less than 8.67, a swimsuit score of 8.27, an evening gown score of 8.78, and an interview number of 8.52?
CREATE TABLE table_56376 ( "State" text, "Swimsuit" real, "Evening gown" real, "Interview" real, "Average" real )
SELECT "State" FROM table_56376 WHERE "Average" < '8.67' AND "Swimsuit" = '8.27' AND "Evening gown" = '8.78' AND "Interview" = '8.52'
A bar chart about what is average age for different job title?, and rank y axis in ascending order.
CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER )
SELECT job, AVG(age) FROM Person GROUP BY job ORDER BY AVG(age)
Show all countries and the number of people from each country in a pie chart.
CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age int ) CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of text )
SELECT Country, COUNT(*) FROM people GROUP BY Country
What is the total GNIS Feature ID with a County of idaho?
CREATE TABLE table_54093 ( "Name" text, "GNIS Feature ID" real, "State" text, "County" text, "Type" text, "USGS 7.5' Map" text )
SELECT SUM("GNIS Feature ID") FROM table_54093 WHERE "County" = 'idaho'
What was the Browns record after they played the game at the Paul Brown stadium?
CREATE TABLE table_33636 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Stadium" text, "Record" text, "Attendance" text )
SELECT "Record" FROM table_33636 WHERE "Stadium" = 'paul brown stadium'
Find the number of users who posted some tweets.
CREATE TABLE tweets ( id number, uid number, text text, createdate time ) CREATE TABLE user_profiles ( uid number, name text, email text, partitionid number, followers number ) CREATE TABLE follows ( f1 number, f2 number )
SELECT COUNT(DISTINCT uid) FROM tweets
Which episode aired on august19,2012?
CREATE TABLE table_20704243_6 ( title VARCHAR, original_air_date VARCHAR )
SELECT title FROM table_20704243_6 WHERE original_air_date = "August19,2012"
Which player is an offensive tackle for the New York Jets?
CREATE TABLE table_59606 ( "Pick" real, "AFL Team" text, "Player" text, "Position" text, "College" text )
SELECT "Player" FROM table_59606 WHERE "Position" = 'offensive tackle' AND "AFL Team" = 'new york jets'
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and price , and group by attribute headquarter, and rank y-axis from low to high order please.
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER )
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Price
in how many dates the game was 2
CREATE TABLE table_31453 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT COUNT("Date") FROM table_31453 WHERE "Game" = '2'
Count the number of cinemas.
CREATE TABLE cinema ( cinema_id number, name text, openning_year number, capacity number, location text ) CREATE TABLE film ( film_id number, rank_in_series number, number_in_season number, title text, directed_by text, original_air_date text, production_code text ) CREATE TABLE schedule ( cinema_id number, film_id number, date text, show_times_per_day number, price number )
SELECT COUNT(*) FROM cinema
uncontrolled hypertension ( resting blood pressure > 140 / 90 )
CREATE TABLE table_dev_6 ( "id" int, "gender" string, "systolic_blood_pressure_sbp" int, "heart_disease" bool, "renal_disease" bool, "hematocrit_hct" float, "creatinine_clearance_cl" float, "diastolic_blood_pressure_dbp" int, "symptomatic_coronary_artery_disease" bool, "hypertension" bool, "myocardial_infarction" bool, "NOUSE" float )
SELECT * FROM table_dev_6 WHERE hypertension = 1 OR systolic_blood_pressure_sbp > 140 OR diastolic_blood_pressure_dbp > 90