table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_8266 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text )
What was the tie number of the game when the queens park rangers were the home team?
SELECT "Tie no" FROM table_8266 WHERE "Home team" = 'queens park rangers'
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), ...
A bar chart about how many students are affected by each allergy type?, show by the y axis in asc.
SELECT AllergyType, COUNT(*) FROM Has_Allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy = T2.Allergy GROUP BY T2.AllergyType ORDER BY COUNT(*)
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE airport_service (...
list all flights from NEW YORK to LAS VEGAS that fly nonstop on sunday and list flights from MEMPHIS to LAS VEGAS that fly nonstop on sunday
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, date_day, days, flight WHERE ((CITY_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.city_name = 'LAS VEGAS' AND dat...
CREATE TABLE table_31482 ( "Country" text, "Number of Troops" real, "% of Total Troops" text, "Troops per one million population" text, "Troops per $1 billion ( USD ) GDP" text )
Name the total number of troops per one million being 2.76
SELECT COUNT("Troops per one million population") FROM table_31482 WHERE "Troops per $1 billion ( USD ) GDP" = '2.76'
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
among patients on nebulizer therapy, how many of them were widowed?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.marital_status = "WIDOWED" AND prescriptions.route = "NEB"
CREATE TABLE table_60864 ( "Round" real, "Circuit" text, "Date" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Team" text )
Who was the winning team at Zandvoort?
SELECT "Winning Team" FROM table_60864 WHERE "Circuit" = 'zandvoort'
CREATE TABLE table_name_5 ( field_goals INTEGER, touchdowns VARCHAR, extra_points VARCHAR )
What is the smallest number of field goals for players with 4 touchdowns and less than 9 extra points?
SELECT MIN(field_goals) FROM table_name_5 WHERE touchdowns = 4 AND extra_points < 9
CREATE TABLE table_33122 ( "Player" text, "Span" text, "Start" real, "Tries" real, "Conv" real, "Pens" real, "Drop" real, "Lost" real, "Draw" real )
What is the number of starts for the player who lost fewer than 22 and has more than 4 tries?
SELECT AVG("Start") FROM table_33122 WHERE "Lost" < '22' AND "Tries" > '4'
CREATE TABLE table_name_92 ( manner_of_departure VARCHAR, outgoing_manager VARCHAR )
What was the manner of departure for the outgoing manager, davide ballardini?
SELECT manner_of_departure FROM table_name_92 WHERE outgoing_manager = "davide ballardini"
CREATE TABLE table_10527215_3 ( fastest_lap VARCHAR, winning_driver VARCHAR, pole_position VARCHAR )
What was Johnny Rutherford's fastest lap while Al Unser was the pole position?
SELECT fastest_lap FROM table_10527215_3 WHERE winning_driver = "Johnny Rutherford" AND pole_position = "Al Unser"
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airp...
which airlines have flights from SAN FRANCISCO to WASHINGTON by way of INDIANAPOLIS
SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTO...
CREATE TABLE table_5763 ( "Candidate" text, "Party" text, "Votes" text, "Quotient" text, "Municipality" text )
Candidate of riikka manner has how many votes?
SELECT "Votes" FROM table_5763 WHERE "Candidate" = 'riikka manner'
CREATE TABLE entrepreneur ( entrepreneur_id number, people_id number, company text, money_requested number, investor text ) CREATE TABLE people ( people_id number, name text, height number, weight number, date_of_birth text )
How many distinct companies are there?
SELECT COUNT(DISTINCT company) FROM entrepreneur
CREATE TABLE table_73681 ( "Name" text, "Position" text, "Period" text, "Appearances\u00b9" real, "Goals\u00b9" real, "Nationality\u00b2" text )
How many players are from the country of Brazil?
SELECT COUNT("Position") FROM table_73681 WHERE "Nationality\u00b2" = 'Brazil'
CREATE TABLE table_name_97 ( game INTEGER, high_assists VARCHAR )
Which Game has High assists of s. threatt (9)?
SELECT MIN(game) FROM table_name_97 WHERE high_assists = "s. threatt (9)"
CREATE TABLE table_60365 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real )
Which Country has a To par smaller than 7, and a Place of 1?
SELECT "Country" FROM table_60365 WHERE "To par" < '7' AND "Place" = '1'
CREATE TABLE table_30063 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text )
Who wrote episode that had 1.97 million u.s. viewers?
SELECT "Written by" FROM table_30063 WHERE "U.S. viewers (million)" = '1.97'
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL )
For those records from the products and each product's manufacturer, give me the comparison about the sum of manufacturer over the name , and group by attribute name by a bar chart, and could you show by the Name in descending?
SELECT T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC
CREATE TABLE table_16047 ( "\u2193 Function / Genus \u2192" text, "Shigella" text, "Salmonella" text, "Yersinia" text, "Escherichia" text )
what's the function / genus with shigella being spa32
SELECT "\u2193 Function / Genus \u2192" FROM table_16047 WHERE "Shigella" = 'Spa32'
CREATE TABLE table_name_97 ( nat VARCHAR, moving_from VARCHAR )
What nation had a moving from of espanyol?
SELECT nat FROM table_name_97 WHERE moving_from = "espanyol"
CREATE TABLE table_name_35 ( gold INTEGER, silver VARCHAR, bronze VARCHAR, total VARCHAR )
Bronze of 0, and a Total of 1, and a Silver smaller than 1 what is the lowest gold?
SELECT MIN(gold) FROM table_name_35 WHERE bronze = 0 AND total = 1 AND silver < 1
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
give me the number of patients whose primary disease is liver transplant and procedure short title is skin & subq dx proc nec?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "LIVER TRANSPLANT" AND procedures.short_title = "Skin & subq dx proc NEC"
CREATE TABLE table_34890 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text )
Which Record has a Loss of o'connor (0-1)?
SELECT "Record" FROM table_34890 WHERE "Loss" = 'o''connor (0-1)'
CREATE TABLE Staff_Roles ( role_code VARCHAR(10), role_description VARCHAR(255) ) CREATE TABLE Grants ( grant_id INTEGER, organisation_id INTEGER, grant_amount DECIMAL(19,4), grant_start_date DATETIME, grant_end_date DATETIME, other_details VARCHAR(255) ) CREATE TABLE Documents ( d...
A pie chart for listing the number of the description of the outcomes for all projects.
SELECT outcome_description, COUNT(outcome_description) FROM Research_Outcomes AS T1 JOIN Project_Outcomes AS T2 ON T1.outcome_code = T2.outcome_code GROUP BY outcome_description
CREATE TABLE table_6136 ( "Surname" text, "First" text, "D.O.B." text, "Uni#" real, "Bats" text, "Throws" text, "Position" text )
Which throw number had a DOB of 19/10/81?
SELECT "Throws" FROM table_6136 WHERE "D.O.B." = '19/10/81'
CREATE TABLE election ( election_id number, counties_represented text, district number, delegate text, party number, first_elected number, committee text ) CREATE TABLE county ( county_id number, county_name text, population number, zip_code text ) CREATE TABLE party ( ...
Which party has the largest number of delegates?
SELECT T2.party FROM election AS T1 JOIN party AS T2 ON T1.party = T2.party_id GROUP BY T1.party ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, ...
what is the hospital admission times of patient 16554 since 2105?
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 16554 AND STRFTIME('%y', admissions.admittime) >= '2105'
CREATE TABLE table_name_1 ( name VARCHAR, a_league VARCHAR )
Which player has an A-League of 150 (4)?
SELECT name FROM table_name_1 WHERE a_league = "150 (4)"
CREATE TABLE table_77858 ( "Code" real, "Type" text, "Name" text, "Area (km 2 )" real, "Population" real, "Regional County Municipality" text, "Metropolitan area" text, "Region" real )
What is the largest area with a Code of 66097, and a Region larger than 6?
SELECT MAX("Area (km 2 )") FROM table_77858 WHERE "Code" = '66097' AND "Region" > '6'
CREATE TABLE table_78040 ( "Full Name" text, "Nickname" text, "Gender" text, "Weight at birth" text, "Meaning" text )
How much did the baby who name means God knows my journey weigh at birth?
SELECT "Weight at birth" FROM table_78040 WHERE "Meaning" = 'god knows my journey'
CREATE TABLE station ( id INTEGER, name TEXT, lat NUMERIC, long NUMERIC, dock_count INTEGER, city TEXT, installation_date TEXT ) CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, e...
For those dates with a max temperature greater than or equal to 80, I would like a line chart to show the tendency, I want to display by the X-axis in desc.
SELECT date, COUNT(date) FROM weather WHERE max_temperature_f >= 80 GROUP BY date ORDER BY date DESC
CREATE TABLE table_23184448_4 ( player VARCHAR, field_goals VARCHAR, blocks VARCHAR )
Name the number of players for field goals being 25 and blocks is 6
SELECT COUNT(player) FROM table_23184448_4 WHERE field_goals = 25 AND blocks = 6
CREATE TABLE Companies ( id int, name text, Headquarters text, Industry text, Sales_billion real, Profits_billion real, Assets_billion real, Market_Value_billion text ) CREATE TABLE Office_locations ( building_id int, company_id int, move_in_year int ) CREATE TABLE building...
List the number of companies for each building in a bar chart.
SELECT T2.name, COUNT(T2.name) FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id = T2.id JOIN Companies AS T3 ON T1.company_id = T3.id GROUP BY T2.name
CREATE TABLE table_19134 ( "Character Name" text, "Voice Actor (Japanese)" text, "Voice Actor (English 1997 / Saban)" text, "Voice Actor (English 1998 / Pioneer)" text, "Voice Actor (English 2006 / FUNimation)" text )
who is the the voice actor (japanese) with character name being goku
SELECT "Voice Actor (Japanese)" FROM table_19134 WHERE "Character Name" = 'Goku'
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 )
Visualize a pie chart with what is average age of male for different job title?
SELECT job, AVG(age) FROM Person WHERE gender = 'male' GROUP BY job
CREATE TABLE table_204_853 ( id number, "pos" number, "grid" number, "no." number, "driver" text, "team" text, "manufacturer" text, "laps" number, "points" number )
how many drivers scored above 150 points ?
SELECT COUNT("driver") FROM table_204_853 WHERE "points" > 150
CREATE TABLE table_204_110 ( id number, "year" number, "champion" text, "city" text, "llws" text, "record" text )
there was a fifth place tie in 1967 , what was the next year to have a fifth place tie ?
SELECT MIN("year") FROM table_204_110 WHERE "llws" = 'fifth place (tie)' AND "year" > 1967
CREATE TABLE table_name_36 ( lost INTEGER, difference VARCHAR )
What is the largest lost stat when the difference is - 19?
SELECT MAX(lost) FROM table_name_36 WHERE difference = "- 19"
CREATE TABLE table_54311 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Round" real, "Time" text, "Location" text )
Tell me the time for martin kampmann
SELECT "Time" FROM table_54311 WHERE "Opponent" = 'martin kampmann'
CREATE TABLE table_name_20 ( wins VARCHAR, stadium VARCHAR )
How many wins did they have at Richmond Cricket Ground Stadium?
SELECT wins FROM table_name_20 WHERE stadium = "richmond cricket ground"
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId nu...
Anonymous Feedback - Top Posts.
SELECT p.Id AS "post_link", p.Score, SUM(CASE WHEN f.VoteTypeId = 2 THEN 1 ELSE 0 END) AS AnonUpvotes, SUM(CASE WHEN f.VoteTypeId = 3 THEN 1 ELSE 0 END) AS AnonDownvotes, COUNT(f.Id) AS TotalAnonVotes FROM Posts AS p INNER JOIN PostFeedback AS f ON p.Id = f.PostId WHERE p.PostTypeId IN (1, 2) AND p.CreationDate >= '201...
CREATE TABLE table_name_20 ( issue VARCHAR, artist VARCHAR, date VARCHAR )
What issue has mort drucker as the artist and february 2001 as the date?
SELECT issue FROM table_name_20 WHERE artist = "mort drucker" AND date = "february 2001"
CREATE TABLE Guests ( guest_id INTEGER, gender_code CHAR(1), guest_first_name VARCHAR(80), guest_last_name VARCHAR(80), date_of_birth DATETIME ) CREATE TABLE View_Unit_Status ( apt_id INTEGER, apt_booking_id INTEGER, status_date DATETIME, available_yn BIT ) CREATE TABLE Apartments ...
Return the booking end dates for the apartments that have type code 'Duplex' and bin the year into weekday interval with a bar chart.
SELECT booking_end_date, COUNT(booking_end_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_78124 ( "Rank" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the number of bronze medals when there are fewer than 0 silver medals?
SELECT SUM("Bronze") FROM table_78124 WHERE "Silver" < '0'
CREATE TABLE table_name_22 ( score VARCHAR, player VARCHAR )
What was Craig Wood's score?
SELECT score FROM table_name_22 WHERE player = "craig wood"
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text...
Visualize a bar chart about the distribution of meter_400 and ID .
SELECT meter_400, ID FROM swimmer
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE dual_c...
one way flights from ONTARIO to TACOMA leaving before 1000 on any day and FIRST class
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE (((fare.round_trip_required = 'NO') AND fare_basis.class_type = 'FIRST' AND fare.fare_basis_code = fare_basis.fare_basis_code AND ...
CREATE TABLE table_26211058_1 ( specimen_weight_size VARCHAR, calculated_activity___ci__ VARCHAR )
If the calculated activity (CI) is 4.96 10 11, what is the specimen weight/size?
SELECT specimen_weight_size FROM table_26211058_1 WHERE calculated_activity___ci__ = "4.96×10 −11"
CREATE TABLE table_name_44 ( record VARCHAR, date VARCHAR )
WHAT IS THE RECORD FOR DATE NOVEMBER 14?
SELECT record FROM table_name_44 WHERE date = "november 14"
CREATE TABLE table_17275810_7 ( replaced_by VARCHAR, team VARCHAR )
Name the replacced by with ascoli
SELECT replaced_by FROM table_17275810_7 WHERE team = "Ascoli"
CREATE TABLE table_76346 ( "Draw" real, "Language" text, "Artist" text, "Song" text, "English translation" text, "Place" real, "Points" real )
What was the english translation for the song by svetlana loboda?
SELECT "English translation" FROM table_76346 WHERE "Artist" = 'svetlana loboda'
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, ...
Top Users from Algeria all wilaya.
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location, WebsiteUrl AS Wesbite, LastAccessDate AS Seen, CreationDate FROM Users WHERE Reputation >= '##MinimalReputation:int?10##' AND (UPPER(Location) LIKE UPPER('%algeria%')) ORDER BY Reputation DESC LIMIT 1000
CREATE TABLE table_55009 ( "Date" text, "Ship" text, "Type" text, "Nationality" text, "Tonnage GRT" real )
Which nationality has a Ship of minteh?
SELECT "Nationality" FROM table_55009 WHERE "Ship" = 'minteh'
CREATE TABLE table_74060 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text )
Who replaced the outgoing manager H sn zkara?
SELECT "Replaced by" FROM table_74060 WHERE "Outgoing manager" = 'Hüsnü Özkara'
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, a...
among patients who were prescribed haldol after they had been diagnosed with third spacing show me the three year survival rate.
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t4.diagnosistime) > 3 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.uniquepid, t2.diagnosistime FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid...
CREATE TABLE table_name_61 ( batting_team VARCHAR, season VARCHAR )
Who was the batting team in the 2006 season?
SELECT batting_team FROM table_name_61 WHERE season = "2006"
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, sp...
what was the last time that the arterial bp mean of patient 26817 was, on the last icu visit, greater than 58.0?
SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26817) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents.itemid...
CREATE TABLE table_name_11 ( imperial VARCHAR, ratio VARCHAR )
What are the imperial size for the unit that has a ratio of 1/20?
SELECT imperial FROM table_name_11 WHERE ratio = "1/20"
CREATE TABLE table_train_41 ( "id" int, "pulmonary_embolization" bool, "hiv_infection" bool, "neutrophil_count" int, "renal_disease" bool, "liver_disease" bool, "serum_creatinine" float, "myocardial_infarction" bool, "NOUSE" float )
acute myocardial infarction or pulmonary embolization
SELECT * FROM table_train_41 WHERE myocardial_infarction = 1 OR pulmonary_embolization = 1
CREATE TABLE table_39094 ( "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 )
When the tries against is 90 how many points are there?
SELECT "Points" FROM table_39094 WHERE "Tries against" = '90'
CREATE TABLE table_name_52 ( event VARCHAR, res VARCHAR, opponent VARCHAR )
Which event resulted in loss with an Opponent of maurice smith?
SELECT event FROM table_name_52 WHERE res = "loss" AND opponent = "maurice smith"
CREATE TABLE chip_model ( model_name text, launch_year number, ram_mib number, rom_mib number, slots text, wifi text, bluetooth text ) CREATE TABLE screen_mode ( graphics_mode number, char_cells text, pixels text, hardware_colours number, used_kb number, map text, ...
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 table_79423 ( "Date" text, "Internet Explorer" text, "Firefox" text, "Safari" text, "Opera" text )
What percentage of browsers were using Internet Explorer in April 2009?
SELECT "Internet Explorer" FROM table_79423 WHERE "Date" = 'april 2009'
CREATE TABLE head ( head_ID int, name text, born_state text, age real ) CREATE TABLE department ( Department_ID int, Name text, Creation text, Ranking int, Budget_in_Billions real, Num_Employees real ) CREATE TABLE management ( department_ID int, head_ID int, tempor...
Show me mean age by born state in a histogram, show Y-axis in descending order.
SELECT born_state, AVG(age) FROM head GROUP BY born_state ORDER BY AVG(age) DESC
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
For those employees who do not work in departments with managers that have ids between 100 and 200, find hire_date and the sum of department_id bin hire_date by weekday, and visualize them by a bar chart, and show y axis in ascending order.
SELECT HIRE_DATE, SUM(DEPARTMENT_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SUM(DEPARTMENT_ID)
CREATE TABLE table_55349 ( "Candidate" text, "Money Raised, 2Q" text, "Loans Received, 2Q" text, "Money Spent, 2Q" text, "Total Receipts" text, "Cash On Hand" text )
How much money was raised in the 2Q when the total receipts were $63,075,927?
SELECT "Money Raised, 2Q" FROM table_55349 WHERE "Total Receipts" = '$63,075,927'
CREATE TABLE Customer_Contact_Channels ( customer_id INTEGER, channel_code VARCHAR(15), active_from_date DATETIME, active_to_date DATETIME, contact_number VARCHAR(50) ) CREATE TABLE Addresses ( address_id INTEGER, address_content VARCHAR(80), city VARCHAR(50), zip_postcode VARCHAR(2...
Return a bar chart showing how many customers whose contact channel code is email for each weekday.
SELECT active_from_date, COUNT(active_from_date) FROM Customers AS t1 JOIN Customer_Contact_Channels AS t2 ON t1.customer_id = t2.customer_id WHERE t2.channel_code = 'Email'
CREATE TABLE table_name_2 ( total VARCHAR, gold VARCHAR, nation VARCHAR )
What is the medal total when there is 2 gold medals, and Brazil (BRA) is the nation?
SELECT total FROM table_name_2 WHERE gold = 2 AND nation = "brazil (bra)"
CREATE TABLE table_name_27 ( year INTEGER, playoffs VARCHAR )
Which year had playoffs of champion?
SELECT AVG(year) FROM table_name_27 WHERE playoffs = "champion"
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
how many patients whose diagnoses long title is ulcer of other part of foot and drug type is base?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Ulcer of other part of foot" AND prescriptions.drug_type = "BASE"
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) ...
Question per Day on StackExchange.
SELECT Date AS "dates", ROUND((SUM(pd.Questions) * 1.00 / COUNT(pd.Date)), 2) AS "questions_per_day" FROM (SELECT SUM(CASE WHEN p.PostTypeId = 1 THEN 1 ELSE 0 END) AS "questions", DATE(p.CreationDate) AS "date" FROM Posts AS p GROUP BY DATE(p.CreationDate)) AS pd GROUP BY Date ORDER BY Date DESC
CREATE TABLE table_67219 ( "Date" text, "Opponent" text, "City" text, "Result" text, "Score" text )
What was the date of the game against Northwestern?
SELECT "Date" FROM table_67219 WHERE "Opponent" = 'northwestern'
CREATE TABLE table_name_97 ( team__number1 VARCHAR, team__number2 VARCHAR )
What is the team #1 that has unics kazan for team #2?
SELECT team__number1 FROM table_name_97 WHERE team__number2 = "unics kazan"
CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimme...
Visualize a bar chart about the distribution of Nationality and the amount of Nationality , and group by attribute Nationality.
SELECT Nationality, COUNT(Nationality) FROM swimmer GROUP BY Nationality
CREATE TABLE table_7468 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
How many points total are there later than 2003?
SELECT SUM("Points") FROM table_7468 WHERE "Year" > '2003'
CREATE TABLE table_17058 ( "Player" text, "Position" text, "School" text, "Hometown" text, "MLB Draft" text )
How many positions did the player from Spring High School play?
SELECT COUNT("Position") FROM table_17058 WHERE "School" = 'Spring High School'
CREATE TABLE table_8667 ( "Province" text, "Capital" text, "Population at 2010 Census" real, "Area (km\u00b2)" real, "Density (2010)" real, "Geographical unit" text, "Number of Cities (kota)" real, "Number of Regencies (kabupaten)" real, "Number of Districts (kecamatan)" real, "V...
What is the average number of regencies (kabupaten) with more than 331 villages and a 2010 population census of 12,982,204?
SELECT AVG("Number of Regencies (kabupaten)") FROM table_8667 WHERE "Villages" > '331' AND "Population at 2010 Census" = '12,982,204'
CREATE TABLE table_10611 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the date of the game at Lake Oval?
SELECT "Date" FROM table_10611 WHERE "Venue" = 'lake oval'
CREATE TABLE plays_games ( stuid number, gameid number, hours_played number ) CREATE TABLE sportsinfo ( stuid number, sportname text, hoursperweek number, gamesplayed number, onscholarship text ) CREATE TABLE video_games ( gameid number, gname text, gtype text ) CREATE TAB...
Show all male student ids who don't play football.
SELECT stuid FROM student WHERE sex = 'M' EXCEPT SELECT stuid FROM sportsinfo WHERE sportname = "Football"
CREATE TABLE table_17965 ( "Ensemble" text, "Gold Medals" real, "Silver Medals" real, "Bronze Medals" real, "Total Medals" real )
How many numbers were listed under Silver Medals for Portsmouth HS?
SELECT COUNT("Silver Medals") FROM table_17965 WHERE "Ensemble" = 'Portsmouth HS'
CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME, Day_Number INTEGER ) CREATE TABLE Employees ( Employee_ID INTEGER, Role_Code CHAR(15), Employee_Name VARCHAR(255), Gender_MFU CHAR(1), Date_of_Birth DATETIME, Other_Details VARCHAR(255) ) CREATE TABLE Documents_to_be_Destroyed ( D...
What are the id of each employee and the number of document destruction authorised by that employee. Visualize by scatter chart.
SELECT Destruction_Authorised_by_Employee_ID, COUNT(*) FROM Documents_to_be_Destroyed GROUP BY Destruction_Authorised_by_Employee_ID
CREATE TABLE table_42158 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Points" text, "Position" text )
In what Season were then less than 3 Races with less than 1 Win?
SELECT AVG("Season") FROM table_42158 WHERE "Races" < '3' AND "Wins" < '1'
CREATE TABLE table_name_97 ( years VARCHAR, decile VARCHAR, area VARCHAR )
Which years have a Decile smaller than 2, and an Area of mohaka?
SELECT years FROM table_name_97 WHERE decile < 2 AND area = "mohaka"
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE Rev...
Search posts by multiple comment text ('OR' operator) and UserId.
SELECT Id AS "comment_link", Score, Text FROM Comments WHERE (UPPER(Text) LIKE UPPER('%##CommentText##%') OR UPPER(Text) LIKE UPPER('%##CommentText2##%')) AND UserId = '##UserId##' ORDER BY Score DESC
CREATE TABLE table_name_44 ( sport VARCHAR, country VARCHAR, year VARCHAR )
Name the sport for puerto rico and year of 2000
SELECT sport FROM table_name_44 WHERE country = "puerto rico" AND year = 2000
CREATE TABLE table_name_43 ( main_span_feet VARCHAR, main_span_metres VARCHAR, rank VARCHAR, year_opened VARCHAR, country VARCHAR )
What is the main span feet from opening year of 1936 in the United States with a rank greater than 47 and 421 main span metres?
SELECT main_span_feet FROM table_name_43 WHERE year_opened = 1936 AND country = "united states" AND rank > 47 AND main_span_metres = "421"
CREATE TABLE table_204_269 ( id number, "week" number, "room" text, "winning couple" text, "2nd couple" text, "3rd couple" text, "chumps" text )
in week 3 the winning couple in guest bedroom 2 was kyal and kara but the chumps were
SELECT "chumps" FROM table_204_269 WHERE "week" = 3 AND "room" = 'guest bedroom 2'
CREATE TABLE table_name_10 ( pens VARCHAR, conv VARCHAR )
I want to know the pens with conv of 6
SELECT pens FROM table_name_10 WHERE conv = "6"
CREATE TABLE table_203_627 ( id number, "no." number, "constituency" text, "created" number, "seats" number, "change" number )
which constituency is listed on top ?
SELECT "constituency" FROM table_203_627 WHERE id = 1
CREATE TABLE table_20167 ( "Year / Theme" text, "Award name" text, "Team name" text, "Team number" real, "City, State/Country" text )
Name the award name for black ocean current
SELECT "Award name" FROM table_20167 WHERE "Team name" = 'BLACK OCEAN CURRENT'
CREATE TABLE table_57448 ( "Name" text, "Bodyweight" real, "Snatch" real, "Clean & jerk" real, "Total (kg)" text )
what is the highest clean & jerk when total (kg) is 200.0 and snatch is more than 87.5?
SELECT MAX("Clean & jerk") FROM table_57448 WHERE "Total (kg)" = '200.0' AND "Snatch" > '87.5'
CREATE TABLE table_name_46 ( total INTEGER, bronze VARCHAR, nation VARCHAR )
What is the least total number of medals when the bronze medals is 1, and Czech Republic (CZE) is the nation?
SELECT MIN(total) FROM table_name_46 WHERE bronze = 1 AND nation = "czech republic (cze)"
CREATE TABLE table_11960407_5 ( date VARCHAR, game VARCHAR )
What is the date of Game 50?
SELECT date FROM table_11960407_5 WHERE game = 50
CREATE TABLE table_name_68 ( lane INTEGER, time VARCHAR, rank VARCHAR )
What is the highest Lane number of a person with a time of 55.94 with a Rank that's bigger than 8?
SELECT MAX(lane) FROM table_name_68 WHERE time > 55.94 AND rank > 8
CREATE TABLE salary ( year INTEGER, team_id TEXT, league_id TEXT, player_id TEXT, salary INTEGER ) CREATE TABLE pitching_postseason ( player_id TEXT, year INTEGER, round TEXT, team_id TEXT, league_id TEXT, w INTEGER, l INTEGER, g INTEGER, gs INTEGER, cg INTEG...
Show me a line chart for how many players enter hall of fame each year?
SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid
CREATE TABLE table_27680 ( "22/06/2008" text, "Indonesia Super Series 2008" text, "S.Series" text, "7800.00" text, "Runner-Up" text )
Which series occurred when the 7800 was 5040.00?
SELECT "Indonesia Super Series 2008" FROM table_27680 WHERE "7800.00" = '5040.00'
CREATE TABLE table_name_98 ( netflix VARCHAR, series_ep VARCHAR )
What is the Netflix episode that has a series episode of 6-02?
SELECT netflix FROM table_name_98 WHERE series_ep = "6-02"
CREATE TABLE table_50528 ( "Year" text, "Winner" text, "Runner-up" text, "Score" text, "Venue" text )
what is the venue on 21 june 1987?
SELECT "Venue" FROM table_50528 WHERE "Year" = '21 june 1987'
CREATE TABLE Documents_with_Expenses ( Document_ID INTEGER, Budget_Type_Code CHAR(15), Document_Details VARCHAR(255) ) CREATE TABLE Statements ( Statement_ID INTEGER, Statement_Details VARCHAR(255) ) CREATE TABLE Accounts ( Account_ID INTEGER, Statement_ID INTEGER, Account_Details VARC...
List document type codes and the number of documents in each code Visualize by bar chart, rank in descending by the y-axis please.
SELECT Document_Type_Code, COUNT(*) FROM Documents GROUP BY Document_Type_Code ORDER BY COUNT(*) DESC
CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE visits_restaurant ( stuid number, resid number, time time, spent number ) CREATE TABLE restaurant_type ( restypeid number, ...
At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.
SELECT restaurant.resname, SUM(visits_restaurant.spent) FROM visits_restaurant JOIN restaurant ON visits_restaurant.resid = restaurant.resid GROUP BY restaurant.resid ORDER BY SUM(visits_restaurant.spent) LIMIT 1