instruction stringlengths 212 6.3k | output stringlengths 6 2.03k |
|---|---|
### Instruction:
CREATE TABLE companies (
id number,
name text,
headquarters text,
industry text,
sales_billion number,
profits_billion number,
assets_billion number,
market_value_billion text
)
CREATE TABLE office_locations (
building_id number,
company_id number,
move_in_y... | SELECT industry FROM companies GROUP BY industry ORDER BY COUNT(*) DESC LIMIT 1 |
### Instruction:
CREATE TABLE table_66849 (
"Vehicle Flight #" text,
"Date" text,
"Pilot" text,
"Mach" real,
"Velocity (km/h)" real,
"Altitude (ft)" real,
"Duration" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest altitude ... | SELECT MIN("Altitude (ft)") FROM table_66849 WHERE "Mach" > '0.905' AND "Duration" = '00:06:17' |
### Instruction:
CREATE TABLE table_41613 (
"Name" text,
"Subdivisions" text,
"Area (km\u00b2)" real,
"Population (1 July 2005 est.)" real,
"Population density (per km\u00b2)" real,
"Capital" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What i... | SELECT MIN("Population (1 July 2005 est.)") FROM table_41613 WHERE "Population density (per km\u00b2)" = '0' |
### Instruction:
CREATE TABLE table_45894 (
"Technology" text,
"\u03b7 (%)" real,
"V OC (V)" text,
"I SC (A)" text,
"W/m\u00b2" text,
"t (\u00b5m)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is W/m , when (%) is greater than 16.5, and w... | SELECT "W/m\u00b2" FROM table_45894 WHERE "\u03b7 (%)" > '16.5' AND "Technology" = 'mj' |
### Instruction:
CREATE TABLE table_11223 (
"Name" text,
"Area (km 2 )" real,
"Population Estimate 2005" real,
"Population Census 2010" real,
"Capital" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the highest area (km2) with a population e... | SELECT MAX("Area (km 2 )") FROM table_11223 WHERE "Population Estimate 2005" < '93,116' AND "Name" = 'polewali mandar regency' |
### Instruction:
CREATE TABLE table_22471 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" text,
"Water (sqmi)" text,
"Latitude" text,
"Longitude" text,
"GEO ID" real,
"ANSI code" real
)
-- Using valid SQLite, answer the following questions for the tables provi... | SELECT "Land ( sqmi )" FROM table_22471 WHERE "GEO ID" = '3801947380' |
### Instruction:
CREATE TABLE table_204_970 (
id number,
"year" number,
"award" text,
"category" text,
"title" text,
"result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how long after his first best actor academy award , did mr. borgnine rec... | SELECT ABS((SELECT "year" FROM table_204_970 WHERE "category" = 'best actor' AND "award" = 'academy award') - (SELECT "year" FROM table_204_970 WHERE "award" = 'screen actors guild life achievement award')) |
### Instruction:
CREATE TABLE table_24750 (
"Country" text,
"Area (000s)" text,
"1950 (mil)" text,
"1970 (mil)" text,
"1980 (mil)" text,
"1985 (mil)" text,
"Annual Growth (1950\u20131985)" text,
"Density (1980)" text
)
-- Using valid SQLite, answer the following questions for the table... | SELECT "Country" FROM table_24750 WHERE "1970 (mil)" = '2.16' |
### Instruction:
CREATE TABLE appellations (
no number,
appelation text,
county text,
state text,
area text,
isava text
)
CREATE TABLE wine (
no number,
grape text,
winery text,
appelation text,
state text,
name text,
year number,
price number,
score number,
... | SELECT name FROM wine WHERE score > 90 |
### Instruction:
CREATE TABLE tryout (
pid number,
cname text,
ppos text,
decision text
)
CREATE TABLE college (
cname text,
state text,
enr number
)
CREATE TABLE player (
pid number,
pname text,
ycard text,
hs number
)
-- Using valid SQLite, answer the following question... | SELECT MAX(T1.hs), ppos FROM player AS T1 JOIN tryout AS T2 ON T1.pid = T2.pid WHERE T1.hs > 1000 GROUP BY T2.ppos |
### Instruction:
CREATE TABLE table_19038 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
)
-- Using valid SQLite,... | SELECT "Try bonus" FROM table_19038 WHERE "Club" = 'Abercwmboi RFC' |
### Instruction:
CREATE TABLE table_16605 (
"Date" text,
"Founder" text,
"Extroversion Scales" text,
"People-task orientation scale" text,
"Introverted, Task-Oriented" text,
"Extroverted, Task-Oriented" text,
"Extroverted, Relationship-Oriented" text,
"Introverted, Relationship Oriented"... | SELECT "Founder" FROM table_16605 WHERE "Moderate" = 'ether' |
### Instruction:
CREATE TABLE journal_committee (
Editor_ID int,
Journal_ID int,
Work_Type text
)
CREATE TABLE editor (
Editor_ID int,
Name text,
Age real
)
CREATE TABLE journal (
Journal_ID int,
Date text,
Theme text,
Sales int
)
-- Using valid SQLite, answer the following q... | SELECT Name, COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID = T2.Editor_ID GROUP BY T1.Editor_ID ORDER BY Name |
### Instruction:
CREATE TABLE device (
Device_ID int,
Device text,
Carrier text,
Package_Version text,
Applications text,
Software_Platform text
)
CREATE TABLE shop (
Shop_ID int,
Shop_Name text,
Location text,
Open_Date text,
Open_Year int
)
CREATE TABLE stock (
Shop_I... | SELECT Location, COUNT(Location) FROM shop GROUP BY Location ORDER BY COUNT(Location) |
### Instruction:
CREATE TABLE order_items (
product_id VARCHAR,
order_id VARCHAR
)
CREATE TABLE customers (
customer_id VARCHAR,
customer_name VARCHAR
)
CREATE TABLE customer_orders (
customer_id VARCHAR,
order_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables... | SELECT COUNT(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id = t2.customer_id JOIN order_items AS t3 ON t2.order_id = t3.order_id WHERE t1.customer_name = "Rodrick Heaney" |
### Instruction:
CREATE TABLE table_73920 (
"Outcome" text,
"No." text,
"Date" text,
"Championship" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the score in the... | SELECT "Opponent in the final" FROM table_73920 WHERE "Score in the final" = '3–6, 6–4, 3–6, 4–6' |
### Instruction:
CREATE TABLE table_203_794 (
id number,
"year" number,
"location" text,
"attendance" number,
"theme phrase" text,
"top messages" text,
"host" text,
"opening general session guest(s)" text,
"closing general session guest(s)" text,
"sunday night reception" text,
... | SELECT COUNT(*) FROM table_203_794 WHERE "location" = 'orlando' |
### Instruction:
CREATE TABLE exhibition_record (
exhibition_id number,
date text,
attendance number
)
CREATE TABLE artist (
artist_id number,
name text,
country text,
year_join number,
age number
)
CREATE TABLE exhibition (
exhibition_id number,
year number,
theme text,
... | SELECT AVG(ticket_price), MIN(ticket_price), MAX(ticket_price) FROM exhibition WHERE year < 2009 |
### Instruction:
CREATE TABLE table_43633 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" real,
"Time" text,
"Location" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Event, when Round is '1', ... | SELECT "Event" FROM table_43633 WHERE "Round" = '1' AND "Location" = 'new town, north dakota , united states' AND "Time" = '4:12' |
### Instruction:
CREATE TABLE table_8883 (
"Episode" text,
"Air Date" text,
"Timeslot" text,
"Rating" real,
"Share" real,
"18-49" text,
"Viewers" text,
"Weekly Rank" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest Share... | SELECT MIN("Share") FROM table_8883 WHERE "Rating" > '1.3' AND "Air Date" = 'may 28, 2008' |
### Instruction:
CREATE TABLE table_40495 (
"Pos." real,
"Driver" text,
"Qualifying" real,
"Race 1" text,
"Race 2" text,
"Race 3" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of positions with less t... | SELECT COUNT("Pos.") FROM table_40495 WHERE "Points" < '10' AND "Qualifying" > '7' AND "Race 1" = 'ret' AND "Driver" = 'jonathan grant' |
### Instruction:
CREATE TABLE table_28683 (
"Fluorescent dye" text,
"Color" text,
"mass (g/mol)" real,
"Absorb (nm)" real,
"Emit (nm)" real,
"\u03b5 (M \u22121 cm \u22121 )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the (m 1 cm 1 ) ... | SELECT "\u03b5 (M \u22121 cm \u22121 )" FROM table_28683 WHERE "Color" = 'orange' |
### Instruction:
CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr ... | SELECT state, MIN(enr) FROM College GROUP BY state ORDER BY state |
### Instruction:
CREATE TABLE table_44904 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the title of the show with less than 10... | SELECT "Title" FROM table_44904 WHERE "Season #" < '10' AND "Directed by" = 'milan cheylov' AND "Original air date" = 'september 29, 1997' |
### Instruction:
CREATE TABLE personfriend (
name text,
friend text,
year number
)
CREATE TABLE person (
name text,
age number,
city text,
gender text,
job text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the name and age of the pers... | SELECT T1.name, T1.age FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Dan' INTERSECT SELECT T1.name, T1.age FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Alice' |
### Instruction:
CREATE TABLE table_22514 (
"Number" real,
"Sanskrit" text,
"International Alphabet of Sanskrit Transliteration" text,
"Sanskrit gloss" text,
"Western name" text,
"Greek" text,
"Gloss" text,
"Tattva (Element)" text,
"Quality" text,
"Ruling Planet" text
)
-- Usin... | SELECT "Sanskrit gloss" FROM table_22514 WHERE "Western name" = 'Sagittarius' |
### Instruction:
CREATE TABLE table_34031 (
"Team" text,
"Average" real,
"Points" real,
"Played" real,
"1986-87" text,
"1987-88" text,
"1988-89" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the highest Average that has a 1987-88 of ... | SELECT MAX("Average") FROM table_34031 WHERE "1987-88" = '55' AND "Played" > '114' |
### Instruction:
CREATE TABLE table_13025 (
"Rank" real,
"Map Reference Number" real,
"Census Statistical Area" text,
"2007 Population" real,
"Lake(s)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average map reference number for Lake ... | SELECT AVG("Map Reference Number") FROM table_13025 WHERE "Lake(s)" = 'lake michigan' AND "Rank" > '15' AND "2007 Population" < '114,504' |
### Instruction:
CREATE TABLE table_75393 (
"Game" real,
"March" real,
"Opponent" text,
"Score" text,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Score has a March larger than 15, and Points larger than 96, and a... | SELECT "Score" FROM table_75393 WHERE "March" > '15' AND "Points" > '96' AND "Game" < '76' AND "Opponent" = '@ washington capitals' |
### Instruction:
CREATE TABLE table_name_78 (
right_ascension___j2000__ VARCHAR,
declination___j2000__ VARCHAR,
object_type VARCHAR,
constellation VARCHAR,
ngc_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the right ascension for sag... | SELECT right_ascension___j2000__ FROM table_name_78 WHERE constellation = "sagittarius" AND ngc_number > 6522 AND object_type = "open cluster" AND declination___j2000__ = "°22′" |
### Instruction:
CREATE TABLE table_11101 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the crowd was larger than ... | SELECT "Away team score" FROM table_11101 WHERE "Crowd" > '22,283' AND "Home team score" = '23.13 (151)' |
### Instruction:
CREATE TABLE table_36230 (
"Air Date" text,
"Rating" real,
"Share" real,
"18-49" text,
"Viewers [Live] (m)" real,
"Viewers [DVR+7] (m)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the rating that has live viewers over... | SELECT "Rating" FROM table_36230 WHERE "Viewers [Live] (m)" > '3.06' AND "Viewers [DVR+7] (m)" = '5.36' |
### Instruction:
CREATE TABLE table_27811 (
"Position" real,
"Sail number" text,
"Yacht" text,
"State/country" text,
"Yacht type" text,
"LOA (Metres)" text,
"Skipper" text,
"Elapsed time d:hh:mm:ss" text
)
-- Using valid SQLite, answer the following questions for the tables provided ab... | SELECT "Skipper" FROM table_27811 WHERE "Elapsed time d:hh:mm:ss" = '3:07:39:33' |
### Instruction:
CREATE TABLE table_78639 (
"Team" text,
"2003\u201304 Pts" text,
"2004\u201305 Pts" text,
"2001\u201302 Pts" real,
"Total Pts" real,
"Total Pld" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Total Pts have a 2001 02 Pts s... | SELECT MIN("Total Pts") FROM table_78639 WHERE "2001\u201302 Pts" < '38' |
### Instruction:
CREATE TABLE table_33246 (
"Rank" text,
"State" text,
"Population" real,
"Area (km\u00b2)" real,
"Density" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The state of Aguascalientes has an area (km ) larger than 151,571 and a densit... | SELECT "Rank" FROM table_33246 WHERE "Area (km\u00b2)" > '151,571' AND "Density" > '80.9' AND "State" = 'aguascalientes' |
### Instruction:
CREATE TABLE table_35295 (
"Round" real,
"Player" text,
"Nationality" text,
"NHL team" text,
"College/Junior/Club Team (League)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Rounds have a Nationality of canada, and a Coll... | SELECT COUNT("Round") FROM table_35295 WHERE "Nationality" = 'canada' AND "College/Junior/Club Team (League)" = 'fort mcmurray oil barons (ajhl)' |
### Instruction:
CREATE TABLE table_34298 (
"Grand Cru" text,
"Region" text,
"Village" text,
"Wine style" text,
"Vineyard surface (2010)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Vineyeard surface (2010) with a Village of Gevrey-Ch... | SELECT "Vineyard surface (2010)" FROM table_34298 WHERE "Village" = 'gevrey-chambertin' AND "Grand Cru" = 'latricières-chambertin' |
### Instruction:
CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find th... | SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project WHERE T1.Hours > 300 GROUP BY T1.Name ORDER BY COUNT(*) DESC |
### Instruction:
CREATE TABLE table_42709 (
"Season" text,
"League" text,
"Games" real,
"Lost" real,
"Tied" real,
"Points" real,
"Winning %" real,
"Goals for" real,
"Goals against" real,
"Standing" text
)
-- Using valid SQLite, answer the following questions for the tables prov... | SELECT MIN("Winning %") FROM table_42709 WHERE "Lost" > '23' AND "Goals for" > '386' |
### Instruction:
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
... | SELECT Sex, SUM(Weight) FROM people GROUP BY Sex ORDER BY Sex DESC |
### Instruction:
CREATE TABLE table_12566 (
"Coach" text,
"Years coached" text,
"Seasons" real,
"Wins" real,
"Losses" real,
"Percentage" real,
"Conference titles" text,
"NCAA" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which coach ha... | SELECT "Coach" FROM table_12566 WHERE "Conference titles" = '0' AND "Seasons" > '2' AND "Losses" > '87' AND "NCAA" = '0' |
### Instruction:
CREATE TABLE table_3389 (
"January\u2013December 2012" text,
"Birth/2012" real,
"Birth/2011" real,
"Death/2012" real,
"Death/2011" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of birth/2012 for January Dec... | SELECT COUNT("Birth/2012") FROM table_3389 WHERE "January\u2013December 2012" = 'Kurgan Oblast' |
### Instruction:
CREATE TABLE hosting_city (
host_city VARCHAR
)
CREATE TABLE city (
city VARCHAR,
city_id VARCHAR
)
CREATE TABLE temperature (
city_id VARCHAR,
Feb INTEGER,
Jun VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Give me a list ... | SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T2.Feb > T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id = T4.host_city |
### Instruction:
CREATE TABLE table_78594 (
"Position" real,
"Club" text,
"Played" real,
"Points" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
)
-- Using valid SQLite, answer the following questions for the table... | SELECT AVG("Played") FROM table_78594 WHERE "Club" = 'burgos cf' AND "Draws" < '7' |
### Instruction:
CREATE TABLE table_21843 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
)
-- Using valid SQLite,... | SELECT "Points against" FROM table_21843 WHERE "Drawn" = '1' AND "Points" = '51' |
### Instruction:
CREATE TABLE table_77183 (
"Outcome" text,
"Date" text,
"Championship" text,
"Surface" text,
"Opponent" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the opponent when the surface is clay, the outcome is wi... | SELECT "Opponent" FROM table_77183 WHERE "Surface" = 'clay' AND "Outcome" = 'winner' AND "Championship" = 'estoril' AND "Date" = '15 april 1996' |
### Instruction:
CREATE TABLE table_35520 (
"Position" real,
"Team" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Scored" real,
"Conceded" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the hi... | SELECT MAX("Scored") FROM table_35520 WHERE "Position" > '5' AND "Wins" < '4' AND "Draws" > '8' |
### Instruction:
CREATE TABLE table_23958 (
"Season" text,
"GP" real,
"W (OT/SO)" text,
"L (OT/SO)" text,
"Pts" real,
"Pts/GP" text,
"GF \u2013 GA" text,
"Rank (league/conference)" text,
"Top Scorer" text
)
-- Using valid SQLite, answer the following questions for the tables provid... | SELECT "Season" FROM table_23958 WHERE "L (OT/SO)" = '22 (3/4)' |
### Instruction:
CREATE TABLE SECTION (
building VARCHAR,
room_number VARCHAR,
semester VARCHAR,
year VARCHAR,
course_id VARCHAR
)
CREATE TABLE course (
course_id VARCHAR,
dept_name VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided ... | SELECT T2.building, T2.room_number, T2.semester, T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY T1.title |
### Instruction:
CREATE TABLE table_53973 (
"Peak" text,
"metres" real,
"feet" real,
"Latitude (N)" text,
"Longitude (E)" text,
"Prominence (m)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest feet total with a Longitude (E) of... | SELECT MIN("feet") FROM table_53973 WHERE "Longitude (E)" = '76°34′06″' AND "Prominence (m)" < '1,701' |
### Instruction:
CREATE TABLE table_name_78 (
total_population__2005_estimate_ INTEGER,
province VARCHAR,
area__km_2__ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Total population (2005 estimate) has a Province of west kalimantan (kalimantan bar... | SELECT AVG(total_population__2005_estimate_) FROM table_name_78 WHERE province = "west kalimantan (kalimantan barat)" AND area__km_2__ < 147 OFFSET 307.00 |
### Instruction:
CREATE TABLE table_203_531 (
id number,
"date" text,
"tournament" text,
"location" text,
"winner" text,
"score" text,
"1st prize ($)" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- phil mickelson 's score at the bob hope c... | SELECT (SELECT "score" FROM table_203_531 WHERE "tournament" = 'bob hope chrysler classic') - (SELECT "score" FROM table_203_531 WHERE "tournament" = 'buick classic') |
### Instruction:
CREATE TABLE table_204_786 (
id number,
"riding" text,
"candidate" text,
"gender" text,
"residence" text,
"occupation" text,
"votes" number,
"%" number,
"rank" text,
"biographical notes" text
)
-- Using valid SQLite, answer the following questions for the table... | SELECT COUNT("candidate") FROM table_204_786 WHERE "votes" > (SELECT "votes" FROM table_204_786 WHERE "candidate" = 'tamara lorincz') |
### Instruction:
CREATE TABLE table_25299 (
"Station" text,
"Extension" text,
"City/Neighborhood" text,
"Projected opening" text,
"Park and ride?" text,
"Funded by ST2 ?" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are all the City/Neigh... | SELECT "City/Neighborhood" FROM table_25299 WHERE "Extension" = 'East Link' AND "Park and ride?" = 'Yes' AND "Station" = 'Overlake Transit Center' |
### Instruction:
CREATE TABLE table_22875 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- state the number... | SELECT COUNT("Surface") FROM table_22875 WHERE "Championship" = 'Australian Open' AND "Score in the final" = '6–3, 4–6, 11–9' |
### Instruction:
CREATE TABLE table_28666 (
"District" real,
"Incumbent" text,
"Party" text,
"Elected" text,
"Status" text,
"2010 Candidates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the elected year when the 2010 candidates were j... | SELECT "Elected" FROM table_28666 WHERE "2010 Candidates" = 'Jesse Stone (R) 93.51 Diane Evans (I) 6.49%' |
### Instruction:
CREATE TABLE table_20101 (
"Club" text,
"Played" text,
"Won" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Points difference" text,
"Tries For" text,
"Tries Against" text,
"Try Bonus" text,
"Losing Bonus" text,
"Points" t... | SELECT COUNT("Points difference") FROM table_20101 WHERE "Tries Against" = '62' |
### Instruction:
CREATE TABLE table_name_82 (
international_mail INTEGER,
total_freight_and_mail VARCHAR,
year VARCHAR,
domestic_freight VARCHAR,
domestic_mail VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the international mail with the... | SELECT MIN(international_mail) FROM table_name_82 WHERE domestic_freight < 72 AND domestic_mail = 0 AND year < 2012 AND total_freight_and_mail > 4 OFFSET 695 |
### Instruction:
CREATE TABLE table_name_64 (
pop__2010_ INTEGER,
land___sqmi__ VARCHAR,
latitude VARCHAR,
longitude VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of the 2010 population with a latitude greater than 47.710905, a longi... | SELECT SUM(pop__2010_) FROM table_name_64 WHERE latitude > 47.710905 AND longitude = -101.79876 AND land___sqmi__ < 35.695 |
### Instruction:
CREATE TABLE table_1830 (
"Year" real,
"Tournaments played" real,
"Cuts made*" real,
"Wins" real,
"2nd" real,
"3rd" real,
"Top 10s" real,
"Best finish" text,
"Earnings ( $ )" text,
"Money list rank" text,
"Scoring average" text,
"Scoring rank" text
)
--... | SELECT "Cuts made*" FROM table_1830 WHERE "Scoring rank" = '3' |
### Instruction:
CREATE TABLE table_61009 (
"2006" real,
"2007" real,
"2008" real,
"2009" real,
"2010" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What 2010 has a 2006 less than 6.9, a 2008 greater than 1.6, and 2 for 2007?
### Response:
| SELECT "2010" FROM table_61009 WHERE "2006" < '6.9' AND "2008" > '1.6' AND "2007" = '2' |
### Instruction:
CREATE TABLE table_21113 (
"Rank" real,
"Company" text,
"Headquarters" text,
"Industry" text,
"Sales (billion $)" text,
"Profits (billion $)" text,
"Assets (billion $)" text,
"Market Value (billion $)" text
)
-- Using valid SQLite, answer the following questions for th... | SELECT "Profits (billion $)" FROM table_21113 WHERE "Assets (billion $)" = '192.8' |
### Instruction:
CREATE TABLE film (
title VARCHAR,
film_id VARCHAR
)
CREATE TABLE rental (
inventory_id VARCHAR
)
CREATE TABLE inventory (
inventory_id VARCHAR,
film_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the film title and ... | SELECT T1.title, T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id = T2.film_id JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T2.inventory_id ORDER BY COUNT(*) DESC LIMIT 1 |
### Instruction:
CREATE TABLE table_37806 (
"Tournament" text,
"2006" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the 2008 with 2012 of 2r and 2006 of ... | SELECT "2008" FROM table_37806 WHERE "2012" = '2r' AND "2006" = '2r' |
### Instruction:
CREATE TABLE table_name_69 (
geographic_character VARCHAR,
population__2007_ VARCHAR,
population__2010_ VARCHAR,
urban_rural VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE TYPE OF LAND WITH A 2010 POPULATION GREATER THAN ... | SELECT geographic_character FROM table_name_69 WHERE population__2010_ > 2539 AND urban_rural = "rural" AND population__2007_ = 2572 |
### Instruction:
CREATE TABLE office_locations (
building_id number,
company_id number,
move_in_year number
)
CREATE TABLE companies (
id number,
name text,
headquarters text,
industry text,
sales_billion number,
profits_billion number,
assets_billion number,
market_value_bi... | SELECT AVG(profits_billion) FROM companies |
### Instruction:
CREATE TABLE table_279 (
"car plates (since 1937)" text,
"Voivodeship Separate city" text,
"Capital" text,
"Area in 1000km\u00b2 (1930)" text,
"Population in 1000 (1931)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List all areas... | SELECT "Area in 1000km\u00b2 (1930)" FROM table_279 WHERE "Voivodeship Separate city" = 'lubelskie' |
### Instruction:
CREATE TABLE table_46736 (
"Letter" text,
"IPv6 address" text,
"AS-number" text,
"Operator" text,
"Location #sites (global/local)" text,
"Software" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the location for the soft... | SELECT "Location #sites (global/local)" FROM table_46736 WHERE "Software" = 'bind' AND "IPv6 address" = '2001:503:c27::2:30' |
### Instruction:
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
)
-- Using valid SQLite, answer the following ... | SELECT Name, Code FROM Products WHERE Price BETWEEN 60 AND 120 ORDER BY Name |
### Instruction:
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
... | SELECT Date_of_Birth, Weight FROM people ORDER BY Weight |
### Instruction:
CREATE TABLE table_74945 (
"Club" text,
"Played" text,
"Drawn" text,
"Lost" text,
"Points for" text,
"Points against" text,
"Tries for" text,
"Tries against" text,
"Try bonus" text,
"Losing bonus" text,
"Points" text
)
-- Using valid SQLite, answer the foll... | SELECT "Points for" FROM table_74945 WHERE "Played" = '22' AND "Tries against" = '43' |
### Instruction:
CREATE TABLE table_33645 (
"Season" real,
"Series Name" text,
"Champion" text,
"Races \u2020" text,
"Pole Positions" text,
"Wins" text,
"Podiums" text,
"Fastest Laps" text,
"Points" text,
"Margin (pts)" text
)
-- Using valid SQLite, answer the following questio... | SELECT "Fastest Laps" FROM table_33645 WHERE "Races \u2020" = '12/12' |
### Instruction:
CREATE TABLE table_29180 (
"Rank" real,
"Rider" text,
"Sat 21 Aug" text,
"Mon 23 Aug" text,
"Tues 24 Aug" text,
"Wed 25 Aug" text,
"Thurs 26 Aug" text,
"Fri 27 Aug" text,
"Sat 28 Aug" text
)
-- Using valid SQLite, answer the following questions for the tables provi... | SELECT "Sat 28 Aug" FROM table_29180 WHERE "Rank" = '10' |
### Instruction:
CREATE TABLE table_2595 (
"Year" text,
"Day" text,
"Date" text,
"Driver" text,
"Team" text,
"Manufacturer" text,
"Laps" text,
"Miles (km)" text,
"Race Time" text,
"Average Speed (mph)" text,
"Report" text
)
-- Using valid SQLite, answer the following questi... | SELECT "Manufacturer" FROM table_2595 WHERE "Average Speed (mph)" = '126.259' |
### Instruction:
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
Main_Services text,
Number_of_Platforms int
)
CREATE TABLE train_station (
Train_ID int,
Station_ID int
)
CREATE TABLE trai... | SELECT Location, COUNT(Location) FROM station GROUP BY Location ORDER BY COUNT(Location) DESC |
### Instruction:
CREATE TABLE table_79002 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT SUM("Goals Against") FROM table_79002 WHERE "Goals For" = '46' AND "Played" < '38' |
### Instruction:
CREATE TABLE table_7890 (
"Player" text,
"Team" text,
"Matches" real,
"Runs" real,
"Balls" real,
"Strike Rate" real,
"Average" real,
"100s" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the sum of 100s t... | SELECT SUM("100s") FROM table_7890 WHERE "Matches" = '12' AND "Strike Rate" < '144.81' |
### Instruction:
CREATE TABLE musical (
Musical_ID int,
Name text,
Year int,
Award text,
Category text,
Nominee text,
Result text
)
CREATE TABLE actor (
Actor_ID int,
Name text,
Musical_ID int,
Character text,
Duration text,
age int
)
-- Using valid SQLite, answer ... | SELECT Nominee, COUNT(Nominee) FROM musical WHERE Award = "Tony Award" OR Award = "Cleavant Derricks" GROUP BY Nominee |
### Instruction:
CREATE TABLE table_204_319 (
id number,
"mlb\nseason" number,
"team\nseason" number,
"league" text,
"division" text,
"finish" text,
"wins" number,
"losses" number,
"win %" number,
"gb" text,
"postseason" text,
"awards" text
)
-- Using valid SQLite, answ... | SELECT COUNT(DISTINCT "mlb\nseason") FROM table_204_319 WHERE "league" = 'nl' |
### Instruction:
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height re... | SELECT Date_of_Birth, Weight FROM people ORDER BY Weight DESC |
### Instruction:
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
)
CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
... | SELECT Sex, COUNT(Sex) FROM people GROUP BY Sex ORDER BY Sex |
### Instruction:
CREATE TABLE voting_record (
stuid number,
registration_date text,
election_cycle text,
president_vote number,
vice_president_vote number,
secretary_vote number,
treasurer_vote number,
class_president_vote number,
class_senator_vote number
)
CREATE TABLE student (
... | SELECT major FROM student GROUP BY major ORDER BY COUNT(*) DESC LIMIT 1 |
### Instruction:
CREATE TABLE table_train_34 (
"id" int,
"gender" string,
"allergy_to_adhesive" bool,
"contraception" bool,
"use_of_cyclosporin" bool,
"use_of_digoxin" bool,
"liver_disease" bool,
"rhabomyolysis" bool,
"allergy_to_hydrocortisone" bool,
"use_of_statins" bool,
"... | SELECT * FROM table_train_34 WHERE rhabomyolysis = 1 |
### Instruction:
CREATE TABLE table_14627 (
"Name" text,
"Country" text,
"Type" text,
"Moving from" text,
"Transfer window" text,
"Ends" real,
"Transfer fee" text,
"Source" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name ... | SELECT "Country" FROM table_14627 WHERE "Transfer window" = 'winter' AND "Ends" > '2009' AND "Moving from" = 'bolton wanderers' |
### Instruction:
CREATE TABLE table_23579 (
"Title" text,
"Author" text,
"Reader" text,
"Format" text,
"Company" text,
"Release Date" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the reader of the audiobook authored by... | SELECT "Reader" FROM table_23579 WHERE "Author" = 'Cole, Stephen Stephen Cole' AND "Release Date" = '2008-11-13 13 November 2008' |
### Instruction:
CREATE TABLE school_bus (
School_ID int,
Driver_ID int,
Years_Working int,
If_full_time bool
)
CREATE TABLE school (
School_ID int,
Grade text,
School text,
Location text,
Type text
)
CREATE TABLE driver (
Driver_ID int,
Name text,
Party text,
Home_... | SELECT Home_city, AVG(Age) FROM driver GROUP BY Home_city ORDER BY Home_city |
### Instruction:
CREATE TABLE table_22548 (
"Rank" real,
"Name" text,
"Tenure" text,
"Leagues" text,
"Attempts" real,
"Completions" real,
"Comp %" text,
"Touchdowns" real,
"Interceptions" real,
"Yardage" real,
"QB Rating" text
)
-- Using valid SQLite, answer the following q... | SELECT "QB Rating" FROM table_22548 WHERE "Comp %" = '62.0' |
### Instruction:
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... | SELECT Carrier, COUNT(*) FROM phone GROUP BY Carrier ORDER BY Carrier DESC |
### Instruction:
CREATE TABLE schedule (
cinema_id number,
film_id number,
date text,
show_times_per_day number,
price number
)
CREATE TABLE cinema (
cinema_id number,
name text,
openning_year number,
capacity number,
location text
)
CREATE TABLE film (
film_id number,
... | SELECT title, directed_by FROM film |
### Instruction:
CREATE TABLE Scientists (
SSN int,
Name Char(30)
)
CREATE TABLE Projects (
Code Char(4),
Name Char(50),
Hours int
)
CREATE TABLE AssignedTo (
Scientist int,
Project char(4)
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find th... | SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project WHERE T1.Hours > 300 GROUP BY T1.Name ORDER BY Name DESC |
### Instruction:
CREATE TABLE table_54906 (
"From" text,
"Adult Rate" text,
"Development Rate" text,
"16-17 Year Olds Rate" text,
"Apprentice Rate" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the development rate for wages with a 16-17 ye... | SELECT "Development Rate" FROM table_54906 WHERE "16-17 Year Olds Rate" = '£3.53' AND "Adult Rate" = '£5.73' |
### Instruction:
CREATE TABLE table_42310 (
"Year" real,
"Dates" text,
"Champion" text,
"Country" text,
"Score" text,
"Tournament location" text,
"Purse ($)" real,
"Winner's share ($)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How m... | SELECT COUNT("Purse ($)") FROM table_42310 WHERE "Year" > '2012' AND "Winner's share ($)" < '15,000' |
### Instruction:
CREATE TABLE table_55807 (
"Position" real,
"Club" text,
"Played" real,
"Points" text,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Goal Difference" real
)
-- Using valid SQLite, answer the following questions for the table... | SELECT SUM("Goal Difference") FROM table_55807 WHERE "Goals against" < '33' AND "Draws" > '13' |
### Instruction:
CREATE TABLE county_public_safety (
county_id number,
name text,
population number,
police_officers number,
residents_per_officer number,
case_burden number,
crime_rate number,
police_force text,
location text
)
CREATE TABLE city (
city_id number,
county_id ... | SELECT COUNT(*) FROM county_public_safety |
### Instruction:
CREATE TABLE table_47733 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided ... | SELECT "High assists" FROM table_47733 WHERE "Location Attendance" = 'fleetcenter' AND "Score" = 'w 120-87' |
### Instruction:
CREATE TABLE table_15933 (
"State/Territory" text,
"Asian American Population (2010 Census)" real,
"Chinese" real,
"Filipino" real,
"Indian" real,
"Japanese" real,
"Korean" real,
"Vietnamese" real,
"Other Asian" real
)
-- Using valid SQLite, answer the following qu... | SELECT MIN("Chinese") FROM table_15933 WHERE "Filipino" = '1474707' |
### Instruction:
CREATE TABLE table_34847 (
"Tournament" text,
"1981" text,
"1982" text,
"1983" text,
"1984" text,
"1985" text,
"1986" text,
"1987" text,
"1988" text,
"1989" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which 19... | SELECT "1988" FROM table_34847 WHERE "1985" = '2r' |
### Instruction:
CREATE TABLE table_28553 (
"Year" real,
"Starts" real,
"Wins" real,
"Top 5" real,
"Top 10" real,
"Poles" real,
"Avg. Start" text,
"Avg. Finish" text,
"Winnings" text,
"Position" text,
"Team(s)" text
)
-- Using valid SQLite, answer the following questions fo... | SELECT MIN("Top 10") FROM table_28553 WHERE "Position" = '8th' |
### Instruction:
CREATE TABLE table_12235 (
"Rank" real,
"Athlete" text,
"Nanquan" real,
"Nangun" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE LOWEST NANQUAN WITH A RANK BIGGER THAN 2, TOTAL LESS THAN 18.36 AND SMALLER TH... | SELECT MIN("Nanquan") FROM table_12235 WHERE "Rank" > '2' AND "Total" < '18.36' AND "Nangun" < '8.85' |
### Instruction:
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
)
-- Using valid SQLite, answer the following ... | SELECT T1.Manufacturer, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.