instruction
stringlengths
12
317
input
stringlengths
38
973
response
stringlengths
25
526
How many scores have a Place of t5?
CREATE TABLE table_name_2 ( score VARCHAR, place VARCHAR )
SELECT COUNT(score) FROM table_name_2 WHERE place = "t5"
What set 2 has a total of 97 74?
CREATE TABLE table_name_85 ( set_2 VARCHAR, total VARCHAR )
SELECT set_2 FROM table_name_85 WHERE total = "97–74"
What is the Facility ID that has a City of license of wheeling, and a ERP kW less than 4.5?
CREATE TABLE table_name_52 ( facility_id INTEGER, city_of_license VARCHAR, erp_kw VARCHAR )
SELECT MAX(facility_id) FROM table_name_52 WHERE city_of_license = "wheeling" AND erp_kw < 4.5
What is the New Zealand Kennel Club Toy Group with papillon as the Australian National Kennel Council Toy Dogs Group breed?
CREATE TABLE table_38761 ( "The Kennel Club (UK) Toy Group" text, "Canadian Kennel Club Toy Dogs Group" text, "American Kennel Club Toy Group" text, "Australian National Kennel Council Toy Dogs Group" text, "New Zealand Kennel Club Toy Group" text )
SELECT "New Zealand Kennel Club Toy Group" FROM table_38761 WHERE "Australian National Kennel Council Toy Dogs Group" = 'papillon'
How many papers are published in total?
CREATE TABLE papers ( Id VARCHAR )
SELECT COUNT(*) FROM papers
What is the nationality with a lane larger than 1, and a rank larger than 5, for Hsu Chi-Chieh?
CREATE TABLE table_63709 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
SELECT "Nationality" FROM table_63709 WHERE "Lane" > '1' AND "Rank" > '5' AND "Name" = 'hsu chi-chieh'
Which Average has Yards larger than 167, and a Team of at tb, and a Week larger than 7?
CREATE TABLE table_name_98 ( average INTEGER, week VARCHAR, yards VARCHAR, team VARCHAR )
SELECT MIN(average) FROM table_name_98 WHERE yards > 167 AND team = "at tb" AND week > 7
What is the highest rank of the player with less than 32 points?
CREATE TABLE table_41871 ( "Rank" real, "Name" text, "Team" text, "Games" real, "Points" real )
SELECT MAX("Rank") FROM table_41871 WHERE "Points" < '32'
Which throw number had a DOB of 19/10/81?
CREATE TABLE table_6136 ( "Surname" text, "First" text, "D.O.B." text, "Uni#" real, "Bats" text, "Throws" text, "Position" text )
SELECT "Throws" FROM table_6136 WHERE "D.O.B." = '19/10/81'
Which rank has canada as the country?
CREATE TABLE table_41386 ( "Publication" text, "Country" text, "Accolade" text, "Year" real, "Rank" text )
SELECT "Rank" FROM table_41386 WHERE "Country" = 'canada'
what is the latest year when the venue is berlin, germany?
CREATE TABLE table_8576 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Notes" text )
SELECT MAX("Year") FROM table_8576 WHERE "Venue" = 'berlin, germany'
what is the virtual callsign if is wnet
CREATE TABLE table_23329 ( "(Virtual)" text, "Callsign" text, "Affiliation" text, "Branding" text, "Channel" text, "Programming" text, "Owner" text )
SELECT "(Virtual)" FROM table_23329 WHERE "Callsign" = 'WNET'
Which highest rank belongs to the palestinian territories?
CREATE TABLE table_6849 ( "Rank" real, "Country" text, "Claimant" text, "Highest point" text, "Height" text )
SELECT MAX("Rank") FROM table_6849 WHERE "Country" = 'palestinian territories'
What is the attendance of the game on July 26?
CREATE TABLE table_name_1 ( attendance INTEGER, date VARCHAR )
SELECT SUM(attendance) FROM table_name_1 WHERE date = "july 26"
What was the highest front row starts for Alain Prost?
CREATE TABLE table_38268 ( "Driver" text, "Season" text, "Entries" real, "Front row starts" real, "Percentage" text )
SELECT MAX("Front row starts") FROM table_38268 WHERE "Driver" = 'alain prost'
Name the most challenge cup for damon gray
CREATE TABLE table_1724 ( "Player" text, "League" real, "Scottish Cup" real, "League Cup" real, "Challenge Cup" real, "Total" real )
SELECT MAX("Challenge Cup") FROM table_1724 WHERE "Player" = 'Damon Gray'
what team is listed after manchester city ?
CREATE TABLE table_203_450 ( id number, "team" text, "outgoing manager" text, "manner of departure" text, "date of vacancy" text, "replaced by" text, "date of appointment" text, "position in table" text )
SELECT "team" FROM table_203_450 WHERE id = (SELECT id FROM table_203_450 WHERE "team" = 'manchester city') + 1
What is the total number of seats with gavin duffy in series 4?
CREATE TABLE table_12149 ( "Seat" real, "Series 1" text, "Series 3" text, "Series 4" text, "Series 5" text )
SELECT COUNT("Seat") FROM table_12149 WHERE "Series 4" = 'gavin duffy'
Name the total number in attendance for when the bulls visited
CREATE TABLE table_name_50 ( attendance VARCHAR, visitor VARCHAR )
SELECT COUNT(attendance) FROM table_name_50 WHERE visitor = "bulls"
Name the h when c max is 99
CREATE TABLE table ( h VARCHAR, c__max_ VARCHAR )
SELECT h FROM table WHERE c__max_ = 99
Where was the game and what was the attendance on April 3?
CREATE TABLE table_74160 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
SELECT "Location Attendance" FROM table_74160 WHERE "Date" = 'April 3'
Give me the comparison about School_ID over the ACC_Road , and group by attribute ACC_Home by a bar chart, and order by the bars in desc.
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text )
SELECT ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road DESC
What is the number of GEO IDs for areas in Riggin township with water area over 0.587 sq mi and ANSI codes over 1759257?
CREATE TABLE table_name_28 ( geo_id VARCHAR, ansi_code VARCHAR, water__sqmi_ VARCHAR, township VARCHAR )
SELECT COUNT(geo_id) FROM table_name_28 WHERE water__sqmi_ > 0.587 AND township = "riggin" AND ansi_code > 1759257
What is the Time/Retired for Grid 6?
CREATE TABLE table_10665 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real )
SELECT "Time/Retired" FROM table_10665 WHERE "Grid" = '6'
How many playerd Mrs. Darling in the 1999 Broadway?
CREATE TABLE table_10312547_1 ( character VARCHAR )
SELECT COUNT(1999 AS _broadway) FROM table_10312547_1 WHERE character = "Mrs. Darling"
What is the name of the episode that was written by Michael Rauch?
CREATE TABLE table_23117208_5 ( title VARCHAR, written_by VARCHAR )
SELECT title FROM table_23117208_5 WHERE written_by = "Michael Rauch"
The season premiere aired on September 11, 2000 aired on how many networks?
CREATE TABLE table_15923 ( "Season" text, "Network" text, "Season premiere" text, "Season finale" text, "TV season" text, "Ranking" text, "Viewers (in millions)" text )
SELECT COUNT("Network") FROM table_15923 WHERE "Season premiere" = 'September 11, 2000'
what is the sum of the gdp -lrb- usd ppp bin , 2012 -rrb- between niger and sierra ?
CREATE TABLE table_203_530 ( id number, "country" text, "gdp (usd bln, 2012)" number, "gdp (usd bln, 2017)" number, "gdp (usd ppp bln, 2012)" number, "gdp (usd ppp bln, 2017)" number, "per capita (usd, 2012)" number, "per capita (usd, 2017)" number, "per capita (usd ppp, 2012)" number, "per capita (usd ppp, 2017)" number )
SELECT SUM("gdp (usd ppp bln, 2012)") FROM table_203_530 WHERE "country" IN ('niger', 'sierra leone')
What is the score with a place of t6 for the player k.j. choi?
CREATE TABLE table_67200 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
SELECT "Score" FROM table_67200 WHERE "Place" = 't6' AND "Player" = 'k.j. choi'
What position is the player from 1987?
CREATE TABLE table_32666 ( "Player" text, "Nationality" text, "Position" text, "From" real, "School/Country" text )
SELECT "Position" FROM table_32666 WHERE "From" = '1987'
Which venue has a Goal of 4?
CREATE TABLE table_name_62 ( venue VARCHAR, goal VARCHAR )
SELECT venue FROM table_name_62 WHERE goal = 4
Which DRG number has xxx railway number?
CREATE TABLE table_64811 ( "Class" text, "Railway number(s)" text, "DRG number(s)" text, "Quantity" real, "Year(s) of manufacture" text, "Axle arrangement ( UIC ) Bauart" text )
SELECT "DRG number(s)" FROM table_64811 WHERE "Railway number(s)" = 'xxx'
what year was clayton 's first album ?
CREATE TABLE table_204_394 ( id number, "year" number, "album" text, "label" text, "peak chart\npositions\nus" number, "peak chart\npositions\nus r&b" number )
SELECT MIN("year") FROM table_204_394
What is the average total medals of the nation with 4 bronze and more than 1 silver medals?
CREATE TABLE table_name_94 ( total INTEGER, bronze VARCHAR, silver VARCHAR )
SELECT AVG(total) FROM table_name_94 WHERE bronze = 4 AND silver > 1
What is the average number of attendees for performances?
CREATE TABLE performance ( performance_id number, date text, host text, location text, attendance number ) CREATE TABLE member_attendance ( member_id number, performance_id number, num_of_pieces number ) CREATE TABLE member ( member_id text, name text, nationality text, role text )
SELECT AVG(attendance) FROM performance
Which of the events only lasted no more than 0:55?
CREATE TABLE table_71518 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
SELECT "Event" FROM table_71518 WHERE "Time" = '0:55'
Which country is the player that went to Oregon?
CREATE TABLE table_16835 ( "Player" text, "No." real, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text )
SELECT "Nationality" FROM table_16835 WHERE "School/Club Team" = 'Oregon'
Which is located in Nigeria?
CREATE TABLE table_name_72 ( name VARCHAR, location VARCHAR )
SELECT name FROM table_name_72 WHERE location = "nigeria"
Which player is featured for 2001-2002?
CREATE TABLE table_name_28 ( player VARCHAR, year VARCHAR )
SELECT player FROM table_name_28 WHERE year = "2001-2002"
Home for away of hispano?
CREATE TABLE table_48380 ( "Date" text, "Home" text, "Score" text, "Away" text, "Attendance" real )
SELECT "Home" FROM table_48380 WHERE "Away" = 'hispano'
Which city does staff with first name as Janessa and last name as Sawayn live?
CREATE TABLE Addresses ( city VARCHAR, address_id VARCHAR ) CREATE TABLE Staff ( staff_address_id VARCHAR, first_name VARCHAR, last_name VARCHAR )
SELECT T1.city FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn"
What nhl team does stan weir play for?
CREATE TABLE table_1473672_2 ( nhl_team VARCHAR, player VARCHAR )
SELECT nhl_team FROM table_1473672_2 WHERE player = "Stan Weir"
What venue had an event on 17 November 1963?
CREATE TABLE table_76279 ( "Season" real, "Date" text, "Winner" text, "Score [C ]" text, "Venue" text, "Competition round" text )
SELECT "Venue" FROM table_76279 WHERE "Season" = '1963' AND "Date" = '17 november 1963'
What rank did actor Aaron Pedersen's character have?
CREATE TABLE table_4556 ( "Actor/actress" text, "Character" text, "Rank" text, "Tenure" text, "Episodes" text )
SELECT "Rank" FROM table_4556 WHERE "Actor/actress" = 'aaron pedersen'
Which Date has an Attendance of 9,535?
CREATE TABLE table_name_73 ( date VARCHAR, attendance VARCHAR )
SELECT date FROM table_name_73 WHERE attendance = "9,535"
What is the site where the game was held in the city of Delaware?
CREATE TABLE table_47860 ( "Date" text, "Time" text, "Opponent" text, "Site" text, "City" text )
SELECT "Site" FROM table_47860 WHERE "City" = 'delaware'
What is NK Rijeka's away score?
CREATE TABLE table_5969 ( "Round" real, "Club" text, "Home" text, "Away" text, "Aggregate" text )
SELECT "Away" FROM table_5969 WHERE "Club" = 'nk rijeka'
How many viewer data were given for episode 'If at First You Don't Succeed, Lie, Lie Again'?
CREATE TABLE table_29271 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (in millions)" text )
SELECT COUNT("U.S. viewers (in millions)") FROM table_29271 WHERE "Title" = 'If at First You Don''t Succeed, Lie, Lie Again'
How many are on the administrative panel with an agricultural panel of fewer than 11 and an industrial and commercial panel of 3, with fewer than 4 on the labor panel?
CREATE TABLE table_7115 ( "Administrative Panel" real, "Agricultural Panel" real, "Cultural and Educational Panel" real, "Industrial and Commercial Panel" real, "Labour Panel" real, "National University of Ireland" real, "University of Dublin" real, "Nominated by the Taoiseach" real, "Total" real )
SELECT AVG("Administrative Panel") FROM table_7115 WHERE "Agricultural Panel" < '11' AND "Industrial and Commercial Panel" = '3' AND "Labour Panel" < '4'
Show team id vs acc_percent as scatter plot use a different color for each All_Games
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 Team_ID, ACC_Percent FROM basketball_match GROUP BY All_Games
What's the listed Hand has 3 credits of 6?
CREATE TABLE table_35136 ( "Hand" text, "1 credit" text, "2 credits" text, "3 credits" text, "4 credits" text, "5 credits" text )
SELECT "Hand" FROM table_35136 WHERE "3 credits" = '6'
Visualize a bar chart for what are the naems of all the projects, and how many scientists were assigned to each of them?
CREATE TABLE AssignedTo ( Scientist int, Project char(4) ) CREATE TABLE Projects ( Code Char(4), Name Char(50), Hours int ) CREATE TABLE Scientists ( SSN int, Name Char(30) )
SELECT Name, COUNT(*) FROM Projects AS T1 JOIN AssignedTo AS T2 ON T1.Code = T2.Project GROUP BY T1.Name
Tell me the the claim date and settlement date for each settlement case.
CREATE TABLE payments ( payment_id number, settlement_id number, payment_method_code text, date_payment_made time, amount_payment number ) CREATE TABLE customer_policies ( policy_id number, customer_id number, policy_type_code text, start_date time, end_date time ) CREATE TABLE claims ( claim_id number, policy_id number, date_claim_made time, date_claim_settled time, amount_claimed number, amount_settled number ) CREATE TABLE customers ( customer_id number, customer_details text ) CREATE TABLE settlements ( settlement_id number, claim_id number, date_claim_made time, date_claim_settled time, amount_claimed number, amount_settled number, customer_policy_id number )
SELECT date_claim_made, date_claim_settled FROM settlements
What was the most total medals awarded to Poland?
CREATE TABLE table_name_37 ( total INTEGER, nation VARCHAR )
SELECT MAX(total) FROM table_name_37 WHERE nation = "poland"
what is the circuit when the winner is stan jones and the race is phillip island trophy race?
CREATE TABLE table_name_3 ( circuit VARCHAR, winner VARCHAR, race VARCHAR )
SELECT circuit FROM table_name_3 WHERE winner = "stan jones" AND race = "phillip island trophy race"
WHAT IS THE ROUND FOR ZACH BOYCHUK?
CREATE TABLE table_49926 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/Junior/Club Team (League)" text )
SELECT COUNT("Round") FROM table_49926 WHERE "Player" = 'zach boychuk'
Who played against Hapoel tel aviv when they were team #1?
CREATE TABLE table_name_89 ( team__number2 VARCHAR, team__number1 VARCHAR )
SELECT team__number2 FROM table_name_89 WHERE team__number1 = "hapoel tel aviv"
What is the average rank of the company with more than 146.56 billion in sales and profits of 11.68 billions?
CREATE TABLE table_43912 ( "Rank" real, "Company" text, "Headquarters" text, "Industry" text, "Sales (billion $)" real, "Profits (billion $)" real, "Assets (billion $)" real, "Market Value (billion $)" real )
SELECT AVG("Rank") FROM table_43912 WHERE "Sales (billion $)" > '146.56' AND "Profits (billion $)" = '11.68'
Plot how many minister by grouped by minister as a bar graph, display y-axis in ascending order.
CREATE TABLE party ( Party_ID int, Minister text, Took_office text, Left_office text, Region_ID int, Party_name text ) CREATE TABLE member ( Member_ID int, Member_Name text, Party_ID text, In_office text ) CREATE TABLE region ( Region_ID int, Region_name text, Date text, Label text, Format text, Catalogue text ) CREATE TABLE party_events ( Event_ID int, Event_Name text, Party_ID int, Member_in_charge_ID int )
SELECT Minister, COUNT(Minister) FROM party GROUP BY Minister ORDER BY COUNT(Minister)
What was the attendance at war memorial stadium?
CREATE TABLE table_4855 ( "Week" real, "Opponent" text, "Result" text, "Stadium" text, "Record" text, "Attenmdance" text )
SELECT "Attenmdance" FROM table_4855 WHERE "Stadium" = 'war memorial stadium'
what is the name of the movement in the 7th position
CREATE TABLE table_31288 ( "Season" text, "Level" text, "Division" text, "Section" text, "Position" text, "Movements" text )
SELECT "Movements" FROM table_31288 WHERE "Position" = '7th'
What's the event that happened in Gander, Newfoundland and Labrador with Randy Ferbey runner-up?
CREATE TABLE table_name_91 ( event VARCHAR, runner_up_skip VARCHAR, location VARCHAR )
SELECT event FROM table_name_91 WHERE runner_up_skip = "randy ferbey" AND location = "gander, newfoundland and labrador"
Give a bar chart that bins year into weekday interval, group by year and count them.
CREATE TABLE artist ( Artist_ID int, Name text, Country text, Year_Join int, Age int ) CREATE TABLE exhibition ( Exhibition_ID int, Year int, Theme text, Artist_ID int, Ticket_Price real ) CREATE TABLE exhibition_record ( Exhibition_ID int, Date text, Attendance int )
SELECT Year, COUNT(Year) FROM exhibition GROUP BY Year
Tell me the distribution of the number of trains at each arrival time with a bar chart.
CREATE TABLE railway_manage ( Railway_ID int, Manager_ID int, From_Year text ) CREATE TABLE railway ( Railway_ID int, Railway text, Builder text, Built text, Wheels text, Location text, ObjectNumber text ) CREATE TABLE manager ( Manager_ID int, Name text, Country text, Working_year_starts text, Age int, Level int ) CREATE TABLE train ( Train_ID int, Train_Num text, Name text, From text, Arrival text, Railway_ID int )
SELECT Arrival, COUNT(Arrival) FROM train GROUP BY Arrival
Show me about the distribution of Sex and the amount of Sex , and group by attribute Sex in a bar chart, and I want to list total number from low to high order please.
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, Unsure_rate real )
SELECT Sex, COUNT(Sex) FROM people GROUP BY Sex ORDER BY COUNT(Sex)
Who has friends that are older than the average age? Print their names and their ages as well using a pie chart.
CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT )
SELECT T1.name, T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name = T2.friend WHERE T1.age > (SELECT AVG(age) FROM Person)
Find the number of people who is under 40 for each gender.
CREATE TABLE personfriend ( name text, friend text, year number ) CREATE TABLE person ( name text, age number, city text, gender text, job text )
SELECT COUNT(*), gender FROM person WHERE age < 40 GROUP BY gender
What was the pole position for jerez?
CREATE TABLE table_name_39 ( pole_position VARCHAR, location VARCHAR )
SELECT pole_position FROM table_name_39 WHERE location = "jerez"
What is the total number of years Andy Murray was at Wimbledon?
CREATE TABLE table_45484 ( "Year" real, "Australian Open" text, "French Open" text, "Wimbledon" text, "US Open" text )
SELECT COUNT("Year") FROM table_45484 WHERE "Wimbledon" = 'andy murray'
What is the name of the race in the Modena circuit?
CREATE TABLE table_16767 ( "Race Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Constructor" text, "Report" text )
SELECT "Race Name" FROM table_16767 WHERE "Circuit" = 'Modena'
What is the 2013 with virgin in 2009?
CREATE TABLE table_name_5 ( Id VARCHAR )
SELECT 2013 FROM table_name_5 WHERE 2009 = "virgin"
Where is Indian Creek school located?
CREATE TABLE table_name_79 ( location VARCHAR, school VARCHAR )
SELECT location FROM table_name_79 WHERE school = "indian creek"
What region is the catalogue number 9362486152 that was from September 3, 2004 from?
CREATE TABLE table_57963 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalogue" text )
SELECT "Region" FROM table_57963 WHERE "Catalogue" = '9362486152' AND "Date" = 'september 3, 2004'
How is the marriage of who became queen on 30 October 1816 husband's accession?
CREATE TABLE table_6115 ( "Name" text, "Birth" text, "Marriage" text, "Became Queen" text, "Ceased to be Queen" text, "Death" text, "Spouse" text )
SELECT "Marriage" FROM table_6115 WHERE "Became Queen" = '30 october 1816 husband''s accession'
What was the loss of the Brewers game when the record was 46-48?
CREATE TABLE table_80391 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text )
SELECT "Loss" FROM table_80391 WHERE "Record" = '46-48'
Name the total viewers on fx+ for 583,000 total viewers
CREATE TABLE table_28753 ( "Episode number (Production number)" text, "Title" text, "Original air date" text, "Total viewers on FX" text, "Total viewers on FX+" text, "Total viewers" text, "Rank on channel" text )
SELECT "Total viewers on FX+" FROM table_28753 WHERE "Total viewers" = '583,000'
What is the total number of medals when there are 18 gold medals?
CREATE TABLE table_75870 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
SELECT SUM("Total") FROM table_75870 WHERE "Gold" = '18'
How many professors who are from either Accounting or Biology department?
CREATE TABLE professor ( dept_code VARCHAR ) CREATE TABLE department ( dept_code VARCHAR, dept_name VARCHAR )
SELECT COUNT(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code = T2.dept_code WHERE T2.dept_name = 'Accounting' OR T2.dept_name = 'Biology'
What is the Result on 26 jan 2005?
CREATE TABLE table_66825 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
SELECT "Result" FROM table_66825 WHERE "Date" = '26 jan 2005'
What date did 'The runner' originally air on?
CREATE TABLE table_30459 ( "Series #" real, "Title" text, "Written by" text, "Directed by" text, "Original air date" text, "Production code" text, "U.S. viewers (millions)" text )
SELECT "Original air date" FROM table_30459 WHERE "Title" = 'The Runner'
What is the number in total of silver with a gold smaller than 0?
CREATE TABLE table_name_91 ( silver VARCHAR, gold INTEGER )
SELECT COUNT(silver) FROM table_name_91 WHERE gold < 0
What was the final score when tracy austin was runner up?
CREATE TABLE table_20986710_1 ( score_in_final VARCHAR, runner_up VARCHAR )
SELECT score_in_final FROM table_20986710_1 WHERE runner_up = "Tracy Austin"
What are the LOA (metres) of boat with sail number M10?
CREATE TABLE table_20854943_2 ( loa__metres_ VARCHAR, sail_number VARCHAR )
SELECT loa__metres_ FROM table_20854943_2 WHERE sail_number = "M10"
Count the number of different complaint type codes.
CREATE TABLE staff ( staff_id number, gender text, first_name text, last_name text, email_address text, phone_number text ) CREATE TABLE customers ( customer_id number, customer_type_code text, address_line_1 text, address_line_2 text, town_city text, state text, email_address text, phone_number text ) CREATE TABLE complaints ( complaint_id number, product_id number, customer_id number, complaint_outcome_code text, complaint_status_code text, complaint_type_code text, date_complaint_raised time, date_complaint_closed time, staff_id number ) CREATE TABLE products ( product_id number, parent_product_id number, product_category_code text, date_product_first_available time, date_product_discontinued time, product_name text, product_description text, product_price number )
SELECT COUNT(DISTINCT complaint_type_code) FROM complaints
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of founder and the sum of price , and group by attribute founder, order by the total number of price in desc please.
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 Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY SUM(Price) DESC
Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.
CREATE TABLE manufacturer ( name VARCHAR, open_year VARCHAR, num_of_shops VARCHAR, Num_of_Factories VARCHAR )
SELECT name, open_year FROM manufacturer WHERE num_of_shops > 10 OR Num_of_Factories < 10
Which Density per km is the lowest one that has a Number (map) smaller than 13, and an Area in km of 11.1?
CREATE TABLE table_name_21 ( density_per_km² INTEGER, number__map_ VARCHAR, area_in_km² VARCHAR )
SELECT MIN(density_per_km²) FROM table_name_21 WHERE number__map_ < 13 AND area_in_km² = 11.1
What airport has an ICAO of Birk?
CREATE TABLE table_name_16 ( airport VARCHAR, icao VARCHAR )
SELECT airport FROM table_name_16 WHERE icao = "birk"
When was the church in Arnafjord built?
CREATE TABLE table_59057 ( "Parish (Prestegjeld)" text, "Sub-Parish (Sokn)" text, "Church Name" text, "Year Built" text, "Location of the Church" text )
SELECT "Year Built" FROM table_59057 WHERE "Location of the Church" = 'arnafjord'
What is the release date for the Chinese title ?
CREATE TABLE table_name_46 ( released_date VARCHAR, chinese_title VARCHAR )
SELECT released_date FROM table_name_46 WHERE chinese_title = "摸摸瓦力欧制造"
Which team has a position higher than 3, a Drawn lower than 12, and a Goals Against higher than 85?
CREATE TABLE table_name_15 ( team VARCHAR, goals_against VARCHAR, drawn VARCHAR, position VARCHAR )
SELECT team FROM table_name_15 WHERE drawn < 12 AND position > 3 AND goals_against > 85
What date is the visitor Ottawa?
CREATE TABLE table_37378 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
SELECT "Date" FROM table_37378 WHERE "Visitor" = 'ottawa'
What number does the player from Ohio play with?
CREATE TABLE table_11545282_10 ( no VARCHAR, school_club_team VARCHAR )
SELECT no FROM table_11545282_10 WHERE school_club_team = "Ohio"
male 35 _ 70 years old
CREATE TABLE table_train_227 ( "id" int, "gender" string, "diabetic" string, "allergic_to_study_products" bool, "hba1c" float, "a1c" float, "age" float, "NOUSE" float )
SELECT * FROM table_train_227 WHERE gender = 'male' AND age >= 35 AND age <= 70
Who did the Blue Jays lose to on July 16?
CREATE TABLE table_14606 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Record" text )
SELECT "Loss" FROM table_14606 WHERE "Date" = 'july 16'
How many loses have points greater than 30, goals scored greater than 59, with a position greater than 5?
CREATE TABLE table_name_84 ( loses INTEGER, position VARCHAR, points VARCHAR, goals_scored VARCHAR )
SELECT SUM(loses) FROM table_name_84 WHERE points > 30 AND goals_scored > 59 AND position > 5
What 1935 has 4 as a 1953?
CREATE TABLE table_name_6 ( Id VARCHAR )
SELECT 1935 FROM table_name_6 WHERE 1953 = "4"
how many stations have at least 5 kw or more listed in the power column ?
CREATE TABLE table_204_164 ( id number, "branding" text, "callsign" text, "frequency" text, "power (kw)" text, "location" text )
SELECT COUNT("branding") FROM table_204_164 WHERE "power (kw)" >= 5
Tell me the average 1st prize for tennessee
CREATE TABLE table_name_55 ( location VARCHAR )
SELECT AVG(1 AS st_prize__) AS $__ FROM table_name_55 WHERE location = "tennessee"
What's 's romanised name?
CREATE TABLE table_25184 ( "Romanised name" text, "Chinese name" text, "age at appointment" real, "Portfolio" text, "Prior occupation" text )
SELECT "Romanised name" FROM table_25184 WHERE "Chinese name" = '梁愛詩'