instruction
stringlengths
12
317
input
stringlengths
38
973
response
stringlengths
25
526
WHAT IS THE RESULT WHEN THE OPPONENT WAS CHICAGO BEARS?
CREATE TABLE table_name_18 ( result VARCHAR, opponent VARCHAR )
SELECT result FROM table_name_18 WHERE opponent = "chicago bears"
Return a bar chart on what are the title and maximum price of each film?, display x-axis in asc order.
CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) 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 )
SELECT Title, MAX(T1.Price) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Title ORDER BY Title
What was the manner of departure for the outgoing manager, davide ballardini?
CREATE TABLE table_name_92 ( manner_of_departure VARCHAR, outgoing_manager VARCHAR )
SELECT manner_of_departure FROM table_name_92 WHERE outgoing_manager = "davide ballardini"
What is the team's record in games against the Hartford Whalers?
CREATE TABLE table_name_52 ( record VARCHAR, opponent VARCHAR )
SELECT record FROM table_name_52 WHERE opponent = "hartford whalers"
Which game took place April 6?
CREATE TABLE table_6061 ( "Game" real, "April" real, "Opponent" text, "Score" text, "Record" text )
SELECT "Game" FROM table_6061 WHERE "April" = '6'
What is the part 4 of the word with the part 1 'heizan'?
CREATE TABLE table_72908 ( "Class" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Verb meaning" text )
SELECT "Part 4" FROM table_72908 WHERE "Part 1" = 'heizan'
What trips are operated by Atlantic coast charters?
CREATE TABLE table_name_47 ( total_trips__am_pm_ VARCHAR, operated_by VARCHAR )
SELECT total_trips__am_pm_ FROM table_name_47 WHERE operated_by = "atlantic coast charters"
What was the margin of victory when the runner-up was Janet Coles?
CREATE TABLE table_9805 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text )
SELECT "Margin of victory" FROM table_9805 WHERE "Runner(s)-up" = 'janet coles'
What player placed t6 for the United States with a score of 67-69=136?
CREATE TABLE table_name_71 ( player VARCHAR, country VARCHAR, place VARCHAR, score VARCHAR )
SELECT player FROM table_name_71 WHERE country = "united states" AND place = "t6" AND score = 67 - 69 = 136
What branch was involved when the term began in January 3, 1985?
CREATE TABLE table_197446_1 ( branch VARCHAR, term_began VARCHAR )
SELECT branch FROM table_197446_1 WHERE term_began = "January 3, 1985"
In the game where the Hornets were the home team and Clippers the visiting team, what is the score?
CREATE TABLE table_56666 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text )
SELECT "Score" FROM table_56666 WHERE "Home" = 'hornets' AND "Visitor" = 'clippers'
What team is in the toyota h llin arena?
CREATE TABLE table_34170 ( "Team" text, "City, Region" text, "Arena" text, "Colours" text, "Head coach" text )
SELECT "Team" FROM table_34170 WHERE "Arena" = 'toyota höllin'
I want the sum of year for mark barron
CREATE TABLE table_name_11 ( year INTEGER, player_name VARCHAR )
SELECT SUM(year) FROM table_name_11 WHERE player_name = "mark barron"
Show all main industry and total market value in each industry by a bar chart, show in asc by the x-axis.
CREATE TABLE station_company ( Station_ID int, Company_ID int, Rank_of_the_Year int ) CREATE TABLE gas_station ( Station_ID int, Open_Year int, Location text, Manager_Name text, Vice_Manager_Name text, Representative_Name text ) 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 )
SELECT Main_Industry, SUM(Market_Value) FROM company GROUP BY Main_Industry ORDER BY Main_Industry
What Player has a To par of +1 and the Score 75-70-71-73=289?
CREATE TABLE table_name_10 ( player VARCHAR, to_par VARCHAR, score VARCHAR )
SELECT player FROM table_name_10 WHERE to_par = "+1" AND score = 75 - 70 - 71 - 73 = 289
In what Distance has a Venue of sale?
CREATE TABLE table_name_36 ( distance VARCHAR, venue VARCHAR )
SELECT distance FROM table_name_36 WHERE venue = "sale"
For those records from the products and each product's manufacturer, find name and manufacturer , and group by attribute founder, and visualize them by a bar chart.
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.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name
What's the Uni# of Timms, who has bats of R?
CREATE TABLE table_name_22 ( uni_number VARCHAR, bats VARCHAR, surname VARCHAR )
SELECT uni_number FROM table_name_22 WHERE bats = "r" AND surname = "timms"
What percentage of browsers were using Internet Explorer in April 2009?
CREATE TABLE table_79423 ( "Date" text, "Internet Explorer" text, "Firefox" text, "Safari" text, "Opera" text )
SELECT "Internet Explorer" FROM table_79423 WHERE "Date" = 'april 2009'
Draw a bar chart about the distribution of All_Home and School_ID , and group by attribute ACC_Road, and sort bars in ascending order.
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 All_Home, School_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY All_Home
When the Home team of collingwood played, what was the opposing Away team score?
CREATE TABLE table_name_49 ( away_team VARCHAR, home_team VARCHAR )
SELECT away_team AS score FROM table_name_49 WHERE home_team = "collingwood"
Name the number of regular judge when host is bernie chan
CREATE TABLE table_20451 ( "Country" text, "Name" text, "Host" text, "Channel" text, "First Premiere" text, "Regular Judge" text, "Seasons" real )
SELECT COUNT("Regular Judge") FROM table_20451 WHERE "Host" = 'Bernie Chan'
What is the highest top-25 with more than 9 top-10 but less than 29 events?
CREATE TABLE table_name_17 ( top_25 INTEGER, top_10 VARCHAR, events VARCHAR )
SELECT MAX(top_25) FROM table_name_17 WHERE top_10 > 9 AND events < 29
What is the website of the school affiliated with the Church of England?
CREATE TABLE table_28523_3 ( school VARCHAR, religious_affiliation VARCHAR )
SELECT school AS website FROM table_28523_3 WHERE religious_affiliation = "Church of England"
What type of object has an NGC number higher than 2090 and has a right ascension (J2000) of 05h52m19s?
CREATE TABLE table_53963 ( "NGC number" real, "Object type" text, "Constellation" text, "Right ascension ( J2000 )" text, "Declination ( J2000 )" text )
SELECT "Object type" FROM table_53963 WHERE "NGC number" > '2090' AND "Right ascension ( J2000 )" = '05h52m19s'
What is To Par, when Year(s) Won is '1968 , 1971'?
CREATE TABLE table_name_99 ( to_par VARCHAR, year_s__won VARCHAR )
SELECT to_par FROM table_name_99 WHERE year_s__won = "1968 , 1971"
What is the lowest number of episodes for anabel barnston?
CREATE TABLE table_name_35 ( episodes INTEGER, actor VARCHAR )
SELECT MIN(episodes) FROM table_name_35 WHERE actor = "anabel barnston"
Which urban area has a 2011 population of 5010?
CREATE TABLE table_1940144_1 ( urban_area VARCHAR, population_2011 VARCHAR )
SELECT urban_area FROM table_1940144_1 WHERE population_2011 = 5010
What is the title of the record with an artist of Tangorodrim, category number FSR006?
CREATE TABLE table_name_46 ( title VARCHAR, artist VARCHAR, cat__number VARCHAR )
SELECT title FROM table_name_46 WHERE artist = "tangorodrim" AND cat__number = "fsr006"
What is the lowest Postion, when Bike No is greater than 10, when Driver / Passenger is Nicky Pulinx / Ondrej Cermak, and when Points is greater than 244?
CREATE TABLE table_48573 ( "Position" real, "Driver / Passenger" text, "Equipment" text, "Bike No" real, "Points" real )
SELECT MIN("Position") FROM table_48573 WHERE "Bike No" > '10' AND "Driver / Passenger" = 'nicky pulinx / ondrej cermak' AND "Points" > '244'
What is the lowest week number for the game that was at milwaukee county stadium?
CREATE TABLE table_name_18 ( week INTEGER, game_site VARCHAR )
SELECT MIN(week) FROM table_name_18 WHERE game_site = "milwaukee county stadium"
What Film Festival had participants/recipients of Isao Tomita?
CREATE TABLE table_26282750_1 ( film_festival VARCHAR, participants_recipients VARCHAR )
SELECT film_festival FROM table_26282750_1 WHERE participants_recipients = "Isao Tomita"
Who constructed the car with a grid over 19 that retired due to suspension?
CREATE TABLE table_51567 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT "Constructor" FROM table_51567 WHERE "Grid" > '19' AND "Time/Retired" = 'suspension'
What horse does todd pletcher ride with odds of 14.20-1?
CREATE TABLE table_55341 ( "Finish Position" text, "Lengths Behind" text, "Post Position" real, "Horse name" text, "Trainer" text, "Jockey" text, "Owner" text, "Post Time Odds" text )
SELECT "Horse name" FROM table_55341 WHERE "Jockey" = 'todd pletcher' AND "Post Time Odds" = '14.20-1'
What is the nationality of the person with number 27?
CREATE TABLE table_43678 ( "Player" text, "Nationality" text, "Jersey Number(s)" text, "Position" text, "Years" text, "From" text )
SELECT "Nationality" FROM table_43678 WHERE "Jersey Number(s)" = '27'
What was the score of the game that led to a 7-5 record?
CREATE TABLE table_5833 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
SELECT "Score" FROM table_5833 WHERE "Record" = '7-5'
What was the maximum round where Marc Lieb Richard Lietz was on the GT2 Winning Team?
CREATE TABLE table_24865763_2 ( rnd INTEGER, gt2_winning_team VARCHAR )
SELECT MAX(rnd) FROM table_24865763_2 WHERE gt2_winning_team = "Marc Lieb Richard Lietz"
what is the highest round when the overall is less than 17?
CREATE TABLE table_44649 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
SELECT MAX("Round") FROM table_44649 WHERE "Overall" < '17'
What is the premiere rating for a Chinese title of , and a Peak smaller than 41?
CREATE TABLE table_name_59 ( premiere INTEGER, chinese_title VARCHAR, peak VARCHAR )
SELECT SUM(premiere) FROM table_name_59 WHERE chinese_title = "野蠻奶奶大戰戈師奶" AND peak < 41
Which commission was launched 28 june 1934, and has a Pennant number of h.78?
CREATE TABLE table_name_40 ( commissioned VARCHAR, launched VARCHAR, pennant_number VARCHAR )
SELECT commissioned FROM table_name_40 WHERE launched = "28 june 1934" AND pennant_number = "h.78"
Who is the successor when the reason for change is died November 11, 1845?
CREATE TABLE table_225205_4 ( successor VARCHAR, reason_for_change VARCHAR )
SELECT successor FROM table_225205_4 WHERE reason_for_change = "Died November 11, 1845"
What number of Fatalties is associated with the Time of 12:38:46?
CREATE TABLE table_name_78 ( fatalities VARCHAR, time VARCHAR )
SELECT fatalities FROM table_name_78 WHERE time = "12:38:46"
List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?
CREATE TABLE drivers ( forename VARCHAR, surname VARCHAR, driverid VARCHAR ) CREATE TABLE laptimes ( driverid VARCHAR, milliseconds INTEGER )
SELECT DISTINCT T1.forename, T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds < 93000
In which period did Stanislav Chistov get a penalty?
CREATE TABLE table_name_9 ( period VARCHAR, player VARCHAR )
SELECT period FROM table_name_9 WHERE player = "stanislav chistov"
Who are the semi finalists on the week of 12 june, when the runner-up is listed as Lori McNeil?
CREATE TABLE table_76096 ( "Week of" text, "Tier" text, "Winner" text, "Runner-up" text, "Semi finalists" text )
SELECT "Semi finalists" FROM table_76096 WHERE "Week of" = '12 june' AND "Runner-up" = 'lori mcneil'
Who was promoted to the league when Coventry was relegated to the league?
CREATE TABLE table_26411 ( "Season" text, "Name" text, "Teams" real, "Relegated to league" text, "Promoted to league" text, "Promoted from league" text, "Relegated from league" text )
SELECT "Promoted to league" FROM table_26411 WHERE "Relegated to league" = 'Coventry'
For a team with a goals against less than 58, a position of 10, and a points 2 more than 53, what is the average lost?
CREATE TABLE table_46666 ( "Position" real, "Team" text, "Played" real, "Drawn" real, "Lost" real, "Goals For" real, "Goals Against" real, "Goal Average 1" real, "Points 2" real )
SELECT AVG("Lost") FROM table_46666 WHERE "Goals Against" < '58' AND "Position" = '10' AND "Points 2" > '53'
What is the Score on January 23?
CREATE TABLE table_46084 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
SELECT "Score" FROM table_46084 WHERE "Date" = 'january 23'
How was the native american executed in July 1836?
CREATE TABLE table_69979 ( "Name" text, "Date of Execution" text, "Crime" text, "Method" text, "Race" text )
SELECT "Method" FROM table_69979 WHERE "Race" = 'native american' AND "Date of Execution" = 'july 1836'
What is the finish position for cars by Pontiac driven by Bobby Hamilton?
CREATE TABLE table_27514362_7 ( pos VARCHAR, car_make VARCHAR, driver VARCHAR )
SELECT pos FROM table_27514362_7 WHERE car_make = "Pontiac" AND driver = "Bobby Hamilton"
What conference was the churchill chargers team in?
CREATE TABLE table_11094950_1 ( conference VARCHAR, team VARCHAR )
SELECT conference FROM table_11094950_1 WHERE team = "Churchill Chargers"
What's the score on february 18 when the visitors are the montreal canadiens?
CREATE TABLE table_7871 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
SELECT "Score" FROM table_7871 WHERE "Visitor" = 'montreal canadiens' AND "Date" = 'february 18'
Name the memory for frequency of 1.6 ghz
CREATE TABLE table_21021 ( "Model number" text, "sSpec number" text, "Frequency" text, "GPU frequency" text, "L2 cache" text, "I/O bus" text, "Memory" text, "Voltage" text, "TDP" text, "Socket" text, "Release date" text, "Part number(s)" text, "Release price ( USD )" text )
SELECT "Memory" FROM table_21021 WHERE "Frequency" = '1.6 GHz'
what was the title of the last television appearance she had in 2010 ?
CREATE TABLE table_203_224 ( id number, "title" text, "year" number, "channel" text, "role" text, "notes" text )
SELECT "title" FROM table_203_224 WHERE "year" = 2010 ORDER BY id DESC LIMIT 1
What was the date of game with a score of 42-6?
CREATE TABLE table_32178 ( "Date" text, "Result" text, "Score" text, "Stadium" text, "City" text, "Crowd" real )
SELECT "Date" FROM table_32178 WHERE "Score" = '42-6'
who is the character when the artist is take and the year is before 2006?
CREATE TABLE table_name_75 ( character VARCHAR, artist VARCHAR, year VARCHAR )
SELECT character FROM table_name_75 WHERE artist = "take" AND year < 2006
Which animal has an AP duration of 1.0 and a conduction speed of 7 30?
CREATE TABLE table_41592 ( "Animal" text, "Cell type" text, "Resting potential (mV)" text, "AP increase (mV)" text, "AP duration (ms)" text, "Conduction speed (m/s)" text )
SELECT "Animal" FROM table_41592 WHERE "AP duration (ms)" = '1.0' AND "Conduction speed (m/s)" = '7–30'
What was the attendance when the Braves were the opponent and the record was 56-53?
CREATE TABLE table_name_62 ( attendance INTEGER, opponent VARCHAR, record VARCHAR )
SELECT AVG(attendance) FROM table_name_62 WHERE opponent = "braves" AND record = "56-53"
what college has nhl team chicago black hawks?
CREATE TABLE table_17453 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text )
SELECT "College/junior/club team" FROM table_17453 WHERE "NHL team" = 'Chicago Black Hawks'
On which week was the beatles the original artist and the order # smaller than 10?
CREATE TABLE table_40292 ( "Week #" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" real, "Result" text )
SELECT "Week #" FROM table_40292 WHERE "Original artist" = 'the beatles' AND "Order #" < '10'
What is the average Game, when Date is 'December 23'?
CREATE TABLE table_76591 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT AVG("Game") FROM table_76591 WHERE "Date" = 'december 23'
number of competitions
CREATE TABLE table_203_238 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text )
SELECT COUNT("competition") FROM table_203_238
Which series occurred when the 7800 was 5040.00?
CREATE TABLE table_27680 ( "22/06/2008" text, "Indonesia Super Series 2008" text, "S.Series" text, "7800.00" text, "Runner-Up" text )
SELECT "Indonesia Super Series 2008" FROM table_27680 WHERE "7800.00" = '5040.00'
Which Player had a From club of atl tico madrid?
CREATE TABLE table_6762 ( "Date" text, "Pos." text, "Player" text, "From club" text, "Transfer fee" text )
SELECT "Player" FROM table_6762 WHERE "From club" = 'atlético madrid'
What was the average value for Fall 07 when Fall 09 is less than 296?
CREATE TABLE table_name_99 ( fall_07 INTEGER, fall_09 INTEGER )
SELECT AVG(fall_07) FROM table_name_99 WHERE fall_09 < 296
Which Description has a Year of Issue of 1983, and a Weight of 3.50grams?
CREATE TABLE table_name_67 ( description VARCHAR, year_of_issue VARCHAR, weight VARCHAR )
SELECT description FROM table_name_67 WHERE year_of_issue = 1983 AND weight = "3.50grams"
What is Country, when Score is 71-71-69=211?
CREATE TABLE table_name_26 ( country VARCHAR, score VARCHAR )
SELECT country FROM table_name_26 WHERE score = 71 - 71 - 69 = 211
Bar graph to show the total number from different allergytype, and order by the x axis from high to low.
CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType VARCHAR(20) ) 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) )
SELECT AllergyType, COUNT(*) FROM Allergy_Type GROUP BY AllergyType ORDER BY AllergyType DESC
What is the dpi for the scanner with a max page size of 216mm x 355mm?
CREATE TABLE table_20792 ( "product" text, "dimensions (mm)" text, "dpi" real, "pages per minute (color)" real, "max page size" text, "interface" text )
SELECT "dpi" FROM table_20792 WHERE "max page size" = '216mm x 355mm'
What year did Coenraad Breytenbach have their Int'l Debut?
CREATE TABLE table_65125 ( "Player" text, "Int'l Debut" text, "Year" text, "Cross Code Debut" text, "Date" text, "Position" text )
SELECT "Year" FROM table_65125 WHERE "Player" = 'coenraad breytenbach'
What are the stations in Tarzana?
CREATE TABLE table_2093995_1 ( stations VARCHAR, city__neighborhood VARCHAR )
SELECT stations FROM table_2093995_1 WHERE city__neighborhood = "Tarzana"
What is the total attendance at games with a score of 4-2?
CREATE TABLE table_68750 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
SELECT COUNT("Attendance") FROM table_68750 WHERE "Score" = '4-2'
How many years was there a peter jackson classic?
CREATE TABLE table_name_64 ( year VARCHAR, championship VARCHAR )
SELECT COUNT(year) FROM table_name_64 WHERE championship = "peter jackson classic"
what is the highest qualifying rank where the competition is olympic trials, the final-rank is 4 and qualifying score is 15.100?
CREATE TABLE table_17995 ( "Year" real, "Competition" text, "Location" text, "Event" text, "Final-Rank" text, "Final-Score" text, "Qualifying Rank" real, "Qualifying Score" text )
SELECT MAX("Qualifying Rank") FROM table_17995 WHERE "Competition" = 'Olympic Trials' AND "Final-Rank" = '4' AND "Qualifying Score" = '15.100'
What is the Accreditation Status, when the Product Name is LG RCS-e Client?
CREATE TABLE table_name_83 ( accreditation_status VARCHAR, product_name VARCHAR )
SELECT accreditation_status FROM table_name_83 WHERE product_name = "lg rcs-e client"
What was 2009, when 2001 was, 'not masters series'?
CREATE TABLE table_name_5 ( Id VARCHAR )
SELECT 2009 FROM table_name_5 WHERE 2001 = "not masters series"
who is the first driver listed ?
CREATE TABLE table_204_853 ( id number, "pos" number, "grid" number, "no." number, "driver" text, "team" text, "manufacturer" text, "laps" number, "points" number )
SELECT "driver" FROM table_204_853 WHERE id = 1
Who was the opponent at the game with a result of w 14 6?
CREATE TABLE table_36169 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text )
SELECT "Opponent" FROM table_36169 WHERE "Result" = 'w 14–6'
what is the venue when the competition is asian games, the event is 4x400 m relay and the year is 2002?
CREATE TABLE table_65771 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Event" text )
SELECT "Venue" FROM table_65771 WHERE "Competition" = 'asian games' AND "Event" = '4x400 m relay' AND "Year" = '2002'
What was the attendance when they played the New Orleans Saints?
CREATE TABLE table_8321 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
SELECT "Attendance" FROM table_8321 WHERE "Opponent" = 'new orleans saints'
Show the number of countries for all people whose age is smaller than the average, could you rank in descending by the names?
CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of text ) 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 )
SELECT Country, COUNT(Country) FROM people WHERE Age < (SELECT AVG(Age) FROM people) GROUP BY Country ORDER BY Country DESC
What is Opponent in Final, when Date is '13 January 1992'?
CREATE TABLE table_58904 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in Final" text, "Score in Final" text )
SELECT "Opponent in Final" FROM table_58904 WHERE "Date" = '13 january 1992'
what is the difference in percentage of lead shot at 25 yards between cylinder and skeet 1 barrels ?
CREATE TABLE table_203_112 ( id number, "choke" text, "constriction (inch)" number, "percentage of lead shot in 30-inch circle at 40 yards" text, "identification (notches)" number, "identification (stars)\n(spanish shotguns)" number )
SELECT ABS((SELECT "percentage of lead shot in 30-inch circle at 40 yards" FROM table_203_112 WHERE "choke" = 'cylinder') - (SELECT "percentage of lead shot in 30-inch circle at 40 yards" FROM table_203_112 WHERE "choke" = 'skeet 1'))
Which Position has a Player of bernard thompson?
CREATE TABLE table_name_64 ( position VARCHAR, player VARCHAR )
SELECT position FROM table_name_64 WHERE player = "bernard thompson"
Show different publishers together with the number of publications they have in a bar chart, and I want to order by the bars in asc.
CREATE TABLE book ( Book_ID int, Title text, Issues real, Writer text ) CREATE TABLE publication ( Publication_ID int, Book_ID int, Publisher text, Publication_Date text, Price real )
SELECT Publisher, COUNT(*) FROM publication GROUP BY Publisher ORDER BY Publisher
What is the Original NFL team of the CB Player?
CREATE TABLE table_name_31 ( original_nfl_team VARCHAR, pos VARCHAR )
SELECT original_nfl_team FROM table_name_31 WHERE pos = "cb"
How many communes associated with over 10 cantons and an area (Square km) of 1,589?
CREATE TABLE table_57132 ( "Dep." text, "Chief town" text, "Arrondissement" text, "Population (1999)" text, "Area (Square km)" real, "Pop density" real, "Cantons" real, "Communes" real )
SELECT AVG("Communes") FROM table_57132 WHERE "Cantons" > '10' AND "Area (Square km)" = '1,589'
Who is the driver for laps of 45
CREATE TABLE table_56711 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT "Driver" FROM table_56711 WHERE "Laps" = '45'
What is the total number of electorates in 2009 with a constituency of 193?
CREATE TABLE table_name_83 ( number_of_electorates__2009_ VARCHAR, constituency_number VARCHAR )
SELECT COUNT(number_of_electorates__2009_) FROM table_name_83 WHERE constituency_number = "193"
What is the NFL club with pick # 153?
CREATE TABLE table_59351 ( "Player" text, "Round" real, "Pick" real, "Position" text, "NFL Club" text )
SELECT "NFL Club" FROM table_59351 WHERE "Pick" = '153'
What is the home team when the home team score is 12.17 (89)?
CREATE TABLE table_32804 ( "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_32804 WHERE "Home team score" = '12.17 (89)'
How many members of the military died in the conflict that had a total of 531 casualties?
CREATE TABLE table_name_38 ( military_deaths VARCHAR, total_casualties VARCHAR )
SELECT military_deaths FROM table_name_38 WHERE total_casualties = "531"
Where was the home court on April 14?
CREATE TABLE table_name_34 ( home VARCHAR, date VARCHAR )
SELECT home FROM table_name_34 WHERE date = "april 14"
What is Accolade, when Year is less than 2002, when Publication is 'Rolling Stone', and when Rank is '48'?
CREATE TABLE table_name_76 ( accolade VARCHAR, rank VARCHAR, year VARCHAR, publication VARCHAR )
SELECT accolade FROM table_name_76 WHERE year < 2002 AND publication = "rolling stone" AND rank = 48
What is the away team of the game with an attendance of 117?
CREATE TABLE table_name_58 ( away_team VARCHAR, attendance VARCHAR )
SELECT away_team FROM table_name_58 WHERE attendance = 117
What's the time for someone on grid 9?
CREATE TABLE table_51465 ( "Driver" text, "Constructor" text, "Laps" text, "Time/Retired" text, "Grid" text )
SELECT "Time/Retired" FROM table_51465 WHERE "Grid" = '9'
Which chassis had 16 points?
CREATE TABLE table_15327 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Tyres" text, "Points" real )
SELECT "Chassis" FROM table_15327 WHERE "Points" = '16'
Name the number of events for 3031
CREATE TABLE table_26589 ( "#" real, "Player" text, "Country" text, "Points" real, "Reset points" real, "Events" real )
SELECT COUNT("Events") FROM table_26589 WHERE "Points" = '3031'
what is the county when the year left is 1998?
CREATE TABLE table_name_36 ( county VARCHAR, year_left VARCHAR )
SELECT county FROM table_name_36 WHERE year_left = "1998"
how many different meanings does Wednesday have?
CREATE TABLE table_2624098_1 ( english_day_name_meaning VARCHAR, modern_english_day_name VARCHAR )
SELECT COUNT(english_day_name_meaning) FROM table_2624098_1 WHERE modern_english_day_name = "Wednesday"