instruction
stringlengths
5
766
input
stringlengths
38
5.51k
response
stringlengths
4
3.91k
Give me a bar chart for mean tonnage of each type, show by the Y in asc.
CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text )
SELECT Type, AVG(Tonnage) FROM ship GROUP BY Type ORDER BY AVG(Tonnage)
What order has the Species Authority of hydrochaeris hydrochaeris (linnaeus, 1766)?
CREATE TABLE table_name_84 ( order VARCHAR, species_authority VARCHAR )
SELECT order FROM table_name_84 WHERE species_authority = "hydrochaeris hydrochaeris (linnaeus, 1766)"
What team scored 4 points?
CREATE TABLE table_20396_1 ( team VARCHAR, points VARCHAR )
SELECT team FROM table_20396_1 WHERE points = "4"
Which rider had a speed of 104.630mph?
CREATE TABLE table_52741 ( "Rank" real, "Rider" text, "Team" text, "Speed" text, "Time" text )
SELECT "Rider" FROM table_52741 WHERE "Speed" = '104.630mph'
From which party is the incumbent who was first elected to office in 1990?
CREATE TABLE table_name_8 ( party VARCHAR, first_elected VARCHAR )
SELECT party FROM table_name_8 WHERE first_elected = 1990
Can you tell me the High rebounds that has the Date of november 5?
CREATE TABLE table_name_16 ( high_rebounds VARCHAR, date VARCHAR )
SELECT high_rebounds FROM table_name_16 WHERE date = "november 5"
What date was the record 21-11?
CREATE TABLE table_name_43 ( date VARCHAR, record VARCHAR )
SELECT date FROM table_name_43 WHERE record = "21-11"
What is the label from 1973 that has a catalog number of l 35023?
CREATE TABLE table_name_98 ( label VARCHAR, date VARCHAR, catalog VARCHAR )
SELECT label FROM table_name_98 WHERE date = "1973" AND catalog = "l 35023"
When Hamilton Academical is the Opponent, what is the total Attendance?
CREATE TABLE table_name_26 ( attendance VARCHAR, opponent VARCHAR )
SELECT COUNT(attendance) FROM table_name_26 WHERE opponent = "hamilton academical"
what was the total number of points scored in the game held on 2013-05-21 ?
CREATE TABLE table_204_375 ( id number, "#" number, "season" number, "competition" text, "date" text, "round" text, "opponent" text, "h / a" text, "result" text, "scorer (s)" text )
SELECT "result" + "result" FROM table_204_375 WHERE "date" = '2013-05-21'
What date did 'd.a.w.' Originally air?
CREATE TABLE table_73844 ( "Season no." real, "Series no." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text )
SELECT "Original air date" FROM table_73844 WHERE "Title" = 'D.A.W.'
Are there any Teams after 1997?
CREATE TABLE table_69280 ( "Year" real, "Class" text, "Tyres" text, "Team" text, "Co-Drivers" text, "Laps" real, "Pos." text )
SELECT "Team" FROM table_69280 WHERE "Year" > '1997'
What is every performance comparison when 80 St. Regis is 360?
CREATE TABLE table_2661 ( "Performance comparison" text, "78 Fury" text, "78 Monaco" text, "79 St. Regis" text, "80 St. Regis" text, "81 St. Regis" text )
SELECT "Performance comparison" FROM table_2661 WHERE "80 St. Regis" = '360'
Who were the 76ers opponents on January 17?
CREATE TABLE table_29723 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Team" FROM table_29723 WHERE "Date" = 'January 17'
Name the least lost
CREATE TABLE table_21991074_3 ( lost INTEGER )
SELECT MIN(lost) FROM table_21991074_3
What is the least amount of touchdowns scored on the chart?
CREATE TABLE table_1040 ( "Player" text, "Position" text, "Starter" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real )
SELECT MIN("Touchdowns") FROM table_1040
What are the name and id of the team offering the lowest average salary?
CREATE TABLE team ( name VARCHAR, team_id VARCHAR ) CREATE TABLE salary ( team_id VARCHAR, salary INTEGER )
SELECT T1.name, T1.team_id FROM team AS T1 JOIN salary AS T2 ON T1.team_id = T2.team_id GROUP BY T1.team_id ORDER BY AVG(T2.salary) LIMIT 1
How many players are from each country. Show a pie chart.
CREATE TABLE team ( Team_id int, Name text ) CREATE TABLE country ( Country_id int, Country_name text, Capital text, Official_native_language text ) CREATE TABLE player ( Player_ID int, Player text, Years_Played text, Total_WL text, Singles_WL text, Doubles_WL text, Team int ) CREATE TABLE match_season ( Season real, Player text, Position text, Country int, Team int, Draft_Pick_Number int, Draft_Class text, College text )
SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name
How many socialist have a lead of 12.6%?
CREATE TABLE table_22654 ( "Date Released" text, "Polling institute" text, "Social Democratic" text, "Socialist" text, "Green-Communist" text, "Democratic and Social Centre" text, "Lead" text )
SELECT COUNT("Socialist") FROM table_22654 WHERE "Lead" = '12.6%'
What is the mountain classification of Mario Cipollini, who has a general classification of Pavel tonkov?
CREATE TABLE table_name_60 ( mountains_classification VARCHAR, winner VARCHAR, general_classification VARCHAR )
SELECT mountains_classification FROM table_name_60 WHERE winner = "mario cipollini" AND general_classification = "pavel tonkov"
What was the stadium that held that game after week 15?
CREATE TABLE table_name_28 ( stadium VARCHAR, week INTEGER )
SELECT stadium FROM table_name_28 WHERE week > 15
what is the name of the jeremy guest for the episode 1x01
CREATE TABLE table_1685 ( "Episode" text, "First broadcast" text, "Graemes guest" text, "Jeremys guest" text, "Votes (%)" text )
SELECT "Jeremys guest" FROM table_1685 WHERE "Episode" = '1x01'
What are the schools that were either founded before 1850 or are public?
CREATE TABLE basketball_match ( team_id number, school_id number, team_name text, acc_regular_season text, acc_percent text, acc_home text, acc_road text, all_games text, all_games_percent number, all_home text, all_road text, all_neutral text ) CREATE TABLE university ( school_id number, school text, location text, founded number, affiliation text, enrollment number, nickname text, primary_conference text )
SELECT school FROM university WHERE founded > 1850 OR affiliation = 'Public'
Name the least podiums for 2009
CREATE TABLE table_2725949_6 ( podiums INTEGER, season VARCHAR )
SELECT MIN(podiums) FROM table_2725949_6 WHERE season = 2009
Plot total number of memory in g by grouped by carrier as a bar graph, display by the sum memory in g in asc.
CREATE TABLE phone ( Name text, Phone_ID int, Memory_in_G int, Carrier text, Price real ) CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops real, Ranking int ) CREATE TABLE phone_market ( Market_ID int, Phone_ID text, Num_of_stock int )
SELECT Carrier, SUM(Memory_in_G) FROM phone GROUP BY Carrier ORDER BY SUM(Memory_in_G)
What year did Bryant Heating enter?
CREATE TABLE table_15376 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
SELECT SUM("Year") FROM table_15376 WHERE "Entrant" = 'bryant heating'
Name the number one singles for desvarieux, jacob
CREATE TABLE table_3764 ( "Artist" text, "Country" text, "Number-one single(s)" text, "Year" real, "Weeks at #1" real, "Straight to #1 ?" text )
SELECT "Number-one single(s)" FROM table_3764 WHERE "Artist" = 'Desvarieux, Jacob'
What is the call sign for channel 6?
CREATE TABLE table_28631 ( "Channel" real, "Channel name" text, "Callsign" text, "Signal power" text, "Broadcast area" text )
SELECT "Callsign" FROM table_28631 WHERE "Channel" = '6'
What is the second leg that Valencia was on?
CREATE TABLE table_68891 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text )
SELECT "2nd leg" FROM table_68891 WHERE "Team 2" = 'valencia'
Who was the game attended by 60425 people played against?
CREATE TABLE table_72984 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Raiders points" real, "Opponents" real, "Raiders first downs" real, "Record" text, "Attendance" real )
SELECT "Opponent" FROM table_72984 WHERE "Attendance" = '60425'
what is 2010 when 2006 is 3r?
CREATE TABLE table_47843 ( "Tournament" text, "1998" text, "1999" text, "2000" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text )
SELECT "2010" FROM table_47843 WHERE "2006" = '3r'
what is the population estimate 2005 for the with the area (km2) 3,034.08?
CREATE TABLE table_11224 ( "Name" text, "Area (km 2 )" real, "Population Estimate 2005" real, "Population Census 2010" real, "Capital" text )
SELECT AVG("Population Estimate 2005") FROM table_11224 WHERE "Area (km 2 )" = '3,034.08'
Which team has a home field at Glenferrie Oval?
CREATE TABLE table_32433 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Home team" FROM table_32433 WHERE "Venue" = 'glenferrie oval'
What is the 2009 estimate population of the region with Manaus as the largest city?
CREATE TABLE table_name_79 ( population__2009_estimate_ VARCHAR, largest_city VARCHAR )
SELECT population__2009_estimate_ FROM table_name_79 WHERE largest_city = "manaus"
What episode number of the season was 'The Northern Uprising'?
CREATE TABLE table_16102 ( "No. in series" real, "No. in season" real, "Title" text, "Setting" text, "Directed by" text, "Written by" text, "Original air date" text )
SELECT "No. in season" FROM table_16102 WHERE "Title" = 'The Northern Uprising'
What was the loss of the Mariners game when they had a record of 21-34?
CREATE TABLE table_name_98 ( loss VARCHAR, record VARCHAR )
SELECT loss FROM table_name_98 WHERE record = "21-34"
How many times was the high rebounds by marcus camby (18)?
CREATE TABLE table_29902 ( "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_29902 WHERE "High rebounds" = 'Marcus Camby (18)'
the number of cars finishing in the top ten for braun racing .
CREATE TABLE table_203_131 ( id number, "pos." number, "car #" number, "driver" text, "make" text, "team" text )
SELECT COUNT(*) FROM table_203_131 WHERE "team" = 'braun racing'
What is the minimum length of the locations where the average climb percentage is exactly 59%?
CREATE TABLE table_2269 ( "Number" real, "Name" text, "Kilometer" real, "Pavement" text, "Length (in m)" real, "Average climb (%)" real )
SELECT MIN("Length (in m)") FROM table_2269 WHERE "Average climb (%)" = '59'
How many schools do not participate in the basketball match?
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, acc_percent text, acc_home text, acc_road text, all_games text, all_games_percent number, all_home text, all_road text, all_neutral text )
SELECT COUNT(*) FROM university WHERE NOT school_id IN (SELECT school_id FROM basketball_match)
On what date did Dick Johnson with at Calder?
CREATE TABLE table_name_10 ( date VARCHAR, winner VARCHAR, race_title VARCHAR )
SELECT date FROM table_name_10 WHERE winner = "dick johnson" AND race_title = "calder"
What is the Region of the release on December 22, 2008?
CREATE TABLE table_name_2 ( region VARCHAR, date VARCHAR )
SELECT region FROM table_name_2 WHERE date = "december 22, 2008"
What kind of Week 1 has a Week 8 of not eligible, and a Week 9 of no nominations, and a Week 3 of cyril? Question 3
CREATE TABLE table_59964 ( "Week 1" text, "Week 2" text, "Week 3" text, "Week 4" text, "Week 5" text, "Week 6" text, "Week 7" text, "Week 8" text, "Week 9" text, "Week 10 FINAL" text )
SELECT "Week 1" FROM table_59964 WHERE "Week 8" = 'not eligible' AND "Week 9" = 'no nominations' AND "Week 3" = 'cyril'
How many Wins have Losses larger than 2, and an Against of 73.3?
CREATE TABLE table_name_26 ( wins INTEGER, loses VARCHAR, against VARCHAR )
SELECT SUM(wins) FROM table_name_26 WHERE loses > 2 AND against = "73.3"
What is the zodiac sign for the English March?
CREATE TABLE table_60473 ( "English name" text, "Thai name" text, "Abbr." text, "Transcription" text, "Sanskrit word" text, "Zodiac sign" text )
SELECT "Zodiac sign" FROM table_60473 WHERE "English name" = 'march'
how many contestants were from thailand ?
CREATE TABLE table_204_910 ( id number, "rank" number, "name" text, "nationality" text, "result" number, "notes" text )
SELECT COUNT(*) FROM table_204_910 WHERE "nationality" = 'thailand'
Who was the director that worked with Dana Dorian as the writer?
CREATE TABLE table_name_44 ( director_s_ VARCHAR, writer_s_ VARCHAR )
SELECT director_s_ FROM table_name_44 WHERE writer_s_ = "dana dorian"
Who is the second member with first member Sir Rowland Hill, BT, and a conservative second party?
CREATE TABLE table_59995 ( "Election" text, "First member" text, "First party" text, "Second member" text, "Second party" text )
SELECT "Second member" FROM table_59995 WHERE "First member" = 'sir rowland hill, bt' AND "Second party" = 'conservative'
What is the comissioned for 4 may 1943?
CREATE TABLE table_1220125_4 ( commissioned VARCHAR, laid_down VARCHAR )
SELECT commissioned FROM table_1220125_4 WHERE laid_down = "4 May 1943"
What movie did Bela Bose co-star in?
CREATE TABLE table_73783 ( "Song" text, "Singer" text, "Co-Singers" text, "Music Director" text, "Lyricist" text, "Co-Stars" text, "Movie/Album" text, "Year" real, "Additional Info" text )
SELECT "Movie/Album" FROM table_73783 WHERE "Co-Stars" = 'Bela Bose'
who is pictured on top of the list ?
CREATE TABLE table_204_665 ( id number, "rank" number, "name" text, "notability" text, "birthplace" text, "advocate" text )
SELECT "name" FROM table_204_665 WHERE id = 1
What is the highest week 9 that had a week 6 of 7, a week 10 of greater than 2, a week 7 of 5, and a week 11 less than 2?
CREATE TABLE table_name_13 ( wk_9 INTEGER, wk_11 VARCHAR, wk_7 VARCHAR, wk_6 VARCHAR, wk_10 VARCHAR )
SELECT MAX(wk_9) FROM table_name_13 WHERE wk_6 = "7" AND wk_10 > 2 AND wk_7 = "5" AND wk_11 < 2
What is the greatest number of caps for Bruce Djite?
CREATE TABLE table_71177 ( "Player" text, "Country" text, "Caps" real, "Goals" text, "Years Active" text, "Years at Club" text )
SELECT MAX("Caps") FROM table_71177 WHERE "Player" = 'bruce djite'
What is the minimum number of f/laps in the Italian Formula Renault 2.0 Winter Series?
CREATE TABLE table_21795650_1 ( f_laps INTEGER, series VARCHAR )
SELECT MIN(f_laps) FROM table_21795650_1 WHERE series = "Italian Formula Renault 2.0 Winter series"
What is the smalledt position when the difference was 6?
CREATE TABLE table_20040 ( "Position" real, "Team" text, "Points" real, "Played" real, "Won" real, "Drawn" real, "Lost" real, "For" real, "Against" real, "Difference" text )
SELECT MIN("Position") FROM table_20040 WHERE "Difference" = '6'
What is the name for the assembly segment with a constituency number of 214?
CREATE TABLE table_66538 ( "Constituency number" text, "Name" text, "Reserved for ( SC / ST /None)" text, "District" text, "Number of electorates (2009)" real )
SELECT "Name" FROM table_66538 WHERE "Constituency number" = '214'
What January 15-16 is is that corresponds to November 3, 2013?
CREATE TABLE table_27523 ( "June 10-11" text, "March 27-29" text, "January 15-16" text, "November 3" text, "August 21-22" text )
SELECT "January 15-16" FROM table_27523 WHERE "November 3" = 'November 3, 2013'
When first woman eva is the comment what is the end -utc?
CREATE TABLE table_26984 ( "Spacecraft" text, "Spacewalker" text, "Start \u2013 UTC" text, "End \u2013 UTC" text, "Duration" text, "Comments" text )
SELECT "End \u2013 UTC" FROM table_26984 WHERE "Comments" = 'First woman EVA'
What district is incumbent albert w. johnson from?
CREATE TABLE table_1341865_40 ( district VARCHAR, incumbent VARCHAR )
SELECT district FROM table_1341865_40 WHERE incumbent = "Albert W. Johnson"
Which located featured the first prize of 33500?
CREATE TABLE table_16966 ( "Date" text, "Tournament" text, "Location" text, "Purse( $ )" real, "Winner" text, "Score" text, "1st Prize( $ )" real )
SELECT "Location" FROM table_16966 WHERE "1st Prize( $ )" = '33500'
Draw a bar chart about the distribution of meter_700 and ID , and rank meter_700 in desc order.
CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int )
SELECT meter_700, ID FROM swimmer ORDER BY meter_700 DESC
What is the High points with a Team with boston?
CREATE TABLE table_name_95 ( high_points VARCHAR, team VARCHAR )
SELECT high_points FROM table_name_95 WHERE team = "boston"
What is the Name with a Year with freshman, and a Home Town with los angeles, ca, and a Height of 6 4?
CREATE TABLE table_77515 ( "Name" text, "Position" text, "Height" text, "Weight" real, "Year" text, "Home Town" text, "High School" text )
SELECT "Name" FROM table_77515 WHERE "Year" = 'freshman' AND "Home Town" = 'los angeles, ca' AND "Height" = '6–4'
What date did the episode air when guy grossi won?
CREATE TABLE table_31057 ( "Episode" real, "Airdate" text, "Iron Chef" text, "Challenger" text, "Theme Ingredient" text, "Winner" text )
SELECT "Airdate" FROM table_31057 WHERE "Winner" = 'Guy Grossi'
how many people wrote the episode directed by rob schrab?
CREATE TABLE table_30273 ( "Series no." real, "Season no." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real )
SELECT COUNT("Written by") FROM table_30273 WHERE "Directed by" = 'Rob Schrab'
Who wrote the episode that has the production code ad1c05?
CREATE TABLE table_53991 ( "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text )
SELECT "Written by" FROM table_53991 WHERE "Production code" = 'ad1c05'
What is the total number of Round(s), when Time is 'n/a', and when Location is 'Canton, Ohio, USA'?
CREATE TABLE table_9648 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Round" real, "Time" text, "Location" text )
SELECT COUNT("Round") FROM table_9648 WHERE "Time" = 'n/a' AND "Location" = 'canton, ohio, usa'
Which Rank is the Country of soviet union with a Total smaller than 19?
CREATE TABLE table_name_94 ( rank INTEGER, country VARCHAR, total VARCHAR )
SELECT MIN(rank) FROM table_name_94 WHERE country = "soviet union" AND total < 19
What was the interview score for Hawaii?
CREATE TABLE table_11884814_3 ( interview VARCHAR, country VARCHAR )
SELECT interview FROM table_11884814_3 WHERE country = "Hawaii"
Where was something built earlier than 1858?
CREATE TABLE table_39471 ( "Name" text, "Type" text, "Year Built" real, "Where Built" text, "Initial Owners" text )
SELECT "Where Built" FROM table_39471 WHERE "Year Built" < '1858'
Name the team nickname for enrollment more than 42,326
CREATE TABLE table_name_21 ( team_nickname VARCHAR, enrollment INTEGER )
SELECT team_nickname FROM table_name_21 WHERE enrollment > 42 OFFSET 326
What is the name of the school with a decile of 1, a state authority, and located in Otahuhu?
CREATE TABLE table_52272 ( "Name" text, "Years" text, "Area" text, "Authority" text, "Decile" text, "Roll" real )
SELECT "Name" FROM table_52272 WHERE "Decile" = '1' AND "Authority" = 'state' AND "Area" = 'otahuhu'
What episode number is presented by Ben Okri ?
CREATE TABLE table_1208 ( "Episode No." text, "Episode Title" text, "UK Broadcast Date" text, "Presenter" text, "Countries Visited" text )
SELECT "Episode No." FROM table_1208 WHERE "Presenter" = 'Ben Okri'
Find the number of dorms for each gender in a bar chart, I want to show by the x axis from high to low please.
CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) 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 Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_name VARCHAR(25) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER )
SELECT gender, COUNT(*) FROM Dorm GROUP BY gender ORDER BY gender DESC
who was their last opponent in the uefa cup in the 2007-2008 season ?
CREATE TABLE table_204_885 ( id number, "season" text, "competition" text, "round" text, "opponent" text, "home" text, "away" text, "agg." text, "bye" text )
SELECT "opponent" FROM table_204_885 WHERE "competition" = 'uefa cup' AND "season" = '2007-08' ORDER BY id DESC LIMIT 1
how old is each student and how many students are each age?
CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) 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 Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) )
SELECT Age, COUNT(*) FROM Student GROUP BY Age
Show the average price range of hotels that have 5 star ratings and allow pets.
CREATE TABLE HOTELS ( price_range INTEGER, star_rating_code VARCHAR, pets_allowed_yn VARCHAR )
SELECT AVG(price_range) FROM HOTELS WHERE star_rating_code = "5" AND pets_allowed_yn = 1
Name the most revenue for operating income more than 27 for hamburg and debt as % of value less than 0
CREATE TABLE table_68346 ( "Rank" real, "Team" text, "Country" text, "Value ($M)" real, "Debt as % of value" real, "% change on year" text, "Revenue ($M)" real, "Operating income ($m)" real )
SELECT MAX("Revenue ($M)") FROM table_68346 WHERE "Operating income ($m)" > '27' AND "Team" = 'hamburg' AND "Debt as % of value" < '0'
What is the total number of Draw(s), when Televotes is greater than 1761, when Song is 'Ils Sont L ', and when Place is less than 2?
CREATE TABLE table_49985 ( "Draw" real, "Song" text, "Artist" text, "Televotes" real, "Place" real )
SELECT COUNT("Draw") FROM table_49985 WHERE "Televotes" > '1761' AND "Song" = 'ils sont là' AND "Place" < '2'
What is the Round with a Opponent with blackburn?
CREATE TABLE table_77997 ( "Round" text, "Date" text, "Opponent" text, "Venue" text, "Result" text )
SELECT "Round" FROM table_77997 WHERE "Opponent" = 'blackburn'
Count the number of different account types.
CREATE TABLE loan ( loan_id text, loan_type text, cust_id text, branch_id text, amount number ) CREATE TABLE bank ( branch_id number, bname text, no_of_customers number, city text, state text ) CREATE TABLE customer ( cust_id text, cust_name text, acc_type text, acc_bal number, no_of_loans number, credit_score number, branch_id number, state text )
SELECT COUNT(DISTINCT acc_type) FROM customer
what is the highest silver when the total is 4 and bronze is less than 1?
CREATE TABLE table_name_54 ( silver INTEGER, total VARCHAR, bronze VARCHAR )
SELECT MAX(silver) FROM table_name_54 WHERE total = "4" AND bronze < 1
What is the number of finishes associated with 13 starts, more than 169 points, and 96 stage wins?
CREATE TABLE table_name_12 ( finishes VARCHAR, stage_wins VARCHAR, starts VARCHAR, points VARCHAR )
SELECT finishes FROM table_name_12 WHERE starts = 13 AND points > 169 AND stage_wins = 96
How many Pop (2004) has a Governorate of al mahwit?
CREATE TABLE table_name_48 ( pop__2004_ INTEGER, governorate VARCHAR )
SELECT SUM(pop__2004_) FROM table_name_48 WHERE governorate = "al mahwit"
What year was finish Toulouse, and stage was larger than 12?
CREATE TABLE table_66233 ( "Year" real, "Stage" real, "Start" text, "Finish" text, "Leader at the summit" text )
SELECT SUM("Year") FROM table_66233 WHERE "Finish" = 'toulouse' AND "Stage" > '12'
which Player has a To par of 7, and a Country of spain?
CREATE TABLE table_name_67 ( player VARCHAR, to_par VARCHAR, country VARCHAR )
SELECT player FROM table_name_67 WHERE to_par = "–7" AND country = "spain"
For those records from the products and each product's manufacturer, give me the comparison about the average of revenue over the name , and group by attribute name by a bar chart, list by the total number in asc.
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 T2.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Revenue
Which college has a nose tackle position?
CREATE TABLE table_76747 ( "Pick #" real, "NFL Team" text, "Player" text, "Position" text, "College" text )
SELECT "College" FROM table_76747 WHERE "Position" = 'nose tackle'
name a competitor that scored more that 2600 points and was from canada .
CREATE TABLE table_204_291 ( id number, "rank" number, "name" text, "nation" text, "cp" number, "fp" number, "points" number, "placings" number )
SELECT "name" FROM table_204_291 WHERE "points" > 2600 AND "nation" = 'canada'
Wins of 0, and a Rank larger than 6, and a Manufacturer of kawasaki, and a Rider of massimo broccoli involved what highest points?
CREATE TABLE table_name_18 ( points INTEGER, rider VARCHAR, manufacturer VARCHAR, wins VARCHAR, rank VARCHAR )
SELECT MAX(points) FROM table_name_18 WHERE wins = 0 AND rank > 6 AND manufacturer = "kawasaki" AND rider = "massimo broccoli"
What is the away team's score when footscray is the away team?
CREATE TABLE table_name_74 ( away_team VARCHAR )
SELECT away_team AS score FROM table_name_74 WHERE away_team = "footscray"
How many CFL teams are from York college?
CREATE TABLE table_16395 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
SELECT COUNT("CFL Team") FROM table_16395 WHERE "College" = 'York'
What is the Jersey Number of the Player from Clemson?
CREATE TABLE table_45744 ( "Player" text, "Nationality" text, "Jersey Number(s)" real, "Position" text, "Years" text, "From" text )
SELECT SUM("Jersey Number(s)") FROM table_45744 WHERE "From" = 'clemson'
A pie chart shows the proportion of All_Neutral and team id.
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_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text )
SELECT All_Neutral, Team_ID FROM basketball_match
Who is the director for the witman boys?
CREATE TABLE table_1151 ( "Year (Ceremony)" text, "English title" text, "Hungarian title" text, "Director" text, "Result" text )
SELECT "Director" FROM table_1151 WHERE "English title" = 'The Witman Boys'
Find the average age for students with different sex in a bar chart, could you list Y from high to low order?
CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_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 Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER )
SELECT Sex, AVG(Age) FROM Student GROUP BY Sex ORDER BY AVG(Age) DESC
How many losses for the team with less than 4 wins, more than 0 byes and 2510 against?
CREATE TABLE table_name_39 ( losses INTEGER, byes VARCHAR, wins VARCHAR, against VARCHAR )
SELECT AVG(losses) FROM table_name_39 WHERE wins < 4 AND against = 2510 AND byes > 0
On what date was the crowd over 19,298 when South Melbourne was the home team?
CREATE TABLE table_54155 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
SELECT "Date" FROM table_54155 WHERE "Crowd" > '19,298' AND "Home team" = 'south melbourne'
How many dances did Warren & Kym have?
CREATE TABLE table_17862135_3 ( number_of_dances VARCHAR, couple VARCHAR )
SELECT number_of_dances FROM table_17862135_3 WHERE couple = "Warren & Kym"
Who were the victims of the US ship that sank in the Mississippi River near Memphis?
CREATE TABLE table_name_35 ( principal_victims VARCHAR, nat VARCHAR, where_sunk VARCHAR )
SELECT principal_victims FROM table_name_35 WHERE nat = "us" AND where_sunk = "mississippi river near memphis"