instruction
stringlengths 37
754
| output
stringlengths 9
3.43k
|
---|---|
### Instruction:
Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order.
### Response:
| SELECT name, headquarter, revenue FROM manufacturers ORDER BY revenue DESC |
### Instruction:
what is the least bronze when gold is more than 0 for russia?
### Response:
| SELECT MIN(bronze) FROM table_name_37 WHERE gold > 0 AND nation = "russia" |
### Instruction:
Return the address of store 1.
### Response:
| SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id = T2.address_id WHERE store_id = 1 |
### Instruction:
when roberts 86' is the scorer what is the round?
### Response:
| SELECT round FROM table_28181401_4 WHERE scorers = "Roberts 86'" |
### Instruction:
What is the A330 for A310 B10?
### Response:
| SELECT "A330" FROM table_47200 WHERE "A310" = 'b10' |
### Instruction:
Has Episode 1b-16 (42) been preserved?
### Response:
| SELECT "Preservation" FROM table_6266 WHERE "Episode" = '1b-16 (42)' |
### Instruction:
how many stadiums have a capacity of at least 8,000 ?
### Response:
| SELECT COUNT("stadium") FROM table_204_567 WHERE "capacity" >= 8000 |
### Instruction:
What team did Derek Black Play for prior to being drafted?
### Response:
| SELECT college_junior_club_team FROM table_1473672_6 WHERE player = "Derek Black" |
### Instruction:
how many patients were born before the year 2060?
### Response:
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.dob_year < "2060" |
### Instruction:
who were the director of the episode whose number in the season is 17?
### Response:
| SELECT directed_by FROM table_27622417_1 WHERE no_in_season = 17 |
### Instruction:
Name the 2013 for 2011 of 1r
### Response:
| SELECT "2013" FROM table_37808 WHERE "2011" = '1r' |
### Instruction:
Which character was in the sexiest female category of the British Soap Awards?
### Response:
| SELECT character FROM table_name_59 WHERE category = "sexiest female" AND award = "british soap awards" |
### Instruction:
What is the name of the player with position of G and the team was the Washington Capitols?
### Response:
| SELECT player FROM table_name_58 WHERE position = "g" AND team = "washington capitols" |
### Instruction:
Show different parties of people along with the number of people in each party Plot them as bar chart, rank y-axis from low to high order.
### Response:
| SELECT Party, COUNT(*) FROM people GROUP BY Party ORDER BY COUNT(*) |
### Instruction:
What is the sum of the points of all teams that had against scores less than 14?
### Response:
| SELECT SUM("Points") FROM table_77950 WHERE "Against" < '14' |
### Instruction:
In what venue was the 1978 FIFA world cup qualification played in?
### Response:
| SELECT venue FROM table_name_48 WHERE competition = "1978 fifa world cup qualification" |
### Instruction:
Compare the total number of different product names, show y axis in asc order.
### Response:
| SELECT Product_Name, COUNT(Product_Name) FROM Products GROUP BY Product_Name ORDER BY COUNT(Product_Name) |
### Instruction:
what is the written by and production code is 3wab03?
### Response:
| SELECT writtenby FROM table_20726262_4 WHERE production_code = "3WAB03" |
### Instruction:
Who was the home team when the record was 36 21 8?
### Response:
| SELECT "Home" FROM table_70290 WHERE "Record" = '36–21–8' |
### Instruction:
What is the population for Deed number of 21352021?
### Response:
| SELECT population FROM table_name_51 WHERE deed_number = "21352021" |
### Instruction:
what is the difference between the total nasl and the total cfu club championship ?
### Response:
| SELECT ABS(SUM("nasl") - SUM("cfu club championship")) FROM table_204_618 |
### Instruction:
Which publisher is responsible for spec ops: stealth patrol?
### Response:
| SELECT "Publisher" FROM table_76200 WHERE "Name" = 'spec ops: stealth patrol' |
### Instruction:
What is the number of S Barangay for Paracale?
### Response:
| SELECT "No. of s Barangay" FROM table_27797 WHERE "Municipality" = 'Paracale' |
### Instruction:
Can undergrads take class 574 ?
### Response:
| SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 574 |
### Instruction:
who is the player when the position is p and the team is oakland athletics?
### Response:
| SELECT player FROM table_name_99 WHERE position = "p" AND team = "oakland athletics" |
### Instruction:
What is the date for the winner Universitario after the 1943 season?
### Response:
| SELECT date FROM table_name_99 WHERE winner = "universitario" AND season > 1943 |
### Instruction:
What home team had an attendance record of 16,971?
### Response:
| SELECT "Home team" FROM table_78058 WHERE "Attendance" = '16,971' |
### Instruction:
What is the total number of ranks when the Peak Name is Red Shirt Table?
### Response:
| SELECT SUM("Rank") FROM table_7248 WHERE "Peak Name" = 'red shirt table' |
### Instruction:
Which Att-Cmp has a TD-INT of 7-8?
### Response:
| SELECT "Att-Cmp" FROM table_63951 WHERE "TD-INT" = '7-8' |
### Instruction:
What is the low point total for arrows a22 chassis?
### Response:
| SELECT MIN("Points") FROM table_10868 WHERE "Chassis" = 'arrows a22' |
### Instruction:
What is the Visitor of the game with a Record of 21 17 13?
### Response:
| SELECT visitor FROM table_name_70 WHERE record = "21–17–13" |
### Instruction:
Who position did matthew tassone who was drafted after round 5 play?
### Response:
| SELECT position FROM table_name_24 WHERE round > 5 AND player = "matthew tassone" |
### Instruction:
who was the only cuban to finish in the top eight ?
### Response:
| SELECT "swimmer" FROM table_204_886 WHERE "country" = 'cuba' AND "rank" <= 8 |
### Instruction:
Tony P. Hall was the incumbent in the race between what two candidates?
### Response:
| SELECT "Candidates" FROM table_684 WHERE "Incumbent" = 'Tony P. Hall' |
### Instruction:
WHAT IS THE 2ND LEG WITH TEAM 1 OF SPORTING?
### Response:
| SELECT 2 AS nd_leg FROM table_name_22 WHERE team_1 = "sporting" |
### Instruction:
How many times was performer 3 Kate Robbins?
### Response:
| SELECT COUNT(date) FROM table_14934885_1 WHERE performer_3 = "Kate Robbins" |
### Instruction:
What is the Attendance of the game against Jacksonville Jaguars?
### Response:
| SELECT "Attendance" FROM table_63607 WHERE "Opponent" = 'jacksonville jaguars' |
### Instruction:
how many games did not have at least 15,000 in attendance ?
### Response:
| SELECT COUNT(*) FROM table_204_467 WHERE "attendance" < 15000 |
### Instruction:
What is the average of the Series #s that were directed by Matthew Penn?
### Response:
| SELECT AVG(series__number) FROM table_name_42 WHERE directed_by = "matthew penn" |
### Instruction:
What is the NTSC M for Pal M 525/60?
### Response:
| SELECT ntsc_m FROM table_name_23 WHERE pal_m = "525/60" |
### Instruction:
With more than 1 Gold and Silver and Total Sport, what is the Total?
### Response:
| SELECT AVG(total) FROM table_name_86 WHERE silver > 1 AND sport = total AND gold > 1 |
### Instruction:
Which home team scored 12.15 (87)?
### Response:
| SELECT "Home team" FROM table_33006 WHERE "Home team score" = '12.15 (87)' |
### Instruction:
Name the label with catalog of mhcl-20005
### Response:
| SELECT "Label" FROM table_66871 WHERE "Catalog" = 'mhcl-20005' |
### Instruction:
Which tournament had a score of 6 3, 7 6?
### Response:
| SELECT "Tournament" FROM table_6380 WHERE "Score" = '6–3, 7–6' |
### Instruction:
How many documents in different starting date? Return a line chart binning starting date by year interval.
### Response:
| SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations |
### Instruction:
What was the Average Attendance during the Year in which there were 9 Home Games?
### Response:
| SELECT MAX("Average Attendance") FROM table_7175 WHERE "# of Home Games" = '9' |
### Instruction:
What is the elena basescu when the poling firm of gallup?
### Response:
| SELECT elena_băsescu FROM table_name_98 WHERE polling_firm = "gallup" |
### Instruction:
what is drug type of drug name potassium phosphate?
### Response:
| SELECT prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "Potassium Phosphate" |
### Instruction:
What is College, when Round is greater than 1, and when Pick is greater than 163?
### Response:
| SELECT college FROM table_name_11 WHERE round > 1 AND pick > 163 |
### Instruction:
What is the rice amount when the potato amount is 79?
### Response:
| SELECT "Rice [B ]" FROM table_4507 WHERE "Potato [D ]" = '79' |
### Instruction:
How many episodes had 4.44m viewers?
### Response:
| SELECT COUNT(episode) FROM table_27039190_3 WHERE viewers = "4.44m" |
### Instruction:
What is the name of the runner up in the Tournament of s o paulo?
### Response:
| SELECT "Runner-up" FROM table_52787 WHERE "Tournament" = 'são paulo' |
### Instruction:
How many episodes were titled 'a pig in a poke'?
### Response:
| SELECT COUNT("Written by") FROM table_17547 WHERE "Title" = 'A Pig in a Poke' |
### Instruction:
What is the 3rd participle of the verb whose 2nd participle is band?
### Response:
| SELECT "Part 3" FROM table_21713 WHERE "Part 2" = 'band' |
### Instruction:
When the game was played at the EMCG venue, who was the away team?
### Response:
| SELECT "Away team" FROM table_55671 WHERE "Venue" = 'emcg' |
### Instruction:
How much did the baby who name means God knows my journey weigh at birth?
### Response:
| SELECT "Weight at birth" FROM table_78040 WHERE "Meaning" = 'god knows my journey' |
### Instruction:
what is the entry where the other person is zden k hr za
### Response:
| SELECT "Entrant" FROM table_30243 WHERE "Co-driver" = 'Zdeněk Hrůza' |
### Instruction:
What is the duration that has 3 for appearances, and james garret as the character?
### Response:
| SELECT duration FROM table_name_20 WHERE appearances = "3" AND character = "james garret" |
### Instruction:
what are the genders of patient 006-99708?
### Response:
| SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '006-99708' |
### Instruction:
Call sign of k231bg has what sum of erp w?
### Response:
| SELECT SUM("ERP W") FROM table_75603 WHERE "Call sign" = 'k231bg' |
### Instruction:
what is the name of the report that lists the race name as long beach grand prix?
### Response:
| SELECT report FROM table_10707142_2 WHERE race_name = "Long Beach Grand Prix" |
### Instruction:
How many rounds ended with a score of 16-52?
### Response:
| SELECT COUNT(round) FROM table_13328239_4 WHERE score = "16-52" |
### Instruction:
What release date is when kids-270 is a reference?
### Response:
| SELECT release_date FROM table_10979230_5 WHERE reference = "KIDS-270" |
### Instruction:
How many pole position achieved 0 points from Mexico?
### Response:
| SELECT COUNT(poles) FROM table_27279050_1 WHERE points = "0" AND nation = "Mexico" |
### Instruction:
What is the Nationality Club Team of Quebec remparts (qmjhl)?
### Response:
| SELECT nationality FROM table_name_53 WHERE club_team = "quebec remparts (qmjhl)" |
### Instruction:
who is the other marquis ruler besides si jun ?
### Response:
| SELECT "name" FROM table_204_125 WHERE "title" = 'marquis' AND "name" <> 'si jun' |
### Instruction:
Who was the visiting team when the record was 28 14 6 2?
### Response:
| SELECT visitor FROM table_name_86 WHERE record = "28–14–6–2" |
### Instruction:
Plot the total number by grouped by competition type as a bar graph, and order X in ascending order.
### Response:
| SELECT Competition_type, COUNT(*) FROM competition GROUP BY Competition_type ORDER BY Competition_type |
### Instruction:
What was the score when they had a 25-41-9 record?
### Response:
| SELECT "Score" FROM table_75372 WHERE "Record" = '25-41-9' |
### Instruction:
What is the least wins for a team with against less than 814?
### Response:
| SELECT MIN("Wins") FROM table_62069 WHERE "Against" < '814' |
### Instruction:
What is the score of the game on November 10, 2006?
### Response:
| SELECT score FROM table_name_17 WHERE date = "november 10, 2006" |
### Instruction:
What is the Location when the individual was jos maria ca izares?
### Response:
| SELECT "Location" FROM table_41786 WHERE "Individual" = 'josé maria cañizares' |
### Instruction:
How many second place showings does snooker have?
### Response:
| SELECT second_place_s_ FROM table_20823568_2 WHERE sporting_profession = "Snooker" |
### Instruction:
Who was the driver for the winning team Lawson Team Impul?
### Response:
| SELECT winning_driver FROM table_22379931_2 WHERE winning_team = "Lawson Team Impul" |
### Instruction:
What is the name of the artist of ' bang bang boom '?
### Response:
| SELECT "Artist" FROM table_47051 WHERE "Song" = ' bang bang boom ' |
### Instruction:
What is Far Eastern College Johnny Abarrientos' Pick number?
### Response:
| SELECT pick FROM table_name_55 WHERE college = "far eastern" AND player = "johnny abarrientos" |
### Instruction:
Who was the runner-up in the Michelob Light Open at Kingsmill?
### Response:
| SELECT runner_s__up FROM table_name_93 WHERE tournament = "michelob light open at kingsmill" |
### Instruction:
How many league cups for m patrick maria with 0 total?
### Response:
| SELECT SUM(league) FROM table_name_96 WHERE player = "m patrick maria" AND total < 0 |
### Instruction:
Draw a bar chart of first name versus manager_id, I want to list by the X in asc.
### Response:
| SELECT FIRST_NAME, MANAGER_ID FROM employees ORDER BY FIRST_NAME |
### Instruction:
Name the leading scorer for april 12, 2008
### Response:
| SELECT leading_scorer FROM table_name_13 WHERE date = "april 12, 2008" |
### Instruction:
What is the monto where the total region is 11230?
### Response:
| SELECT COUNT("Monto") FROM table_17705 WHERE "Total Region" = '11230' |
### Instruction:
Show me about the distribution of personal_name and gender_mf in a bar chart.
### Response:
| SELECT personal_name, gender_mf FROM Course_Authors_and_Tutors ORDER BY personal_name |
### Instruction:
What are total salaries and department id for each department that has more than 2 employees?
### Response:
| SELECT department_id, SUM(salary) FROM employees GROUP BY department_id HAVING COUNT(*) >= 2 |
### Instruction:
what's the relative value that contains a jyutping of daam3?
### Response:
| SELECT "Relative value" FROM table_38995 WHERE "Jyutping" = 'daam3' |
### Instruction:
How many players have the hometown Pennsauken, NJ?
### Response:
| SELECT COUNT("Player") FROM table_291 WHERE "Hometown" = 'Pennsauken, NJ' |
### Instruction:
What is the label for the UK in 1996?
### Response:
| SELECT "Label" FROM table_8352 WHERE "Region" = 'uk' AND "Date" = '1996' |
### Instruction:
Where is the University of North Carolina at Greensboro located?
### Response:
| SELECT "Location" FROM table_27726 WHERE "Institution" = 'University of North Carolina at Greensboro' |
### Instruction:
What is the name of the engine company that is located at 89 Rope Ferry Road?
### Response:
| SELECT engine_company FROM table_name_35 WHERE address = "89 rope ferry road" |
### Instruction:
What round did Takayo Hashi face Yoko Hattori?
### Response:
| SELECT SUM("Round") FROM table_32841 WHERE "Opponent" = 'yoko hattori' |
### Instruction:
What is the name of the airport in the city of Kota Kinabalu?
### Response:
| SELECT "Airport" FROM table_68832 WHERE "City" = 'kota kinabalu' |
### Instruction:
When David E. Finley was the incumbent what was the result?
### Response:
| SELECT "Result" FROM table_35752 WHERE "Incumbent" = 'david e. finley' |
### Instruction:
What season number was assigned to the episode identified with the production code 401?
### Response:
| SELECT "Season no." FROM table_30278 WHERE "Production code" = '401' |
### Instruction:
Which player made 4 touchdowns while playing left halfback?
### Response:
| SELECT player FROM table_14342210_6 WHERE touchdowns = 4 AND position = "Left halfback" |
### Instruction:
what are all the percent (1990) where state is united states
### Response:
| SELECT "Percent (1990)" FROM table_17226 WHERE "State" = 'United States' |
### Instruction:
What college did Louis LeBlanc attend?
### Response:
| SELECT "College/junior/club team (league)" FROM table_59310 WHERE "Player" = 'louis leblanc' |
### Instruction:
Name the lowest Year Joined which has a Mascot of pioneers?
### Response:
| SELECT MIN("Year Joined") FROM table_64242 WHERE "Mascot" = 'pioneers' |
### Instruction:
What Location has a Delivery of barge and the Name of scaevola?
### Response:
| SELECT location FROM table_name_77 WHERE delivery = "barge" AND name = "scaevola" |
### Instruction:
Which Outcome has a Score of 4 6 3 6?
### Response:
| SELECT "Outcome" FROM table_36032 WHERE "Score" = '4–6 3–6' |
### Instruction:
what is the difference between the nation with the most medals and the nation with the least amount of medals ?
### Response:
| SELECT MAX("total") - MIN("total") FROM table_203_497 |
### Instruction:
What engine type is used in a Space Shuttle Vacuum scenario?
### Response:
| SELECT "Engine type" FROM table_20437 WHERE "Scenario" = 'Space shuttle vacuum' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.