table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_8085 ( "Season" text, "President" text, "General Sec" text, "Treasurer" text, "Fixtures Sec" text, "Social Sec Bradford" text, "Social Sec Leeds" text, "Media Officer" text )
What kind of Social Sec Leeds has a Media Officer of jason james and a Treasurer of james davidson?
SELECT "Social Sec Leeds" FROM table_8085 WHERE "Media Officer" = 'jason james' AND "Treasurer" = 'james davidson'
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 demographic ( subject_id text, hadm_id t...
how many patients whose diagnoses icd9 code is 57450 and lab test abnormal status is delta?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "57450" AND lab.flag = "delta"
CREATE TABLE table_34290 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
What is the largest overall where the position was linebacker and the pick number was more than 9?
SELECT MAX("Overall") FROM table_34290 WHERE "Position" = 'linebacker' AND "Pick #" > '9'
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 employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), ...
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the trend about commission_pct over hire_date .
SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
CREATE TABLE table_name_78 ( total INTEGER, silver INTEGER )
What is the smallest number of medals a country with more than 14 silver has?
SELECT MIN(total) FROM table_name_78 WHERE silver > 14
CREATE TABLE table_10327 ( "Year" text, "Builder and model name" text, "Length (feet)" real, "Width (inches)" real, "Engine" text, "Numbers" text, "Retired" text )
On buses ranging in numbr 401-484, what is the lowest width that one longer thna 25 feet can have?
SELECT MIN("Width (inches)") FROM table_10327 WHERE "Length (feet)" > '25' AND "Numbers" = '401-484'
CREATE TABLE table_77549 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
who had the high rebounds when the game number was 6?
SELECT "High rebounds" FROM table_77549 WHERE "Game" = '6'
CREATE TABLE table_41098 ( "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, ...
What is the average total 0 are nominated by the Taoiseach and the agricultural panel is greater than 5?
SELECT AVG("Total") FROM table_41098 WHERE "Nominated by the Taoiseach" = '0' AND "Agricultural Panel" > '5'
CREATE TABLE table_7111 ( "Year" real, "Conventional plans" text, "HMOs" text, "PPOs" text, "POS plans" text )
Which conventional plan has a POS of 13%?
SELECT "Conventional plans" FROM table_7111 WHERE "POS plans" = '13%'
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wa...
tell me the amount of output (ml)-icp/ventriculostomy ventricular drainage catheter with icp microsensor right frontal region patient 006-232560 had until 11 days ago.
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-232560')) AND intakeoutput.celllabel = 'outp...
CREATE TABLE table_56996 ( "Round" real, "Overall" real, "Player" text, "Nationality" text, "Club team" text )
What was the overall pick for Doug Sproule of the United States?
SELECT "Overall" FROM table_56996 WHERE "Nationality" = 'united states' AND "Player" = 'doug sproule'
CREATE TABLE Ref_Detention_Type ( detention_type_code VARCHAR(10), detention_type_description VARCHAR(80) ) CREATE TABLE Addresses ( address_id INTEGER, line_1 VARCHAR(120), line_2 VARCHAR(120), line_3 VARCHAR(120), city VARCHAR(80), zip_postcode VARCHAR(20), state_province_county V...
Draw a bar chart about the distribution of other_details and the average of monthly_rental , and group by attribute other_details.
SELECT other_details, AVG(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC
CREATE TABLE table_45518 ( "Rank" text, "Team" text, "Athletes" text, "Run 1" text, "Run 2" text, "Run 3" text, "Run 4" text, "Final" text )
Which Run 3 has a Run 1 of 2:20.10?
SELECT "Run 3" FROM table_45518 WHERE "Run 1" = '2:20.10'
CREATE TABLE table_name_8 ( source VARCHAR, attack VARCHAR )
What Source has an Attack of 9,77%?
SELECT source FROM table_name_8 WHERE attack = "9,77%"
CREATE TABLE table_39581 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real )
What is the average number of cuts made in events with fewer than 1 win and exactly 11 top-10s?
SELECT AVG("Cuts made") FROM table_39581 WHERE "Top-10" = '11' AND "Wins" < '1'
CREATE TABLE table_690 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Status" text, "Opponent" text )
what's the party with opponent being marcy kaptur (d) 75.3% randy whitman (r) 24.7%
SELECT "Party" FROM table_690 WHERE "Opponent" = 'Marcy Kaptur (D) 75.3% Randy Whitman (R) 24.7%'
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE Tags ( Id number, TagName text, Count number, Ex...
late answers that were accepted and most likely have highest score.
SELECT COUNT(DISTINCT (q.Id)) FROM Posts AS q INNER JOIN Posts AS a ON a.ParentId = q.Id INNER JOIN Posts AS aa ON aa.ParentId = q.Id WHERE q.PostTypeId = 1 AND a.PostTypeId = 2 AND aa.PostTypeId = 2 AND q.AcceptedAnswerId = a.Id AND q.AnswerCount >= 2 AND DATEDIFF(DAY, q.CreationDate, CreationDate) <= 7 AND DATEDIFF(D...
CREATE TABLE table_name_31 ( president VARCHAR, year VARCHAR, date VARCHAR )
What is the President with a Year larger than 2011, and a Date with 23 may?
SELECT president FROM table_name_31 WHERE year > 2011 AND date = "23 may"
CREATE TABLE table_name_67 ( draws INTEGER, total VARCHAR, goal_difference VARCHAR )
What is the average number of draws that have a total of 1 and a goal difference of 2:0?
SELECT AVG(draws) FROM table_name_67 WHERE total = 1 AND goal_difference = "2:0"
CREATE TABLE table_37281 ( "Rocket" text, "Country" text, "Type" text, "Launches" real, "Successes" real, "Failures" real, "Partial failures" real )
What are the fewest partial failures associated with 1 launch, India, gslv type, and a Rocket of gslv mk ii?
SELECT MIN("Partial failures") FROM table_37281 WHERE "Launches" = '1' AND "Country" = 'india' AND "Type" = 'gslv' AND "Rocket" = 'gslv mk ii'
CREATE TABLE table_name_41 ( first_year VARCHAR, title VARCHAR )
What is the first year for Popgun?
SELECT first_year FROM table_name_41 WHERE title = "popgun"
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE com...
For MKT 601 what are the course prerequisites ?
SELECT DISTINCT COURSE_1.department, COURSE_1.name, COURSE_1.number FROM course AS COURSE_0 INNER JOIN course_prerequisite ON COURSE_0.course_id = course_prerequisite.course_id INNER JOIN course AS COURSE_1 ON COURSE_1.course_id = course_prerequisite.pre_course_id WHERE COURSE_0.department = 'MKT' AND COURSE_0.number =...
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperio...
what is the maximum yearly number of patients who had s/p thoracotomy - decortication until 2104?
SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnosis.patientunitstayid) AS c1 FROM diagnosis WHERE diagnosis.diagnosisname = 's/p thoracotomy - decortication' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104' GROUP BY STRFTIME('%y', diagnosis.diagnosistime)) AS t1
CREATE TABLE table_47182 ( "Name" text, "Year Began" text, "s Registered user" text, "Updated in past 30 days" text, "Registration" text, "Ability to syndicate off-site feeds" text, "Userpics Free" text, "Userpics Paid" text, "Monthly Cost for Paid Account" text, "Yearly Cost for...
What is Updated In Past 30 Days, when Registration is 'Open to people 13 and over'?
SELECT "Updated in past 30 days" FROM table_47182 WHERE "Registration" = 'open to people 13 and over'
CREATE TABLE table_3378 ( "Episode #" real, "The W\u00f8rd" text, "Guest" text, "Introductory phrase" text, "Original airdate" text, "Production code" real )
What was the original airdate of episode #733?
SELECT "Original airdate" FROM table_3378 WHERE "Episode #" = '733'
CREATE TABLE table_18904831_6 ( date VARCHAR, high_rebounds VARCHAR )
When dydek (11) has the highest rebounds what is the date?
SELECT date FROM table_18904831_6 WHERE high_rebounds = "Dydek (11)"
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, ...
Top viewed posts with suck in the title.
SELECT Id AS "post_link", Score, ViewCount FROM Posts WHERE Title LIKE '%##Word##%' ORDER BY ViewCount DESC LIMIT 50
CREATE TABLE table_name_83 ( venue VARCHAR, score VARCHAR, year VARCHAR )
What venue has 3 & 2 as the score, and 1965 as the year?
SELECT venue FROM table_name_83 WHERE score = "3 & 2" AND year = "1965"
CREATE TABLE table_name_7 ( began_operation INTEGER, length__km_ VARCHAR, stations VARCHAR )
When is the earliest began operation with a length of sultan ismail and over 27 stations?
SELECT MIN(began_operation) FROM table_name_7 WHERE length__km_ = "sultan ismail" AND stations > 27
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40)...
For all employees who have the letters D or S in their first name, return a scatter chart about the correlation between salary and manager_id .
SELECT SALARY, MANAGER_ID FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%'
CREATE TABLE table_name_18 ( grid VARCHAR, time_retired VARCHAR, laps VARCHAR )
what is the grid when the time/retired is +9 laps and the laps is larger than 91?
SELECT COUNT(grid) FROM table_name_18 WHERE time_retired = "+9 laps" AND laps > 91
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_...
i want to find the first flight from BALTIMORE to BOSTON that serves a meal
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, flight, food_service WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON' AND flight.to_airport = AIRPORT_SERVICE_1.airport_code AND food_se...
CREATE TABLE table_name_48 ( year VARCHAR, laps VARCHAR )
What is the year with 116 laps?
SELECT year FROM table_name_48 WHERE laps = 116
CREATE TABLE employees ( first_name VARCHAR, department_id VARCHAR, last_name VARCHAR )
Display the first name, and department number for all employees whose last name is 'McEwen'.
SELECT first_name, department_id FROM employees WHERE last_name = 'McEwen'
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, ...
Find user with given email.
SELECT * FROM Users
CREATE TABLE table_name_7 ( position VARCHAR, pick VARCHAR, player VARCHAR )
Which position had a pick larger than 80 and Walt Mainer as a player?
SELECT position FROM table_name_7 WHERE pick > 80 AND player = "walt mainer"
CREATE TABLE table_26301697_2 ( represents VARCHAR, hometown VARCHAR )
Name the represents for los alcarrizos
SELECT represents FROM table_26301697_2 WHERE hometown = "Los Alcarrizos"
CREATE TABLE table_255 ( "Player" text, "No." text, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text )
During which years did player number 35 play for Jazz?
SELECT "Years for Jazz" FROM table_255 WHERE "No." = '35'
CREATE TABLE table_name_99 ( country VARCHAR, date VARCHAR )
What was the nationality of the winner on December 8, 1968?
SELECT country FROM table_name_99 WHERE date = "december 8, 1968"
CREATE TABLE table_77240 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Opponent" text, "Score" text )
What championship after 1997 was the score 1 6, 4 6, 7 5, 5 7?
SELECT "Championship" FROM table_77240 WHERE "Year" > '1997' AND "Score" = '1–6, 4–6, 7–5, 5–7'
CREATE TABLE Documents ( document_code VARCHAR(15), document_structure_code VARCHAR(15), document_type_code VARCHAR(15), access_count INTEGER, document_name VARCHAR(80) ) CREATE TABLE Images ( image_id INTEGER, image_alt_text VARCHAR(80), image_name VARCHAR(40), image_url VARCHAR(25...
Visualize a pie chart with what are the different role codes for users, and how many users have each?
SELECT role_code, COUNT(*) FROM Users GROUP BY role_code
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE d_icd_diagnoses ( ...
how did patient 26849 first enter the hospital a year before.
SELECT admissions.admission_type FROM admissions WHERE admissions.subject_id = 26849 AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.admittime LIMIT 1
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 lab ( subject_id text, hadm_id text, ...
what is the minimum age of patients who are diagnosed with primary disease aortic insufficiency\re-do sternotomy aortic valve replacement and stayed in hospital for 20 days?
SELECT MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "AORTIC INSUFFICIENCY\RE-DO STERNOTOMY; AORTIC VALVE REPLACEMENT " AND demographic.days_stay = "20"
CREATE TABLE table_39868 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text )
What is the highest number of points for a position less than 3 and less than 1 loss?
SELECT MAX("Points") FROM table_39868 WHERE "Position" < '3' AND "Lost" < '1'
CREATE TABLE table_name_83 ( hometown VARCHAR, college VARCHAR )
What is the hometown of the player who is headed to Duke?
SELECT hometown FROM table_name_83 WHERE college = "duke"
CREATE TABLE table_2941848_10 ( s_color_commentator VARCHAR, pregame_hosts VARCHAR )
Who is the s color commentator when the pregame host is jon sciambi?
SELECT s_color_commentator FROM table_2941848_10 WHERE pregame_hosts = "Jon Sciambi"
CREATE TABLE table_29423 ( "R" real, "Player" text, "Position" text, "The Championship" real, "FA Cup" real, "League Cup" real, "Total" real )
What is the position for the player becchio?
SELECT "Position" FROM table_29423 WHERE "Player" = 'Becchio'
CREATE TABLE table_27877 ( "Settlement" text, "Cyrillic Name Other Names" text, "Type" text, "Population (2011)" real, "Largest ethnic group (2002)" text, "Dominant religion (2002)" text )
How many entries are there for cyrillic name other names where settlement is idvor?
SELECT COUNT("Cyrillic Name Other Names") FROM table_27877 WHERE "Settlement" = 'Idvor'
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
What is the item id of Paul Edwards?
SELECT lab.itemid FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.name = "Paul Edwards"
CREATE TABLE table_73399 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text )
How many vacators have October 22, 1808 as date successor seated?
SELECT COUNT("Vacator") FROM table_73399 WHERE "Date successor seated" = 'October 22, 1808'
CREATE TABLE mountain ( Mountain_ID int, Name text, Height real, Prominence real, Range text, Country text ) CREATE TABLE climber ( Climber_ID int, Name text, Country text, Time text, Points real, Mountain_ID int )
Give me a histogram for how many climbers are from each country?, and could you rank in descending by the x axis?
SELECT Country, COUNT(*) FROM climber GROUP BY Country ORDER BY Country DESC
CREATE TABLE table_name_97 ( minister VARCHAR, portfolio VARCHAR, took_office VARCHAR )
What is Minister, when Portfolio is 'Minister of Pubblic Administration', and when Took Office is '14 November 2002'?
SELECT minister FROM table_name_97 WHERE portfolio = "minister of pubblic administration" AND took_office = "14 november 2002"
CREATE TABLE table_name_97 ( capital VARCHAR, hangul_chosongul VARCHAR )
Which capital has a Hangul of ?
SELECT capital FROM table_name_97 WHERE hangul_chosongul = "경상남도"
CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER )
Visualize a bar chart for what is average age for different job title?, and display by the Y-axis from high to low.
SELECT job, AVG(age) FROM Person GROUP BY job ORDER BY AVG(age) DESC
CREATE TABLE Student_Course_Enrolment ( registration_id INTEGER, student_id INTEGER, course_id INTEGER, date_of_enrolment DATETIME, date_of_completion DATETIME ) CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password...
How many enrolment students in each day? Return a bar chart binning date of enrolment by weekday, rank the number of date of enrolment from high to low order.
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Student_Course_Enrolment ORDER BY COUNT(date_of_enrolment) DESC
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...
what is maximum age of patients whose insurance is government and days of hospital stay is 3?
SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Government" AND demographic.days_stay = "3"
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE labevents ( r...
how long was the first hospital stay of patient 65883?
SELECT STRFTIME('%j', admissions.dischtime) - STRFTIME('%j', admissions.admittime) FROM admissions WHERE admissions.subject_id = 65883 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1
CREATE TABLE table_24105 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Wildcats points" real, "Opponents" real, "Record" text )
How many times did the Wildcats play a game 11 regardless of points scored?
SELECT COUNT("Wildcats points") FROM table_24105 WHERE "Game" = '11'
CREATE TABLE table_name_77 ( total INTEGER, gold VARCHAR, bronze VARCHAR, silver VARCHAR )
What is the lowest total medals when there were 0 gold medals, 0 silver medals, and more than 1 bronze medal?
SELECT MIN(total) FROM table_name_77 WHERE bronze > 1 AND silver = 0 AND gold < 0
CREATE TABLE table_75663 ( "Rank" real, "Municipality" text, "Province" text, "Status" text, "Area (km 2 )" real )
What is the listed Status that has the Province of Ontario and Rank of 86?
SELECT "Status" FROM table_75663 WHERE "Province" = 'ontario' AND "Rank" = '86'
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 re...
Draw a bar chart about the distribution of Date_of_Birth and Height .
SELECT Date_of_Birth, Height FROM people
CREATE TABLE table_79302 ( "Period" text, "Internet Explorer" text, "Firefox" text, "Chrome" text, "Safari" text, "Opera" text, "Other" text )
What opera has 19.87% as the firefox?
SELECT "Opera" FROM table_79302 WHERE "Firefox" = '19.87%'
CREATE TABLE table_25675509_1 ( depth VARCHAR, longitude VARCHAR )
If the longitude is 158.091 e, what is the depth?
SELECT depth FROM table_25675509_1 WHERE longitude = "158.091° E"
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 ( Scho...
Give me the comparison about School_ID over the Team_Name , order X-axis from high to low order.
SELECT Team_Name, School_ID FROM basketball_match ORDER BY Team_Name DESC
CREATE TABLE table_78577 ( "Rider" text, "Bike" text, "Laps" real, "Time" text, "Grid" real )
What is the time of Max Biaggi with more than 2 grids, 20 laps?
SELECT "Time" FROM table_78577 WHERE "Grid" > '2' AND "Laps" = '20' AND "Rider" = 'max biaggi'
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...
what is the number of patients who prefer spanish language?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "SPAN"
CREATE TABLE table_1360997_3 ( winner_2nd VARCHAR, time VARCHAR )
When the time is 1:36.30 what shows as winner?
SELECT winner_2nd FROM table_1360997_3 WHERE time = "1:36.30"
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
what is diagnoses short title and diagnoses long title of subject id 18077?
SELECT diagnoses.short_title, diagnoses.long_title FROM diagnoses WHERE diagnoses.subject_id = "18077"
CREATE TABLE table_name_5 ( accreditation_type VARCHAR, accreditation_level VARCHAR, company_name VARCHAR )
When the Nokia corporation had an accreditation level of joyn, what was the accreditation type?
SELECT accreditation_type FROM table_name_5 WHERE accreditation_level = "joyn" AND company_name = "nokia corporation"
CREATE TABLE table_44981 ( "Year" real, "Starts" real, "Wins" real, "Top 5" real, "Top 10" real, "Poles" real, "Avg. Start" real, "Avg. Finish" real, "Winnings" text, "Position" text )
How much average Finish has Starts of 9, and a Top 10 smaller than 0?
SELECT SUM("Avg. Finish") FROM table_44981 WHERE "Starts" = '9' AND "Top 10" < '0'
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication (...
when did patient 022-87224 receive the last lab test?
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-87224')) ORDER BY lab.labresulttime DESC LIMIT 1
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location...
what are the top four most frequent diagnoses that patients have received in the same month after receiving a replace trach tube?
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissi...
CREATE TABLE table_name_21 ( laps VARCHAR, driver VARCHAR, grid VARCHAR )
What was John Watson's total laps with a grid of less than 7?
SELECT COUNT(laps) FROM table_name_21 WHERE driver = "john watson" AND grid < 7
CREATE TABLE table_name_88 ( pitcher VARCHAR, date VARCHAR )
Who was the pitcher on June 8, 1961?
SELECT pitcher FROM table_name_88 WHERE date = "june 8, 1961"
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 the number of patients whose primary disease is st elevated myocardial infarction/ cardiac cath and procedure short title is cont inv mec ven less than 96 hours.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "ST ELEVATED MYOCARDIAL INFARCTION\CARDIAC CATH" AND procedures.short_title = "Cont inv mec ven <96 hrs"
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) 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, JO...
For those employees who do not work in departments with managers that have ids between 100 and 200, draw a bar chart about the distribution of first_name and manager_id , and show by the X in ascending.
SELECT FIRST_NAME, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_NAME
CREATE TABLE invoice_lines ( id number, invoice_id number, track_id number, unit_price number, quantity number ) CREATE TABLE employees ( id number, last_name text, first_name text, title text, reports_to number, birth_date time, hire_date time, address text, cit...
What are the names of all the playlists?
SELECT name FROM playlists
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
tell me the daily maximum respiration of patient 005-12192 since 12/26/2102.
SELECT MAX(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 = '005-12192')) AND NOT vitalperiodic.respiration IS ...
CREATE TABLE table_18247 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text )
What was the results for the candidates listed as bart gordon (d) 76.5% wallace embry (r) 23.5%?
SELECT "Result" FROM table_18247 WHERE "Candidates" = 'Bart Gordon (D) 76.5% Wallace Embry (R) 23.5%'
CREATE TABLE table_51749 ( "Year" real, "Athlete" text, "Nation" text, "Time" text, "Location" text )
What location had 1:59:12 in time?
SELECT "Location" FROM table_51749 WHERE "Time" = '1:59:12'
CREATE TABLE table_28781 ( "Year (Ceremony)" text, "English title" text, "Arabic title" text, "Director" text, "Result" text )
When salt of this sea is the english title who is the director?
SELECT "Director" FROM table_28781 WHERE "English title" = 'Salt of this Sea'
CREATE TABLE table_22857 ( "Model" text, "Year" text, "Code name" text, "Fab ( nm )" real, "Bus interface" text, "Transistor count (Millions)" real, "Memory max ( MiB )" text, "Core ( MHz )" real, "Memory ( MHz )" text, "Type" text, "Bus Width ( Bit )" real, "DirectX" tex...
What's the bus width (in bit) of the model whose core is 650 MHz?
SELECT COUNT("Bus Width ( Bit )") FROM table_22857 WHERE "Core ( MHz )" = '650'
CREATE TABLE table_61961 ( "President" text, "Treasurer" text, "Secretary" text, "Social AO" text, "Academic AO" text, "Internal CO" text, "External CO" text )
What Social AO has a President of harm van leeuwen?
SELECT "Social AO" FROM table_61961 WHERE "President" = 'harm van leeuwen'
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE T...
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a bar chart about the distribution of hire_date and the average of salary bin hire_date by time, sort by the Y-axis in descending.
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(SALARY) DESC
CREATE TABLE table_21422977_1 ( coalition_parties VARCHAR, nº VARCHAR )
When n is 3, what are all the coaliton parties?
SELECT coalition_parties FROM table_21422977_1 WHERE nº = 3
CREATE TABLE body_builder ( Body_Builder_ID int, People_ID int, Snatch real, Clean_Jerk real, Total real ) CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Birth_Date text, Birth_Place text )
What is the relationship between Clean_Jerk and Total ?
SELECT Clean_Jerk, Total FROM body_builder
CREATE TABLE table_name_48 ( state VARCHAR, member VARCHAR, term_in_office VARCHAR, party VARCHAR )
Which state has a Term in office of 1984 1996, a Party of labor, and a Member of robert tickner?
SELECT state FROM table_name_48 WHERE term_in_office = "1984–1996" AND party = "labor" AND member = "robert tickner"
CREATE TABLE table_8260 ( "Name" text, "Company" text, "Tracking Method" text, "Latest stable release" text, "Price in USD" text )
Which Tracking Method has a Latest stable release of n/a, and a Price in USD of from $202/month?
SELECT "Tracking Method" FROM table_8260 WHERE "Latest stable release" = 'n/a' AND "Price in USD" = 'from $202/month'
CREATE TABLE employees ( id number, last_name text, first_name text, title text, reports_to number, birth_date time, hire_date time, address text, city text, state text, country text, postal_code text, phone text, fax text, email text ) CREATE TABLE albums ( ...
What is the unit price of the tune 'Fast As a Shark'?
SELECT unit_price FROM tracks WHERE name = "Fast As a Shark"
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( ...
how many patients are admitted in emergency room and diagnosed primarily for transient ischemic attack?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND demographic.diagnosis = "TRANSIENT ISCHEMIC ATTACK"
CREATE TABLE table_32871 ( "Adherents" real, "Regular Attendees" real, "% of adherents" text, "Monasteries" real, "Parishes" real, "Average Parish Size" real )
What is the lowest average parish size with 47.2% of adherents and 4,936 regular attendees?
SELECT MIN("Average Parish Size") FROM table_32871 WHERE "% of adherents" = '47.2%' AND "Regular Attendees" > '4,936'
CREATE TABLE table_11598 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text )
On what surface was the tournament with opponents kathleen horvath marcella mesker in the finals?
SELECT "Surface" FROM table_11598 WHERE "Opponents in the final" = 'kathleen horvath marcella mesker'
CREATE TABLE table_21571 ( "Fin. Pos" real, "Car No." real, "Driver" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real, "Laps Led" real, "Points" text )
If grid is 2, what is the minimum fin. pos number?
SELECT MIN("Fin. Pos") FROM table_21571 WHERE "Grid" = '2'
CREATE TABLE table_8307 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
What is the total number of gold medals of slovakia, which has less than 1 silver medal?
SELECT COUNT("Gold") FROM table_8307 WHERE "Silver" < '1' AND "Nation" = 'slovakia'
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime...
is there any results of the microbiology test carried out for patient 031-1337 in 05/this year?
SELECT COUNT(*) > 0 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 DATETIME(microlab.culturetakentime, 'start of year') = DATETIM...
CREATE TABLE table_1109 ( "Rank" real, "Country" text, "International tourist arrivals (2011)" text, "International tourist arrivals (2010)" text, "Change (2010 to 2011)" text, "Change (2009 to 2010)" text )
Name the international tourist arrivals for arrivals 2011 for 8.1 million
SELECT "International tourist arrivals (2010)" FROM table_1109 WHERE "International tourist arrivals (2011)" = '8.1 million'
CREATE TABLE table_203_212 ( id number, "#" number, "district" text, "land area (km2)" number, "population\n(2010 census)" number, "density (persons/km2)" number )
saint lucia has how many districts with a population density below 200 persons per square kilometer ?
SELECT COUNT("district") FROM table_203_212 WHERE "density (persons/km2)" < 200
CREATE TABLE table_38644 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Attendance" real )
Name the average week for result of l 28 17
SELECT AVG("Week") FROM table_38644 WHERE "Result" = 'l 28–17'
CREATE TABLE Institution ( Institution_id text, Institution text, Location text, Founded real, Type text, Enrollment int, Team text, Primary_Conference text, building_id text ) CREATE TABLE protein ( common_name text, protein_name text, divergence_from_human_lineage real...
Show the names and heights of buildings with at least two institutions founded after 1880 Plot them as bar chart, and I want to show Y-axis in descending order.
SELECT Name, Height_feet FROM building AS T1 JOIN Institution AS T2 ON T1.building_id = T2.building_id WHERE T2.Founded > 1880 ORDER BY Height_feet 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, draw a bar chart about the distribution of founder and the average of code , and group by attribute founder, rank y-axis in asc order.
SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T1.Code