table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_22170 ( "Greek Designation" text, "Collegiate Institution" text, "Charter Date" text, "Status" text, "City" text, "U.S. State/District" text )
how mnay greek designation in tampa
SELECT COUNT("Greek Designation") FROM table_22170 WHERE "City" = 'Tampa'
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, res...
what is the ground transportation available in the city of FORT WORTH
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'FORT WORTH' AND ground_service.city_code = city.city_code
CREATE TABLE table_13355 ( "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
What is Russia's time with a heat higher than 3?
SELECT "Time" FROM table_13355 WHERE "Nationality" = 'russia' AND "Heat" > '3'
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_...
Which classes are prerequisites for most of the other classes and available this semester ?
SELECT COUNT(DISTINCT course_prerequisite.course_id), course.department, course.name, course.number FROM course, course_offering, course_prerequisite, semester WHERE course.course_id = course_offering.course_id AND course.course_id = course_prerequisite.pre_course_id AND course.department = 'EECS' AND semester.semester...
CREATE TABLE table_16086 ( "Year" real, "Games" real, "Games started" real, "Completions" real, "Attempts" real, "Completion %" text, "Yards" real, "Yards/Attempt" text, "Touchdowns" real, "Interceptions" real, "Rating" text )
What number of completions are recorded for the year with 12 games started?
SELECT "Completions" FROM table_16086 WHERE "Games started" = '12'
CREATE TABLE table_13138 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real )
Who was the player for England when the to par is 7?
SELECT "Player" FROM table_13138 WHERE "To par" = '7' AND "Country" = 'england'
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 text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
how many of the female patients were treated with nitroglycerin?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.drug = "Nitroglycerin"
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
give me the number of patients whose marital status is divorced and lab test name is troponin t?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "DIVORCED" AND lab.label = "Troponin T"
CREATE TABLE table_name_40 ( earnings___$__ VARCHAR, player VARCHAR )
What amount of earnings does Tiger Woods have?
SELECT earnings___$__ FROM table_name_40 WHERE player = "tiger woods"
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE code_description ( code varchar, description text ) C...
which airline has the most BUSINESS class flights
SELECT DISTINCT COUNT(*), flight.airline_code FROM fare, fare_basis, flight, flight_fare WHERE fare_basis.class_type = 'BUSINESS' AND fare.fare_basis_code = fare_basis.fare_basis_code AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id GROUP BY flight.airline_code
CREATE TABLE table_11674683_2 ( average VARCHAR, delegate VARCHAR )
Name the average for spain delegate
SELECT average FROM table_11674683_2 WHERE delegate = "Spain"
CREATE TABLE Customers ( Id VARCHAR )
How many customers do we have?
SELECT COUNT(*) FROM Customers
CREATE TABLE table_1425958_1 ( name VARCHAR, _percentage_change VARCHAR )
Where was there a change of 6.5%?
SELECT name FROM table_1425958_1 WHERE _percentage_change = "6.5"
CREATE TABLE Skills ( skill_id INTEGER, skill_code VARCHAR(20), skill_description VARCHAR(255) ) CREATE TABLE Maintenance_Engineers ( engineer_id INTEGER, company_id INTEGER, first_name VARCHAR(50), last_name VARCHAR(50), other_details VARCHAR(255) ) CREATE TABLE Skills_Required_To_Fix...
A stacked bar chart showing the number of engineers for different skill description. The x-axis is skill description and group by other deteails.
SELECT skill_description, COUNT(skill_description) FROM Maintenance_Engineers AS T1 JOIN Engineer_Skills AS T2 ON T1.engineer_id = T2.engineer_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY other_details, skill_description
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE ReviewRejectionReasons ( Id number, Na...
Unsolved high quality ID questions.
SELECT p.Id, Score, Title, 'http://movies.stackexchange.com/questions/' + CAST(p.Id AS TEXT(10)) AS link, CreationDate FROM Posts AS p WHERE DeletionDate IS NULL AND ClosedDate IS NULL AND Tags LIKE '%identify%' AND AcceptedAnswerId IS NULL AND Score > 2 ORDER BY Score DESC
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE microlab ( microl...
was there any results of microbiology tests for the urine, catheter specimen of patient 031-1337 in 05/this year?
SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-1337')) AND microlab.culturesite = 'urine, catheter specimen' AND DATETIME(mic...
CREATE TABLE table_name_88 ( deputy VARCHAR, name VARCHAR )
What is the name of the Deputy when the Name was elizabeth black?
SELECT deputy FROM table_name_88 WHERE name = "elizabeth black"
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) )
what are the names of projects that require more than 300 hours, and how many scientists are assigned to each?, list by the Y-axis in asc please.
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(*)
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
provide the number of patients whose marital status is single and primary disease is angioedema?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.diagnosis = "ANGIOEDEMA"
CREATE TABLE table_8525 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time/Retired" text, "Grid" real )
What is the lowest grid for Roberto Rolfo with more than 26 laps?
SELECT MIN("Grid") FROM table_8525 WHERE "Rider" = 'roberto rolfo' AND "Laps" > '26'
CREATE TABLE table_57977 ( "Team" text, "Games Played" real, "Wins" real, "Losses" real, "Ties" real, "Goals For" real, "Goals Against" real )
What is the total wins with less than 21 goals taken?
SELECT SUM("Wins") FROM table_57977 WHERE "Goals Against" < '21'
CREATE TABLE table_18786 ( "City of license/Market" text, "Station" text, "Channel TV ( DT )" text, "Years owned" text, "Current Status" text )
Which station has a license in Fort Collins, Colorado?
SELECT "Station" FROM table_18786 WHERE "City of license/Market" = 'Fort Collins, Colorado'
CREATE TABLE table_2353 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Boilermakers points" real, "Opponents" real, "Record" text )
What game number had a record of 3-1?
SELECT "Game" FROM table_2353 WHERE "Record" = '3-1'
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
What classes have PreMajor in them ?
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id
CREATE TABLE table_name_63 ( result VARCHAR, award VARCHAR )
What was the result for the Bafta Tv award?
SELECT result FROM table_name_63 WHERE award = "bafta tv award"
CREATE TABLE item ( i_id number, title text ) CREATE TABLE trust ( source_u_id number, target_u_id number, trust number ) CREATE TABLE review ( a_id number, u_id number, i_id number, rating number, rank number ) CREATE TABLE useracct ( u_id number, name text )
For each user, return the name and the average rating of reviews given by them.
SELECT T1.name, AVG(T2.rating) FROM useracct AS T1 JOIN review AS T2 ON T1.u_id = T2.u_id GROUP BY T2.u_id
CREATE TABLE table_name_65 ( elmers_end VARCHAR, bingham_road VARCHAR )
What is the Elmers End with a 09:54 Bingham Road?
SELECT elmers_end FROM table_name_65 WHERE bingham_road = "09:54"
CREATE TABLE table_29899 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
What is the date the high points was lamarcus aldridge (36)?
SELECT "Date" FROM table_29899 WHERE "High points" = 'LaMarcus Aldridge (36)'
CREATE TABLE table_name_79 ( score VARCHAR, date VARCHAR )
What is the score of the match on July 29, 1990?
SELECT score FROM table_name_79 WHERE date = "july 29, 1990"
CREATE TABLE table_1147705_1 ( engine_type VARCHAR, model VARCHAR )
How many have are model 2.4 awd?
SELECT COUNT(engine_type) FROM table_1147705_1 WHERE model = "2.4 AWD"
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description...
cte - finding for each child - its top parent..
SELECT 'Hello'
CREATE TABLE table_54281 ( "IWCR No." text, "Name" text, "Wheel arrangement" text, "SR No." text, "Year made" real, "Year withdrawn" real )
Which SR number had a wheel arrangement of 0-6-0t, the year made was more recent than 1874, and the year withdrawn was 1963?
SELECT "SR No." FROM table_54281 WHERE "Wheel arrangement" = '0-6-0t' AND "Year made" > '1874' AND "Year withdrawn" = '1963'
CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar, wide_body varchar, wing_span int, length int, weight int, capacity int, pay_load int, cruising_speed int, range_...
please show me airlines with round trip flights from BOSTON to DENVER stop PHILADELPHIA
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, fare, flight, flight_fare, flight_stop WHERE ((CITY_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.ci...
CREATE TABLE table_35025 ( "Round" text, "Pick" text, "Player" text, "Position" text, "College" text )
Which college is Kellen Davis from?
SELECT "College" FROM table_35025 WHERE "Player" = 'kellen davis'
CREATE TABLE table_name_30 ( player VARCHAR, college_junior_club_team__league_ VARCHAR )
Who is the player that is part of the team Shawinigan Dynamos (Qmjhl)?
SELECT player FROM table_name_30 WHERE college_junior_club_team__league_ = "shawinigan dynamos (qmjhl)"
CREATE TABLE table_204_673 ( id number, "name" text, "egot completed" text, "emmy" number, "grammy" number, "oscar" number, "tony" number )
which actor/actress took the most years to complete egot ?
SELECT "name" FROM table_204_673 ORDER BY "egot completed" DESC LIMIT 1
CREATE TABLE table_204_941 ( id number, "#" number, "date" text, "visitor" text, "score" text, "home" text, "record" text )
was the result of the game on the 2nd the same as the game on the 23rd ?
SELECT (SELECT "score" FROM table_204_941 WHERE "date" = 2) = (SELECT "score" FROM table_204_941 WHERE "date" = 23)
CREATE TABLE Products ( Product_ID VARCHAR(100), Product_Name VARCHAR(255), Product_Price DECIMAL(20,4), Product_Description VARCHAR(255), Other_Product_Service_Details VARCHAR(255) ) CREATE TABLE Bookings_Services ( Order_ID INTEGER, Product_ID INTEGER ) CREATE TABLE Order_Items ( Ord...
What are the names of the workshop groups that have bookings with status code 'stop', and count them by a bar chart, sort Store_Name in desc order.
SELECT Store_Name, COUNT(Store_Name) FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = "stop" GROUP BY Store_Name ORDER BY Store_Name DESC
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE airport_service ( city_code varchar, ...
is ground transportation available in PHILADELPHIA
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'PHILADELPHIA' AND ground_service.city_code = city.city_code
CREATE TABLE table_74572 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What is the date of the game where the home team scored 9.10 (64)?
SELECT "Date" FROM table_74572 WHERE "Home team score" = '9.10 (64)'
CREATE TABLE table_name_89 ( altitude__mslm_ INTEGER, density__inhabitants_km_2__ VARCHAR, common_of VARCHAR )
Which Altitude (mslm) has a Density (inhabitants/km 2) smaller than 1467.5, and a Common of moncalieri?
SELECT SUM(altitude__mslm_) FROM table_name_89 WHERE density__inhabitants_km_2__ < 1467.5 AND common_of = "moncalieri"
CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE ta ( campus_job_id int, student_id int...
In Spring and Summer how many 300 -level classes are being offered ?
SELECT COUNT(DISTINCT course.course_id, semester.semester) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester IN ('SP', 'SS', 'SU') AND semester.semester_id = course_offering.se...
CREATE TABLE table_name_31 ( catalogno VARCHAR, year VARCHAR, remark VARCHAR )
What catalogno was in 1971 and had a remark of #27 us?
SELECT catalogno FROM table_name_31 WHERE year = 1971 AND remark = "#27 us"
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_nam...
when was patient 83079 discharged for the last time since 2100?
SELECT admissions.dischtime FROM admissions WHERE admissions.subject_id = 83079 AND STRFTIME('%y', admissions.dischtime) >= '2100' ORDER BY admissions.dischtime DESC LIMIT 1
CREATE TABLE table_80076 ( "NIR Number" text, "Introduced" text, "BR Number(s)" text, "Built" text, "Type" text )
Which NIR number is for the tso (ex-br class 488 unit 488305) type that has a 6082 / 72605 BR number?
SELECT "NIR Number" FROM table_80076 WHERE "Type" = 'tso (ex-br class 488 unit 488305)' AND "BR Number(s)" = '6082 / 72605'
CREATE TABLE table_10977 ( "Name" text, "Street address in Detroit" text, "Years as tallest" text, "Height feet / m" text, "Floors" real )
Which place has 23 floors and a street address in Detroit of 144 west congress street?
SELECT "Name" FROM table_10977 WHERE "Floors" = '23' AND "Street address in Detroit" = '144 west congress street'
CREATE TABLE table_5313 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text )
Which republican was first elected in 1886 in the district of ohio 17?
SELECT "Result" FROM table_5313 WHERE "Party" = 'republican' AND "First elected" = '1886' AND "District" = 'ohio 17'
CREATE TABLE table_40907 ( "Block" text, "Launched" real, "Operational" real, "Not usable" real, "Retired" real, "Launch Failures" real )
What is the average number of not usable satellited when there are 0 retired, and the launch failures are less than 1?
SELECT AVG("Not usable") FROM table_40907 WHERE "Retired" = '0' AND "Launch Failures" < '1'
CREATE TABLE table_name_53 ( player VARCHAR, college VARCHAR )
What player attended UAB college?
SELECT player FROM table_name_53 WHERE college = "uab"
CREATE TABLE table_76148 ( "Pick #" real, "NFL Team" text, "Player" text, "Position" text, "College" text )
If the Position is Running Back what is the Total number of Pick #?
SELECT COUNT("Pick #") FROM table_76148 WHERE "Position" = 'running back'
CREATE TABLE table_name_49 ( Id VARCHAR )
What is the 1938 that has N/A for 1948?
SELECT 1938 FROM table_name_49 WHERE 1948 = "n/a"
CREATE TABLE table_name_51 ( engine VARCHAR, year VARCHAR, points VARCHAR )
Which engine has a year later than 2006 and 60 as the points?
SELECT engine FROM table_name_51 WHERE year > 2006 AND points = "60"
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
give me the number of patients whose age is less than 61 and diagnoses long title is pseudomonas infection in conditions classified elsewhere and of unspecified site?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "61" AND diagnoses.long_title = "Pseudomonas infection in conditions classified elsewhere and of unspecified site"
CREATE TABLE table_31868 ( "Year" real, "Tournaments played" real, "Cuts made*" real, "Wins" real, "Top 10s" real, "Best finish" text, "Earnings ($)" real, "Money list rank" text, "Scoring average" real, "Scoring rank" text )
When the Top 10s is larger than 0 and the scoring average 73.04, what is the best finish?
SELECT "Best finish" FROM table_31868 WHERE "Top 10s" > '0' AND "Scoring average" = '73.04'
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_...
For those employees who was hired before 2002-06-21, a line chart shows the change of commission_pct over hire_date, list X-axis in asc order.
SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY HIRE_DATE
CREATE TABLE table_37971 ( "Tournament" text, "2001" text, "2002" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2011" text, "2012" text, "2013" text, "Career SR" text, "Career Win-Loss" text )
Which 2003 has a 2013 of 1r, and a 2007 of 2r?
SELECT "2003" FROM table_37971 WHERE "2013" = '1r' AND "2007" = '2r'
CREATE TABLE table_name_46 ( city VARCHAR, state VARCHAR, year VARCHAR )
What is the city that is located in California when the year is greater than 2009?
SELECT city FROM table_name_46 WHERE state = "california" AND year > 2009
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE countries ( COUNTRY...
For those employees who do not work in departments with managers that have ids between 100 and 200, show me about the distribution of hire_date and the amount of hire_date bin hire_date by time in a bar chart, could you rank y axis from low to high order?
SELECT HIRE_DATE, COUNT(HIRE_DATE) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COUNT(HIRE_DATE)
CREATE TABLE game ( stadium_id int, id int, Season int, Date text, Home_team text, Away_team text, Score text, Competition text ) CREATE TABLE injury_accident ( game_id int, id int, Player text, Injury text, Number_of_matches text, Source text ) CREATE TABLE sta...
Show the number of games in each season and group by away team in a group line chart The x-axis is season, list by the X-axis in asc.
SELECT Season, COUNT(Season) FROM game GROUP BY Away_team ORDER BY Season
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) ...
what was the first respiration in patient 029-26705's body?
SELECT vitalperiodic.respiration FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '029-26705')) AND NOT vitalperiodic.respiration IS NULL ...
CREATE TABLE table_name_3 ( attendance INTEGER, week VARCHAR )
What's the lowest Attendance for a Week of 2?
SELECT MIN(attendance) FROM table_name_3 WHERE week = 2
CREATE TABLE table_28481 ( "Episode" text, "Theme" text, "Song choice" text, "Original recording artist" text, "Order #" text, "Result" text )
What was the order # or Erma Franklin?
SELECT "Order #" FROM table_28481 WHERE "Original recording artist" = 'Erma Franklin'
CREATE TABLE table_15681 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real )
Which engine scored 9 points?
SELECT "Engine" FROM table_15681 WHERE "Points" = '9'
CREATE TABLE table_name_94 ( date VARCHAR, type_of_game VARCHAR )
When was the WC 1974 Qualifying game?
SELECT date FROM table_name_94 WHERE type_of_game = "wc 1974 qualifying"
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob...
what are the three most common drugs that were prescribed to the patients 20s after being diagnosed with respirator depend status since 6 years ago within the same month?
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
CREATE TABLE table_name_5 ( award VARCHAR, year VARCHAR )
What Award has a date of 2002?
SELECT award FROM table_name_5 WHERE year = 2002
CREATE TABLE table_12928 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real )
Which Total has a Year(s) won of 1991?
SELECT MIN("Total") FROM table_12928 WHERE "Year(s) won" = '1991'
CREATE TABLE table_2562572_43 ( cyrillic_name_other_names VARCHAR, settlement VARCHAR )
How many entries are there for cyrillic name other names where settlement is idvor?
SELECT COUNT(cyrillic_name_other_names) FROM table_2562572_43 WHERE settlement = "Idvor"
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId numb...
My answers with non Delphi tag. List all answer posts to questions without Delphi tag.
SELECT Answer.Id AS "post_link", Answer.Score AS "score", Question.Tags, Answer.CreationDate AS "creation_date" FROM Posts AS Question LEFT JOIN Posts AS Answer ON Question.Id = Answer.ParentId WHERE Answer.PostTypeId = 2 AND Answer.OwnerUserId = @MyUserID AND Question.Tags LIKE '%<server-socket>%' ORDER BY Question.Cr...
CREATE TABLE party ( Party_ID int, Year real, Party text, Governor text, Lieutenant_Governor text, Comptroller text, Attorney_General text, US_Senate text ) CREATE TABLE election ( Election_ID int, Counties_Represented text, District int, Delegate text, Party int, ...
What are the name and population of each county Plot them as bar chart, list by the Y in descending.
SELECT County_name, Population FROM county ORDER BY Population DESC
CREATE TABLE table_24915874_1 ( weight__kg_ VARCHAR, horse VARCHAR )
What was the weight in kg when the horse was Alcopop?
SELECT weight__kg_ FROM table_24915874_1 WHERE horse = "Alcopop"
CREATE TABLE table_name_30 ( open_cup VARCHAR, division INTEGER )
WHich Open Cup has a Division larger than 4?
SELECT open_cup FROM table_name_30 WHERE division > 4
CREATE TABLE table_name_36 ( finish VARCHAR, country VARCHAR )
What was the finish by the player from West Germany?
SELECT finish FROM table_name_36 WHERE country = "west germany"
CREATE TABLE table_79634 ( "Debut year" real, "Player" text, "Games" real, "Goals" real, "Years at club" text )
Which player debuted before 1943, played for the club in 1942, played less than 12 games, and scored less than 11 goals?
SELECT "Player" FROM table_79634 WHERE "Debut year" < '1943' AND "Games" < '12' AND "Goals" < '11' AND "Years at club" = '1942'
CREATE TABLE table_name_24 ( constructor VARCHAR, laps VARCHAR, driver VARCHAR )
Who built michael schumacher's car that went under 31 laps?
SELECT constructor FROM table_name_24 WHERE laps < 31 AND driver = "michael schumacher"
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
Calculate the total number of patients from hispanic or latino - puertorican ethnic origin who received additive therapy
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.drug_type = "ADDITIVE"
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
give me the number of patients with hypoxia primary disease who had inpatient hospital admission.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.diagnosis = "HYPOXIA"
CREATE TABLE table_73633 ( "Institution" text, "Location" text, "Team Name" text, "Founded" real, "Affiliation" text, "Enrollment" real, "Year Joined" real )
What is the location for the team name of eagles?
SELECT "Location" FROM table_73633 WHERE "Team Name" = 'Eagles'
CREATE TABLE election ( Election_ID int, Counties_Represented text, District int, Delegate text, Party int, First_Elected real, Committee text ) CREATE TABLE county ( County_Id int, County_name text, Population real, Zip_code text ) CREATE TABLE party ( Party_ID int, ...
Show the number of delegates in each committee with a bar chart, and display in descending by the y axis.
SELECT Committee, COUNT(Committee) FROM election GROUP BY Committee ORDER BY COUNT(Committee) DESC
CREATE TABLE table_name_13 ( attendance VARCHAR, week VARCHAR )
What was the attendance in week 6?
SELECT attendance FROM table_name_13 WHERE week = 6
CREATE TABLE table_16163 ( "Season" text, "Team" text, "League Apps" real, "League Goals" real, "Cup Apps" real, "Cup Goals" real )
What is the team for season 1911-12?
SELECT "Team" FROM table_16163 WHERE "Season" = '1911-12'
CREATE TABLE table_23597 ( "Draw" real, "Artist" text, "Song" text, "Regions" real, "Studio Audience" real, "Press Jury" real, "Oil Rig" real, "Total Points" real, "Place" text )
What's the oil rig of the song that ended on 7th place?
SELECT "Oil Rig" FROM table_23597 WHERE "Place" = '7th'
CREATE TABLE table_name_6 ( canadian_championship VARCHAR, concacaf_champions_league VARCHAR )
What Canadian Championship had CONCACAF Champions League of semifinals?
SELECT canadian_championship FROM table_name_6 WHERE concacaf_champions_league = "semifinals"
CREATE TABLE table_71795 ( "Manager" text, "Years" text, "Games" real, "Wins" real, "Losses" real )
What was Jim Hoff's sum of losses and a wins smaller than 12?
SELECT SUM("Losses") FROM table_71795 WHERE "Manager" = 'jim hoff' AND "Wins" < '12'
CREATE TABLE table_2675 ( "Year" text, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race time" text, "Average speed (mph)" text, "Report" text )
On how many dates was the average speed of the race 91.033 MPH?
SELECT COUNT("Date") FROM table_2675 WHERE "Average speed (mph)" = '91.033'
CREATE TABLE table_name_90 ( chemical_class VARCHAR, example VARCHAR )
Which chemical class uses the example Chloroethane (ethyl chloride)?
SELECT chemical_class FROM table_name_90 WHERE example = "chloroethane (ethyl chloride)"
CREATE TABLE table_name_60 ( runner_s__up VARCHAR, championship VARCHAR, year VARCHAR )
In 1946, what is the Runner(s)-up of the Women's Western Open Championship?
SELECT runner_s__up FROM table_name_60 WHERE championship = "women's western open" AND year = 1946
CREATE TABLE table_43778 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text )
What is IATA, when ICAO is 'VHHH'?
SELECT "IATA" FROM table_43778 WHERE "ICAO" = 'vhhh'
CREATE TABLE table_65429 ( "Season" text, "1st round" text, "2nd round" text, "3rd round" text, "Finals" text )
Which Season has Finals of out of playoffs.?
SELECT "Season" FROM table_65429 WHERE "Finals" = 'out of playoffs.'
CREATE TABLE table_204_779 ( id number, "network name" text, "flagship" text, "programming type" text, "owner" text, "affiliates" number )
what is the average number of affiliates that a given network will have ?
SELECT AVG("affiliates") FROM table_204_779
CREATE TABLE table_name_69 ( rating INTEGER, viewers__m_ VARCHAR, overall_rank VARCHAR )
What is the rating of the episode with 13.47 million viewers and overall rank larger than 6?
SELECT SUM(rating) FROM table_name_69 WHERE viewers__m_ = 13.47 AND overall_rank > 6
CREATE TABLE table_name_67 ( south_marquesan VARCHAR, sāmoan VARCHAR )
What kind of South Marquesan has a S moan of /matua/?
SELECT south_marquesan FROM table_name_67 WHERE sāmoan = "/matua/"
CREATE TABLE table_72905 ( "Class" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Verb meaning" text )
What is the part 4 when part 1 is 'lesan'?
SELECT "Part 4" FROM table_72905 WHERE "Part 1" = 'lesan'
CREATE TABLE table_21397 ( "Year (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Director" text, "Result" text )
What year and ceremony was the original title (britter baire)?
SELECT "Year (Ceremony)" FROM table_21397 WHERE "Original title" = 'বৃত্তের বাইরে (Britter Baire)'
CREATE TABLE table_51517 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
What was the home team that had a score of 6.20 (56)
SELECT "Home team" FROM table_51517 WHERE "Home team score" = '6.20 (56)'
CREATE TABLE table_76461 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text )
Which Score has a Location of richfield coliseum?
SELECT "Score" FROM table_76461 WHERE "Location" = 'richfield coliseum'
CREATE TABLE table_name_25 ( tournament VARCHAR )
What's the tournamnet name that has a 2001 of 1r and 2011?
SELECT tournament FROM table_name_25 WHERE 2001 = "1r" AND 2011 = "a"
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 )
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of name and the average of price , and group by attribute name, and could you list by the bars in desc?
SELECT T2.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC
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, return a bar chart about the distribution of name and the sum of code , and group by attribute name, display in descending by the X.
SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T2.Name DESC
CREATE TABLE lapTimes ( raceId INTEGER, driverId INTEGER, lap INTEGER, position INTEGER, time TEXT, milliseconds INTEGER ) CREATE TABLE results ( resultId INTEGER, raceId INTEGER, driverId INTEGER, constructorId INTEGER, number INTEGER, grid INTEGER, position TEXT, ...
What are the names of all the Japanese constructors that have earned more than 5 points, and count them by a bar chart, and order by the names in descending please.
SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name ORDER BY name DESC