context
stringlengths 0
489
| instruction
stringlengths 16
244
| response
stringlengths 38
557
|
---|---|---|
CREATE TABLE table_19161046_1 (notes VARCHAR, model VARCHAR)
|
What are the notes recorded for the model HIS HD4850 (512MB)?
|
SELECT notes FROM table_19161046_1 WHERE model = "HIS HD4850 (512MB)"
|
CREATE TABLE chip_model (Model_name VARCHAR, Launch_year VARCHAR, RAM_MiB VARCHAR); CREATE TABLE phone (Hardware_Model_name VARCHAR, Company_name VARCHAR, chip_model VARCHAR)
|
List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32.
|
SELECT T2.Hardware_Model_name, T2.Company_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 OR T1.RAM_MiB > 32
|
CREATE TABLE phone (screen_mode VARCHAR, Hardware_Model_name VARCHAR); CREATE TABLE screen_mode (Char_cells VARCHAR, Pixels VARCHAR, Hardware_colours VARCHAR, Graphics_mode VARCHAR)
|
Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is "LG-P760".
|
SELECT T1.Char_cells, T1.Pixels, T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = "LG-P760"
|
CREATE TABLE phone (Hardware_Model_name VARCHAR, Company_name VARCHAR, screen_mode VARCHAR); CREATE TABLE screen_mode (Graphics_mode VARCHAR, Type VARCHAR)
|
List the hardware model name and company name for the phone whose screen mode type is "Graphics."
|
SELECT T2.Hardware_Model_name, T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = "Graphics"
|
CREATE TABLE chip_model (Model_name VARCHAR, Launch_year VARCHAR, RAM_MiB VARCHAR); CREATE TABLE phone (Hardware_Model_name VARCHAR, chip_model VARCHAR)
|
List the name of the phone model launched in year 2002 and with the highest RAM size.
|
SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1
|
CREATE TABLE phone (chip_model VARCHAR, screen_mode VARCHAR, Hardware_Model_name VARCHAR); CREATE TABLE chip_model (WiFi VARCHAR, Model_name VARCHAR); CREATE TABLE screen_mode (Type VARCHAR, Graphics_mode VARCHAR)
|
What are the wifi and screen mode type of the hardware model named "LG-P760"?
|
SELECT T1.WiFi, T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = "LG-P760"
|
CREATE TABLE chip_model (Model_name VARCHAR, RAM_MiB VARCHAR); CREATE TABLE phone (Hardware_Model_name VARCHAR, chip_model VARCHAR, screen_mode VARCHAR); CREATE TABLE screen_mode (Graphics_mode VARCHAR, Type VARCHAR)
|
List the hardware model name for the phones that have screen mode type "Text" or RAM size greater than 32.
|
SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name = T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T3.Type = "Text" OR T1.RAM_MiB > 32
|
CREATE TABLE table_name_10 (party VARCHAR, district VARCHAR, results VARCHAR, first_elected VARCHAR)
|
What is Party, when Results is "Re-Elected", when First Elected is greater than 1990, and when District is "Minnesota 4"?
|
SELECT party FROM table_name_10 WHERE results = "re-elected" AND first_elected > 1990 AND district = "minnesota 4"
|
CREATE TABLE phone (Hardware_Model_name VARCHAR, screen_mode VARCHAR); CREATE TABLE screen_mode (Graphics_mode VARCHAR, Type VARCHAR)
|
List the hardware model name for the phons that were produced by "Nokia Corporation" but whose screen mode type is not Text.
|
SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name = "Nokia Corporation" AND T1.Type <> "Text"
|
CREATE TABLE phone (Hardware_Model_name VARCHAR, screen_mode VARCHAR); CREATE TABLE screen_mode (Graphics_mode VARCHAR, Type VARCHAR)
|
List the hardware model name for the phones that were produced by "Nokia Corporation" or whose screen mode type is "Graphics."
|
SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type = "Graphics" OR t2.Company_name = "Nokia Corporation"
|
CREATE TABLE table_1918850_2 (surface VARCHAR, championship VARCHAR, score_in_the_final VARCHAR)
|
state the number of surface where championship is australian open and score in the final is 6–3, 4–6, 11–9
|
SELECT COUNT(surface) FROM table_1918850_2 WHERE championship = "Australian Open" AND score_in_the_final = "6–3, 4–6, 11–9"
|
CREATE TABLE table_name_75 (incumbent VARCHAR, district VARCHAR, results VARCHAR, party VARCHAR)
|
What is Incumbent, when Results is "Re-Elected", when Party is "Democratic", and when District is "Minnesota 7"?
|
SELECT incumbent FROM table_name_75 WHERE results = "re-elected" AND party = "democratic" AND district = "minnesota 7"
|
CREATE TABLE phone (Hardware_Model_name VARCHAR, Company_name VARCHAR, screen_mode VARCHAR); CREATE TABLE screen_mode (Graphics_mode VARCHAR, used_kb INTEGER)
|
List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.
|
SELECT DISTINCT T2.Hardware_Model_name, T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15
|
CREATE TABLE table_1918850_2 (year VARCHAR, opponents_in_the_final VARCHAR)
|
when were helena suková todd woodbridge the opponents in the final
|
SELECT year FROM table_1918850_2 WHERE opponents_in_the_final = "Helena Suková Todd Woodbridge"
|
CREATE TABLE table_1918850_2 (championship VARCHAR, opponents_in_the_final VARCHAR, partner VARCHAR, outcome VARCHAR, surface VARCHAR)
|
which championship had helena suková tom nijssen as opponents in the final and nicole provis as partner, the surface was hard and the outcome was winner
|
SELECT championship FROM table_1918850_2 WHERE outcome = "Winner" AND surface = "Hard" AND partner = "Nicole Provis" AND opponents_in_the_final = "Helena Suková Tom Nijssen"
|
CREATE TABLE chip_model (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR); CREATE TABLE phone (RAM_MiB INTEGER, model_name VARCHAR, chip_model VARCHAR)
|
Find the average ram mib size of the chip models that are never used by any phone.
|
SELECT AVG(RAM_MiB) FROM chip_model WHERE NOT model_name IN (SELECT chip_model FROM phone)
|
CREATE TABLE phone (Accreditation_level VARCHAR)
|
Find the accreditation level that more than 3 phones use.
|
SELECT Accreditation_level FROM phone GROUP BY Accreditation_level HAVING COUNT(*) > 3
|
CREATE TABLE phone (screen_mode VARCHAR, Accreditation_type VARCHAR); CREATE TABLE screen_mode (pixels VARCHAR, Graphics_mode VARCHAR)
|
Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.
|
SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode = t2.screen_mode WHERE t2.Accreditation_type = 'Full'
|
CREATE TABLE table_19189856_1 (last_performance VARCHAR, performer VARCHAR)
|
what is the last performance of leon varkas category:articles with hcards
|
SELECT last_performance FROM table_19189856_1 WHERE performer = "Leon Varkas category:Articles with hCards"
|
CREATE TABLE table_19210674_1 (finale VARCHAR, english_title VARCHAR)
|
How many different finales had the English title "Beyond the Realm of Conscience"?
|
SELECT COUNT(finale) FROM table_19210674_1 WHERE english_title = "Beyond the Realm of Conscience"
|
CREATE TABLE match_season (POSITION VARCHAR, College VARCHAR)
|
Show the distinct position of players from college UCLA or Duke.
|
SELECT DISTINCT POSITION FROM match_season WHERE College = "UCLA" OR College = "Duke"
|
CREATE TABLE match_season (Season VARCHAR, Player VARCHAR, Country VARCHAR); CREATE TABLE country (Country_name VARCHAR, Country_id VARCHAR)
|
Show the season, the player, and the name of the country that player belongs to.
|
SELECT T2.Season, T2.Player, T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country
|
CREATE TABLE country (Country_id VARCHAR, Country_name VARCHAR); CREATE TABLE match_season (Player VARCHAR, Country VARCHAR)
|
Which players are from Indonesia?
|
SELECT T2.Player FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Country_name = "Indonesia"
|
CREATE TABLE table_name_55 (money___ INTEGER, to_par VARCHAR, country VARCHAR)
|
What is the average money for a to par of 15, and is from the United States?
|
SELECT AVG(money___) AS $__ FROM table_name_55 WHERE to_par = 15 AND country = "united states"
|
CREATE TABLE country (Country_id VARCHAR, Capital VARCHAR); CREATE TABLE match_season (Position VARCHAR, Country VARCHAR)
|
What are the distinct positions of the players from a country whose capital is Dublin?
|
SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T1.Capital = "Dublin"
|
CREATE TABLE country (Official_native_language VARCHAR, Country_id VARCHAR); CREATE TABLE match_season (Country VARCHAR, Position VARCHAR)
|
How many distinct official languages are there among countries of players whose positions are defenders.
|
SELECT COUNT(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender"
|
CREATE TABLE country (Official_native_language VARCHAR, Country_id VARCHAR); CREATE TABLE match_season (Country VARCHAR, College VARCHAR)
|
What are the official languages of the countries of players from Maryland or Duke college?
|
SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.College = "Maryland" OR T2.College = "Duke"
|
CREATE TABLE match_season (Position VARCHAR, Team VARCHAR); CREATE TABLE team (Team_id VARCHAR, Name VARCHAR)
|
Show the positions of the players from the team with name "Ryley Goldner".
|
SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Ryley Goldner"
|
CREATE TABLE match_season (College VARCHAR, Team VARCHAR); CREATE TABLE team (Team_id VARCHAR, Name VARCHAR)
|
How many distinct colleges are associated with players from the team with name "Columbus Crew".
|
SELECT COUNT(DISTINCT T1.College) FROM match_season AS T1 JOIN team AS T2 ON T1.Team = T2.Team_id WHERE T2.Name = "Columbus Crew"
|
CREATE TABLE table_name_61 (grid VARCHAR, time_retired VARCHAR, laps VARCHAR, manufacturer VARCHAR)
|
Which Grid has more than 8 Laps, and a Manufacturer of honda, and a Time/Retired of retirement?
|
SELECT grid FROM table_name_61 WHERE laps > 8 AND manufacturer = "honda" AND time_retired = "retirement"
|
CREATE TABLE table_name_97 (laps INTEGER, grid VARCHAR, time_retired VARCHAR)
|
How many Laps have a Grid smaller than 5, and a Time/Retired of retirement?
|
SELECT SUM(laps) FROM table_name_97 WHERE grid < 5 AND time_retired = "retirement"
|
CREATE TABLE match_season (College VARCHAR)
|
Show the name of colleges that have at least two players in descending alphabetical order.
|
SELECT College FROM match_season GROUP BY College HAVING COUNT(*) >= 2 ORDER BY College DESC
|
CREATE TABLE country (Country_name VARCHAR, Country_id VARCHAR); CREATE TABLE match_season (Country VARCHAR, Position VARCHAR)
|
What are the names of countries that have both players with position forward and players with position defender?
|
SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country WHERE T2.Position = "Defender"
|
CREATE TABLE table_1926240_1 (informational_cvbs_lines VARCHAR, max_characters__per_page_row_ VARCHAR, standard VARCHAR)
|
What was the informational CVBS Lines of the encoding with max character of 32 and has B (global) standard?
|
SELECT informational_cvbs_lines FROM table_1926240_1 WHERE max_characters__per_page_row_ = 32 AND standard = "B (global)"
|
CREATE TABLE climber (Points INTEGER, Country VARCHAR)
|
What is the maximum point for climbers whose country is United Kingdom?
|
SELECT MAX(Points) FROM climber WHERE Country = "United Kingdom"
|
CREATE TABLE mountain (Height VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Name VARCHAR, Mountain_ID VARCHAR)
|
Show the names of climbers and the heights of mountains they climb.
|
SELECT T1.Name, T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID
|
CREATE TABLE table_name_13 (tournaments INTEGER, pro_debut VARCHAR)
|
What is the highest Tournaments, when Pro Debut is "July 2002"?
|
SELECT MAX(tournaments) FROM table_name_13 WHERE pro_debut = "july 2002"
|
CREATE TABLE table_name_90 (league_cup_goals VARCHAR, total_goals VARCHAR, name VARCHAR)
|
How many League Cup Goals have 0 as the total goals, with delroy facey as the name?
|
SELECT COUNT(league_cup_goals) FROM table_name_90 WHERE total_goals = 0 AND name = "delroy facey"
|
CREATE TABLE mountain (Mountain_ID VARCHAR, Country VARCHAR); CREATE TABLE climber (Time VARCHAR, Mountain_ID VARCHAR)
|
Show the times used by climbers to climb mountains in Country Uganda.
|
SELECT T1.Time FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T2.Country = "Uganda"
|
CREATE TABLE mountain (Name VARCHAR, Mountain_ID VARCHAR); CREATE TABLE climber (Mountain_ID VARCHAR, Country VARCHAR)
|
Show the distinct names of mountains climbed by climbers from country "West Germany".
|
SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID = T2.Mountain_ID WHERE T1.Country = "West Germany"
|
CREATE TABLE table_name_80 (total_goals VARCHAR, total_apps VARCHAR, league_goals VARCHAR)
|
How many total goals have 0 (3) as total apps, with league goals less than 0?
|
SELECT COUNT(total_goals) FROM table_name_80 WHERE total_apps = "0 (3)" AND league_goals < 0
|
CREATE TABLE body_builder (People_ID VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
|
What are the names of body builders?
|
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID
|
CREATE TABLE people (Name VARCHAR, People_ID VARCHAR); CREATE TABLE body_builder (People_ID VARCHAR, Total INTEGER)
|
What are the names of body builders whose total score is higher than 300?
|
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total > 300
|
CREATE TABLE body_builder (People_ID VARCHAR, Total VARCHAR); CREATE TABLE people (Birth_Date VARCHAR, Birth_Place VARCHAR, People_ID VARCHAR)
|
What are the birth date and birth place of the body builder with the highest total points?
|
SELECT T2.Birth_Date, T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC LIMIT 1
|
CREATE TABLE people (Height VARCHAR, People_ID VARCHAR); CREATE TABLE body_builder (People_ID VARCHAR, Total INTEGER)
|
What are the heights of body builders with total score smaller than 315?
|
SELECT T2.Height FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T1.Total < 315
|
CREATE TABLE people (People_ID VARCHAR, Height INTEGER); CREATE TABLE body_builder (Total INTEGER, People_ID VARCHAR)
|
What is the average total score of body builders with height bigger than 200?
|
SELECT AVG(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID WHERE T2.Height > 200
|
CREATE TABLE body_builder (People_ID VARCHAR, Total VARCHAR); CREATE TABLE people (Name VARCHAR, People_ID VARCHAR)
|
What are the names of body builders in descending order of total scores?
|
SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID = T2.People_ID ORDER BY T1.Total DESC
|
CREATE TABLE people (Birth_Place VARCHAR)
|
What is the most common birth place of people?
|
SELECT Birth_Place FROM people GROUP BY Birth_Place ORDER BY COUNT(*) DESC LIMIT 1
|
CREATE TABLE table_1939202_2 (year VARCHAR, us_open_cup VARCHAR, league VARCHAR, playoffs VARCHAR)
|
What year at the US Open Cup quarterfinals, were the playoffs in the semifinals for the USL second division?
|
SELECT year FROM table_1939202_2 WHERE league = "USL Second division" AND playoffs = "Semifinals" AND us_open_cup = "Quarterfinals"
|
CREATE TABLE people (Name VARCHAR, birth_place VARCHAR, people_id VARCHAR); CREATE TABLE body_builder (people_id VARCHAR); CREATE TABLE people (Name VARCHAR, birth_place VARCHAR)
|
List the names and origins of people who are not body builders.
|
SELECT Name, birth_place FROM people EXCEPT SELECT T1.Name, T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id = T2.people_id
|
CREATE TABLE people (weight VARCHAR, people_id VARCHAR, height VARCHAR); CREATE TABLE body_builder (people_id VARCHAR, snatch VARCHAR)
|
List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.
|
SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T1.snatch > 140 OR T2.height > 200
|
CREATE TABLE table_19401346_1 (no_in_series INTEGER, us_viewers__millions_ VARCHAR)
|
What's the series number of the episode seen by 9.35 million people in the US?
|
SELECT MIN(no_in_series) FROM table_19401346_1 WHERE us_viewers__millions_ = "9.35"
|
CREATE TABLE people (people_id VARCHAR, Birth_Date VARCHAR); CREATE TABLE body_builder (total VARCHAR, people_id VARCHAR)
|
What are the total scores of the body builders whose birthday contains the string "January" ?
|
SELECT T1.total FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id WHERE T2.Birth_Date LIKE "%January%"
|
CREATE TABLE table_name_19 (gold INTEGER, bronze VARCHAR, total VARCHAR, nation VARCHAR)
|
What is the average number of gold medals won by Brazil for entries with more than 1 bronze medal but a total smaller than 4?
|
SELECT AVG(gold) FROM table_name_19 WHERE total < 4 AND nation = "brazil" AND bronze > 1
|
CREATE TABLE table_1940144_1 (change_since_2006 VARCHAR, county VARCHAR)
|
How many places did the rank change since 22006 for County Leitrim?
|
SELECT COUNT(change_since_2006) FROM table_1940144_1 WHERE county = "county Leitrim"
|
CREATE TABLE election (Date VARCHAR, Representative_ID VARCHAR); CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR)
|
What are the names of representatives and the dates of elections they participated in.
|
SELECT T2.Name, T1.Date FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID
|
CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR)
|
What are the names of representatives in descending order of votes?
|
SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes DESC
|
CREATE TABLE representative (Party VARCHAR, Representative_ID VARCHAR); CREATE TABLE election (Representative_ID VARCHAR)
|
What is the party of the representative that has the smallest number of votes.
|
SELECT T2.Party FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID ORDER BY votes LIMIT 1
|
CREATE TABLE table_19418696_3 (qb_rating VARCHAR, completions VARCHAR)
|
How many QB ratings for the player with 1069 completions?
|
SELECT COUNT(qb_rating) FROM table_19418696_3 WHERE completions = 1069
|
CREATE TABLE election (Votes INTEGER, Representative_ID VARCHAR); CREATE TABLE representative (Representative_ID VARCHAR, Party VARCHAR)
|
What is the average number of votes of representatives from party "Republican"?
|
SELECT AVG(T1.Votes) FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID = T2.Representative_ID WHERE T2.Party = "Republican"
|
CREATE TABLE election (Name VARCHAR, Representative_ID VARCHAR); CREATE TABLE representative (Name VARCHAR, Representative_ID VARCHAR)
|
List the names of representatives that have not participated in elections listed here.
|
SELECT Name FROM representative WHERE NOT Representative_ID IN (SELECT Representative_ID FROM election)
|
CREATE TABLE representative (Party VARCHAR, State VARCHAR)
|
Show the parties that have both representatives in New York state and representatives in Pennsylvania state.
|
SELECT Party FROM representative WHERE State = "New York" INTERSECT SELECT Party FROM representative WHERE State = "Pennsylvania"
|
CREATE TABLE table_19412902_1 (clubs VARCHAR, group_stage VARCHAR, member_association VARCHAR)
|
which club in group stage 4 had member association iran
|
SELECT clubs FROM table_19412902_1 WHERE group_stage = 4 AND member_association = "Iran"
|
CREATE TABLE table_name_42 (domestic_tournament VARCHAR, team VARCHAR)
|
What is the Domestic Tournament with Chennai Super Kings Team?
|
SELECT domestic_tournament FROM table_name_42 WHERE team = "chennai super kings"
|
CREATE TABLE table_name_30 (money___$__ VARCHAR, player VARCHAR)
|
What is Lawson Little's Money ($) amount?
|
SELECT money___$__ FROM table_name_30 WHERE player = "lawson little"
|
CREATE TABLE table_19451173_1 (division_titles VARCHAR, win_pct VARCHAR)
|
How many division titles are there when the win pc is .558?
|
SELECT division_titles FROM table_19451173_1 WHERE win_pct = ".558"
|
CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR); CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
|
Show the apartment numbers, start dates, and end dates of all the apartment bookings.
|
SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id
|
CREATE TABLE Apartments (apt_id VARCHAR, apt_type_code VARCHAR); CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, apt_id VARCHAR)
|
What are the booking start and end dates of the apartments with type code "Duplex"?
|
SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_type_code = "Duplex"
|
CREATE TABLE table_19457_1 (town_ships INTEGER, village_groups VARCHAR)
|
How many townships are there in the region with 376 village groups?
|
SELECT MAX(town_ships) FROM table_19457_1 WHERE village_groups = 376
|
CREATE TABLE Apartments (apt_id VARCHAR, apt_number VARCHAR); CREATE TABLE Apartment_Bookings (booking_status_code VARCHAR, apt_id VARCHAR)
|
What is the booking status code of the apartment with apartment number "Suite 634"?
|
SELECT T1.booking_status_code FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.apt_number = "Suite 634"
|
CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR); CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR)
|
Show the distinct apartment numbers of the apartments that have bookings with status code "Confirmed".
|
SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed"
|
CREATE TABLE table_19487922_1 (name VARCHAR, country VARCHAR, race_entries__starts_ VARCHAR)
|
Who is the competitor from France with 10 starts?
|
SELECT name FROM table_19487922_1 WHERE country = "France" AND race_entries__starts_ = "10"
|
CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, guest_id VARCHAR); CREATE TABLE Guests (guest_first_name VARCHAR, guest_id VARCHAR)
|
Show the guest first names, start dates, and end dates of all the apartment bookings.
|
SELECT T2.guest_first_name, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id
|
CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR, guest_id VARCHAR); CREATE TABLE Guests (guest_id VARCHAR, gender_code VARCHAR)
|
Show the start dates and end dates of all the apartment bookings made by guests with gender code "Female".
|
SELECT T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female"
|
CREATE TABLE table_name_73 (down__up_to_kbit_s_ INTEGER, provider VARCHAR, up__up_to_kbit_s_ VARCHAR)
|
What is the average down (up to kbit/s) when the provider is willy.tel and the up (kbit/s) is more than 1984?
|
SELECT AVG(down__up_to_kbit_s_) FROM table_name_73 WHERE provider = "willy.tel" AND up__up_to_kbit_s_ > 1984
|
CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR); CREATE TABLE Apartments (apt_id VARCHAR)
|
Show the average room count of the apartments that have booking status code "Provisional".
|
SELECT AVG(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional"
|
CREATE TABLE table_19487922_2 (championships VARCHAR, country VARCHAR)
|
How many championships does Pakistan have?
|
SELECT COUNT(championships) FROM table_19487922_2 WHERE country = "Pakistan"
|
CREATE TABLE Apartment_Buildings (building_id VARCHAR, building_short_name VARCHAR); CREATE TABLE Apartments (room_count INTEGER, building_id VARCHAR)
|
Show the total number of rooms of the apartments in the building with short name "Columbus Square".
|
SELECT SUM(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_short_name = "Columbus Square"
|
CREATE TABLE Apartment_Facilities (facility_code VARCHAR, apt_id VARCHAR); CREATE TABLE Apartments (apt_id VARCHAR, bedroom_count INTEGER)
|
Show the facility codes of apartments with more than 4 bedrooms.
|
SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T2.bedroom_count > 4
|
CREATE TABLE Apartment_Buildings (building_id VARCHAR, building_manager VARCHAR); CREATE TABLE Apartments (apt_type_code VARCHAR, apt_number VARCHAR, building_id VARCHAR)
|
Show the apartment type codes and apartment numbers in the buildings managed by "Kyle".
|
SELECT T2.apt_type_code, T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id = T2.building_id WHERE T1.building_manager = "Kyle"
|
CREATE TABLE table_name_77 (show VARCHAR, award VARCHAR)
|
Which Show has an Award of indian television academy awards?
|
SELECT show FROM table_name_77 WHERE award = "indian television academy awards"
|
CREATE TABLE Apartment_Bookings (guest_id VARCHAR, booking_status_code VARCHAR); CREATE TABLE Guests (guest_first_name VARCHAR, guest_last_name VARCHAR, guest_id VARCHAR)
|
Show the first names and last names of all the guests that have apartment bookings with status code "Confirmed".
|
SELECT T2.guest_first_name, T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T1.booking_status_code = "Confirmed"
|
CREATE TABLE table_1949994_7 (format VARCHAR, end_date VARCHAR)
|
What's the format of the season that ended on June 25?
|
SELECT format FROM table_1949994_7 WHERE end_date = "June 25"
|
CREATE TABLE Apartments (apt_type_code VARCHAR)
|
Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.
|
SELECT apt_type_code, COUNT(*) FROM Apartments GROUP BY apt_type_code ORDER BY COUNT(*)
|
CREATE TABLE table_name_54 (circuit VARCHAR, team VARCHAR, city___state VARCHAR)
|
What is Circuit, when Team is "R.J.MacArthur Onslow", and when City / State is "Sydney , New South Wales"?
|
SELECT circuit FROM table_name_54 WHERE team = "r.j.macarthur onslow" AND city___state = "sydney , new south wales"
|
CREATE TABLE table_19501664_1 (us_viewers__millions_ VARCHAR, directed_by VARCHAR)
|
Name the viewers for the episode directed by tony phelan
|
SELECT us_viewers__millions_ FROM table_19501664_1 WHERE directed_by = "Tony Phelan"
|
CREATE TABLE Apartments (apt_type_code VARCHAR, bathroom_count INTEGER)
|
Show the most common apartment type code among apartments with more than 1 bathroom.
|
SELECT apt_type_code FROM Apartments WHERE bathroom_count > 1 GROUP BY apt_type_code ORDER BY COUNT(*) DESC LIMIT 1
|
CREATE TABLE table_name_80 (year VARCHAR, actor VARCHAR, film VARCHAR, category VARCHAR)
|
What year was Jennifer Tilly's Film of Bullets Over Broadway up in the best supporting actress category?
|
SELECT year FROM table_name_80 WHERE film = "bullets over broadway" AND category = "best supporting actress" AND actor = "jennifer tilly"
|
CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR); CREATE TABLE Apartment_Bookings (apt_id VARCHAR, booking_status_code VARCHAR)
|
Show the apartment numbers of apartments with bookings that have status code both "Provisional" and "Confirmed"
|
SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Confirmed" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.booking_status_code = "Provisional"
|
CREATE TABLE View_Unit_Status (apt_id VARCHAR, available_yn VARCHAR); CREATE TABLE Apartments (apt_number VARCHAR, apt_id VARCHAR)
|
Show the apartment numbers of apartments with unit status availability of both 0 and 1.
|
SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id = T2.apt_id WHERE T2.available_yn = 1
|
CREATE TABLE table_name_78 (result VARCHAR, actor VARCHAR, year VARCHAR, category VARCHAR)
|
What is the result of Samantha Morton being up for best supporting actress in a year later than 1989?
|
SELECT result FROM table_name_78 WHERE year > 1989 AND category = "best supporting actress" AND actor = "samantha morton"
|
CREATE TABLE Apartment_Facilities (apt_id VARCHAR); CREATE TABLE Apartments (apt_id VARCHAR)
|
How many apartments do not have any facility?
|
SELECT COUNT(*) FROM Apartments WHERE NOT apt_id IN (SELECT apt_id FROM Apartment_Facilities)
|
CREATE TABLE table_name_93 (wins VARCHAR, glenelg_fl VARCHAR, byes VARCHAR)
|
How many wins did Glenelg FL of bahgallah have when there were more than 3 byes?
|
SELECT COUNT(wins) FROM table_name_93 WHERE glenelg_fl = "bahgallah" AND byes > 3
|
CREATE TABLE table_19508635_1 (order__number VARCHAR, theme VARCHAR)
|
Name the order number for 1960s
|
SELECT order__number FROM table_19508635_1 WHERE theme = "1960s"
|
CREATE TABLE stadium (name VARCHAR, id VARCHAR); CREATE TABLE injury_accident (game_id VARCHAR, injury VARCHAR); CREATE TABLE game (season VARCHAR, stadium_id VARCHAR, id VARCHAR)
|
In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?
|
SELECT T1.season, T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.injury = 'Foot injury' OR T3.injury = 'Knee problem'
|
CREATE TABLE stadium (id VARCHAR, name VARCHAR); CREATE TABLE injury_accident (game_id VARCHAR); CREATE TABLE game (stadium_id VARCHAR, id VARCHAR)
|
What are the id and name of the stadium where the most injury accidents happened?
|
SELECT T1.id, T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id = T2.stadium_id JOIN injury_accident AS T3 ON T2.id = T3.game_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1
|
CREATE TABLE stadium (name VARCHAR, id VARCHAR); CREATE TABLE game (stadium_id VARCHAR, id VARCHAR); CREATE TABLE injury_accident (game_id VARCHAR, player VARCHAR)
|
List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.
|
SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Walter Samuel' INTERSECT SELECT T2.name FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id WHERE T3.player = 'Thiago Motta'
|
CREATE TABLE stadium (name VARCHAR, average_attendance VARCHAR, total_attendance VARCHAR, id VARCHAR); CREATE TABLE stadium (name VARCHAR, average_attendance VARCHAR, total_attendance VARCHAR); CREATE TABLE game (stadium_id VARCHAR, id VARCHAR); CREATE TABLE injury_accident (game_id VARCHAR)
|
Show the name, average attendance, total attendance for stadiums where no accidents happened.
|
SELECT name, average_attendance, total_attendance FROM stadium EXCEPT SELECT T2.name, T2.average_attendance, T2.total_attendance FROM game AS T1 JOIN stadium AS T2 ON T1.stadium_id = T2.id JOIN injury_accident AS T3 ON T1.id = T3.game_id
|
CREATE TABLE table_name_18 (league VARCHAR, away VARCHAR)
|
What league has 2-3 as the away?
|
SELECT league FROM table_name_18 WHERE away = "2-3"
|
CREATE TABLE table_name_96 (winner VARCHAR, circuit VARCHAR, series VARCHAR)
|
Who was the Winner in the AMC Round 4 at Lakeside International Raceway?
|
SELECT winner FROM table_name_96 WHERE circuit = "lakeside international raceway" AND series = "amc round 4"
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.