table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
CREATE TABLE table_11504 ( "Rank" real, "Player" text, "Country" text, "Earnings ( $ )" real, "Events" real, "Wins" real )
What is the average events that Al Geiberger played with wins smaller than 1?
SELECT AVG("Events") FROM table_11504 WHERE "Player" = 'al geiberger' AND "Wins" < '1'
CREATE TABLE table_name_95 ( founded INTEGER, joined_prsl VARCHAR, home_city VARCHAR )
When is the club founded that founed prsl in 2008 and the home city is carolina 1?
SELECT MAX(founded) FROM table_name_95 WHERE joined_prsl = 2008 AND home_city = "carolina 1"
CREATE TABLE customers_cards ( card_id number, customer_id number, card_type_code text, card_number text, date_valid_from time, date_valid_to time, other_card_details text ) CREATE TABLE customers ( customer_id number, customer_first_name text, customer_last_name text, custo...
How many cards does customer Art Turcotte have?
SELECT COUNT(*) FROM customers_cards AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.customer_first_name = "Art" AND T2.customer_last_name = "Turcotte"
CREATE TABLE table_name_98 ( event VARCHAR, method VARCHAR )
What event did Mikhail Avetisyan win by method of DQ (eye gouging)?
SELECT event FROM table_name_98 WHERE method = "dq (eye gouging)"
CREATE TABLE table_28019988_5 ( series__number INTEGER, production_code VARCHAR )
What episode number in the series had a production code of bdf405?
SELECT MIN(series__number) FROM table_28019988_5 WHERE production_code = "BDF405"
CREATE TABLE company ( Company_ID real, Name text, Headquarters text, Industry text, Sales_in_Billion real, Profits_in_Billion real, Assets_in_Billion real, Market_Value_in_Billion real ) CREATE TABLE employment ( Company_ID int, People_ID int, Year_working int ) CREATE TAB...
Show the number of headquarters from each headquarters, could you order by the total number in ascending?
SELECT Headquarters, COUNT(Headquarters) FROM company GROUP BY Headquarters ORDER BY COUNT(Headquarters)
CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varch...
When Prof. Edward Chamberlin teaches it , does PROSTHOD 879 have a lab ?
SELECT COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course.department = 'PROS...
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) 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, ...
What class can I take to get the MDE requirement done easily ?
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%MDE%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_cou...
CREATE TABLE table_name_19 ( venue VARCHAR, host VARCHAR )
What is the venue at Stanford University?
SELECT venue FROM table_name_19 WHERE host = "stanford university"
CREATE TABLE table_name_45 ( byes INTEGER, wins VARCHAR, against VARCHAR, club VARCHAR )
Which Byes has an Against smaller than 1297, and a Club of avoca, and Wins larger than 12?
SELECT AVG(byes) FROM table_name_45 WHERE against < 1297 AND club = "avoca" AND wins > 12
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...
Visualize the relationship between Team_ID and All_Games_Percent , and group by attribute All_Road.
SELECT Team_ID, All_Games_Percent FROM basketball_match GROUP BY All_Road
CREATE TABLE table_74617 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
When was the game where the away team had a score of 13.8 (86)?
SELECT "Date" FROM table_74617 WHERE "Away team score" = '13.8 (86)'
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...
get me the number of patients admitted before 2129 who had lymphocytes, percent lab test done.
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2129" AND lab.label = "Lymphocytes, Percent"
CREATE TABLE table_2289 ( "Type" text, "Beam height (mm)" real, "Flange width (mm)" real, "Web thickness (mm)" text, "Flange thickness (mm)" text, "Weight (kg/m)" text, "Cross-section area (cm 2 )" text, "Moment of inertia in torsion (J) (cm 4 )" text )
What is the flange thickness when the weight is 19.9?
SELECT "Flange thickness (mm)" FROM table_2289 WHERE "Weight (kg/m)" = '19.9'
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,...
For those employees who was hired before 2002-06-21, give me the comparison about the sum of salary over the job_id , and group by attribute job_id.
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewT...
Posts with a few edits after CW-ification.
WITH cw_cte AS (SELECT ph.Id AS cwid, ph.PostId AS pid FROM PostHistory AS ph INNER JOIN Posts AS p ON ph.PostId = p.Id WHERE (ph.PostHistoryTypeId = 16)) SELECT COUNT(DISTINCT RevisionGUID), ph.PostId AS "post_link", revisions = 'site://posts/' + CAST(ph.PostId AS TEXT) + '/revisions' FROM cw_cte AS c INNER JOIN PostH...
CREATE TABLE table_22496344_1 ( weight INTEGER, _number VARCHAR )
What is the weight when 20 is the number?
SELECT MAX(weight) FROM table_22496344_1 WHERE _number = 20
CREATE TABLE table_name_67 ( Id VARCHAR )
What is the 2007 value with 2r in 2011 and 2r in 2008?
SELECT 2007 FROM table_name_67 WHERE 2011 = "2r" AND 2008 = "2r"
CREATE TABLE table_203_631 ( id number, "year" number, "name of show" text, "episodes" text, "other guests" text, "winner(s)" text )
how many of shows had at least 5 episodes ?
SELECT COUNT(DISTINCT "name of show") FROM table_203_631 WHERE "episodes" >= 5
CREATE TABLE table_name_29 ( time VARCHAR, song_title VARCHAR )
What is the time from the song called Treat Me Nice?
SELECT time FROM table_name_29 WHERE song_title = "treat me nice"
CREATE TABLE table_11161 ( "Date" text, "Venue" text, "Result" text, "Win/ Loss/ Draw" text, "Competition" text )
Which competition had a result of 1-0?
SELECT "Competition" FROM table_11161 WHERE "Result" = '1-0'
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, ...
what is the average total hospital cost which involves nonop cardiac/vasc exam in a year before?
SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'nonop cardiac/vasc exam')) AND DATETIME(cost.chargetime, ...
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId nu...
Posts with apt-get install that have no software button.
SELECT Score, Id AS "post_link" FROM Posts WHERE Body LIKE '%apt-get install%' AND NOT Body LIKE '%add-apt-repository%' AND NOT Body LIKE '%apps.ubuntu.com%' AND PostTypeId = 2 AND ClosedDate IS NULL ORDER BY Score DESC
CREATE TABLE table_name_41 ( year INTEGER, mixed_doubles VARCHAR )
What is the average year with alfredo salazar fina salazar in mixed doubles?
SELECT AVG(year) FROM table_name_41 WHERE mixed_doubles = "alfredo salazar fina salazar"
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, ...
provide the number of patients whose death status is 0 and procedure long title is insertion of non-drug-eluting coronary artery stent(s)?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Insertion of non-drug-eluting coronary artery stent(s)"
CREATE TABLE staff ( gender VARCHAR )
Which gender makes up the majority of the staff?
SELECT gender FROM staff GROUP BY gender ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE table_16855 ( "Player" text, "No." real, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text )
What position did the player from maynard evans hs play
SELECT "Position" FROM table_16855 WHERE "School/Club Team" = 'Maynard Evans HS'
CREATE TABLE table_10596 ( "Location" text, "Venue" text, "Promotion" text, "Event" text, "Inductee(s)" text )
What is the location when the event was November reign?
SELECT "Location" FROM table_10596 WHERE "Event" = 'november reign'
CREATE TABLE table_13723 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real )
What's the week when the result was W 38-24 and attendance was less than 43,449?
SELECT SUM("Week") FROM table_13723 WHERE "Result" = 'w 38-24' AND "Attendance" < '43,449'
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 )
Show me about the correlation between Body_Builder_ID and Total in a scatter chart.
SELECT Body_Builder_ID, Total FROM body_builder
CREATE TABLE table_name_89 ( top_10 INTEGER, cuts_made VARCHAR, events VARCHAR, top_5 VARCHAR )
What is the best top-10 result when events are fewer than 39, top-5 is 1 and more than 5 cuts are made?
SELECT MAX(top_10) FROM table_name_89 WHERE events < 39 AND top_5 = 1 AND cuts_made > 5
CREATE TABLE table_41988 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text )
What date has 6 as the tie no.?
SELECT "Date" FROM table_41988 WHERE "Tie no" = '6'
CREATE TABLE table_48597 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text )
What was the resolution of the fight when matt grice had a record of 2-0?
SELECT "Res." FROM table_48597 WHERE "Record" = '2-0'
CREATE TABLE table_20422 ( "Episode Number" real, "Air Date" text, "Guest Host" text, "Musical Guest (Song performed)" text, "Who knows the most about the guest host? panelists" text )
Who was the musical guest and what song was performed when Matt Willis and Chantelle Houghton were the panelists?
SELECT "Musical Guest (Song performed)" FROM table_20422 WHERE "Who knows the most about the guest host? panelists" = 'Matt Willis and Chantelle Houghton'
CREATE TABLE table_104 ( "Name of lava dome" text, "Country" text, "Volcanic area" text, "Composition" text, "Last eruption or growth episode" text )
What is the composition at Valles lava dome?
SELECT "Composition" FROM table_104 WHERE "Name of lava dome" = 'Valles lava dome'
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE i...
how many patients is antihypertensive drug given to two times since 1 year ago?
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, COUNT(*) AS c1 FROM patient WHERE patient.patientunitstayid = (SELECT treatment.patientunitstayid FROM treatment WHERE treatment.treatmentname = 'antihypertensive drug' AND DATETIME(treatment.treatmenttime) >= DATETIME(CURRENT_TIME(), '-1 year')) GROUP...
CREATE TABLE table_1939367_1 ( arabs_2011 VARCHAR, province VARCHAR )
If the province is Nunavut, what is the Arabs 2011 amount?
SELECT arabs_2011 FROM table_1939367_1 WHERE province = "Nunavut"
CREATE TABLE table_name_32 ( name VARCHAR, caps VARCHAR, rank VARCHAR, confederation VARCHAR )
Which UEFA confederation member had a rank more than 17 and caps of 114?
SELECT name FROM table_name_32 WHERE rank > 17 AND confederation = "uefa" AND caps = 114
CREATE TABLE table_74641 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Who was the away team playing the home team North Melbourne?
SELECT "Away team" FROM table_74641 WHERE "Home team" = 'north melbourne'
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, ...
Questions migrated to Stack Overflow.
SELECT Posts.Id AS "post_link" FROM Posts, PostHistory WHERE Posts.Id = PostHistory.PostId AND PostHistoryTypeId = 35 LIMIT 50
CREATE TABLE table_1434788_5 ( candidates VARCHAR, incumbent VARCHAR )
Who were the candidates in the election where John Beatty was the incumbent?
SELECT candidates FROM table_1434788_5 WHERE incumbent = "John Beatty"
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, give me the comparison about the average of manufacturer over the name , and group by attribute name, display in ascending by the x axis.
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name
CREATE TABLE PHOTOS ( Tourist_Attraction_ID VARCHAR, Name VARCHAR ) CREATE TABLE TOURIST_ATTRACTIONS ( Name VARCHAR, Tourist_Attraction_ID VARCHAR )
What is the name of the tourist attraction that is associated with the photo 'game1'?
SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID WHERE T1.Name = "game1"
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Tags ( Id number, ...
Find bad answers from 'not an answer' comments.
SELECT c.PostId AS "post_link", YEAR(C.CreationDate) AS Year, MONTH(C.CreationDate) AS Month, c.Text AS Body FROM Comments AS C, Posts AS P WHERE (C.Text LIKE '%should be a comment%' AND LENGTH(c.Text) < 25 AND C.PostId = P.Id AND C.CreationDate < '2016-12-01T00:00:00.000' AND C.CreationDate > '2011-01-01T00:00:00.000'...
CREATE TABLE table_71063 ( "Sydney" text, "Melbourne" text, "Perth" text, "Adelaide" text, "Gold Coast" text, "Auckland" text )
What is the result for Gold Coast when Adelaide and Perth are yes, but Auckland is no?
SELECT "Gold Coast" FROM table_71063 WHERE "Adelaide" = 'yes' AND "Auckland" = 'no' AND "Perth" = 'yes'
CREATE TABLE table_name_83 ( license VARCHAR, system VARCHAR, name VARCHAR )
Which License has a System of amiga, and a Name of pocketuae?
SELECT license FROM table_name_83 WHERE system = "amiga" AND name = "pocketuae"
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, ins...
Are there courses in the Fall or Winter term at 300 -level ?
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'WN' AND semester.year = 2017)) AND course.course_id = course_offering.course_id AND course.department = 'department0...
CREATE TABLE table_name_24 ( package_option VARCHAR, country VARCHAR, language VARCHAR )
What is the package/option for Italy when the language is italian?
SELECT package_option FROM table_name_24 WHERE country = "italy" AND language = "italian"
CREATE TABLE table_name_91 ( population INTEGER, town_status VARCHAR )
What is the highest population of a city that has a town status of 2010?
SELECT MAX(population) FROM table_name_91 WHERE town_status = "2010"
CREATE TABLE table_76729 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
How many Picks have an Overall smaller than 304, and a Position of g, and a Round smaller than 11?
SELECT COUNT("Pick") FROM table_76729 WHERE "Overall" < '304' AND "Position" = 'g' AND "Round" < '11'
CREATE TABLE table_78673 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text )
What was Australia's score when Peter Lonard played?
SELECT "Score" FROM table_78673 WHERE "Country" = 'australia' AND "Player" = 'peter lonard'
CREATE TABLE table_14342480_5 ( field_goals VARCHAR, position VARCHAR )
Na,e the number of field goals for right tackle
SELECT COUNT(field_goals) FROM table_14342480_5 WHERE position = "Right tackle"
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...
Has NRE 336 ever taken place over the Summer time ?
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'NRE' AND course.number = 336 AND semester.semester = 'Summer' AND semester.semester_id = course_offering.semester
CREATE TABLE table_9856 ( "Rank" real, "Venue name" text, "Highest attendance" text, "Location" text, "Current seating capacity" real )
What is the highest Rank, when Location is Kinshasa, DR Congo, and when Current Seating Capacity is less than 80,000?
SELECT MAX("Rank") FROM table_9856 WHERE "Location" = 'kinshasa, dr congo' AND "Current seating capacity" < '80,000'
CREATE TABLE table_15187735_21 ( segment_c VARCHAR, series_ep VARCHAR )
What are the titles of segment c for series episode is 21-08?
SELECT segment_c FROM table_15187735_21 WHERE series_ep = "21-08"
CREATE TABLE table_43549 ( "Official #" real, "TF1 #" real, "French title" text, "English title" text, "Air date (France)" text, "Original Beechwood Bunny Tale / Source material" text )
What is the Original Beechwood Bunny Tale/Source material that has an Official # larger than 38, and a TF1 # larger than 50, and an English title of 'sweet fabiola'?
SELECT "Original Beechwood Bunny Tale / Source material" FROM table_43549 WHERE "Official #" > '38' AND "TF1 #" > '50' AND "English title" = 'sweet fabiola'
CREATE TABLE table_30293 ( "Vessel" text, "Built" real, "Max Speed" text, "Length" text, "Breadth" text, "Flag" text, "Propulsion" text )
What is the max speed when the vessel is gallion?
SELECT "Max Speed" FROM table_30293 WHERE "Vessel" = 'Gallion'
CREATE TABLE table_26387382_1 ( power__mw·hr_yr_ VARCHAR, location__county_ VARCHAR )
What locations are considered centre?
SELECT power__mw·hr_yr_ FROM table_26387382_1 WHERE location__county_ = "Centre"
CREATE TABLE table_635 ( "W.H. Archer" text, "J.E. Armstrong" text, "H.L. Birkett" text, "F.A. Brill" text, "H.T. Brewer" text )
Who is J.E. Armstrong when W.H. Archer is D.M. Lawson?
SELECT "J.E. Armstrong" FROM table_635 WHERE "W.H. Archer" = 'D.M. Lawson'
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, ni...
on monday i'd like to travel from LAS VEGAS to DETROIT MICHIGAN
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, date_day, days, flight, state WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DETROIT' AND date_day.day_number = 21 AND date_day.month_number = ...
CREATE TABLE table_17801022_1 ( manufacturer VARCHAR, date VARCHAR )
What manufacturer won the race on November 2?
SELECT manufacturer FROM table_17801022_1 WHERE date = "November 2"
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 ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
how many patients are with unknown/unspecified ethnicity and diagnosed with primary disease complete heart block?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "UNKNOWN/NOT SPECIFIED" AND demographic.diagnosis = "COMPLETE HEART BLOCK"
CREATE TABLE table_10568 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
How many times was the total more than 1, the nation was east germany and silver was more than 1?
SELECT COUNT("Bronze") FROM table_10568 WHERE "Total" > '1' AND "Nation" = 'east germany' AND "Silver" > '1'
CREATE TABLE table_name_53 ( attempts INTEGER, net_yards VARCHAR, touchdowns VARCHAR )
What are the highest attempts that have net yards less than 631, and 2 for the touchdowns?
SELECT MAX(attempts) FROM table_name_53 WHERE net_yards < 631 AND touchdowns = 2
CREATE TABLE table_6170 ( "Year" real, "Total Convictions" real, "Homicide (Art. 111,112,113,116 StGB)" real, "Serious Bodily Injury (Art. 122 StGB)" real, "Minor Bodily Injury (Art. 123 StGB)" real, "Sexual Contact with Children (Art. 187 StGB)" real, "Rape (Art. 190 StGB)" real, "Theft...
Which year earlier than 2006 has the average Total Convictions of Fraud at 1,521?
SELECT AVG("Total Convictions") FROM table_6170 WHERE "Fraud (Art. 146 StGB)" = '1,521' AND "Year" < '2006'
CREATE TABLE table_53665 ( "English" text, "Scots" text, "West Frisian" text, "Afrikaans" text, "Dutch" text, "Dutch ( Limburgish )" text, "Low German" text, "Low German ( Groningen )" text, "Middle German ( Luxemburgish )" text, "German" text, "Yiddish" text, "Gothic" te...
What is the Middle German (Luxemburgish) word for stone?
SELECT "Middle German ( Luxemburgish )" FROM table_53665 WHERE "English" = 'stone'
CREATE TABLE status ( station_id INTEGER, bikes_available INTEGER, docks_available INTEGER, time TEXT ) CREATE TABLE station ( id INTEGER, name TEXT, lat NUMERIC, long NUMERIC, dock_count INTEGER, city TEXT, installation_date TEXT ) CREATE TABLE trip ( id INTEGER, d...
A bar chart for what are the number of the dates that have an average sea level pressure between 303 and 31?, could you sort in desc by the y axis?
SELECT date, COUNT(date) FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 ORDER BY COUNT(date) DESC
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
give me the number of patients whose religion is christian scientist?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.religion = "CHRISTIAN SCIENTIST"
CREATE TABLE table_6775 ( "Season" text, "Round" text, "Date" text, "Home" text, "Away" text, "Result" text )
What round had a home of FC augsburg with the result of 3-0?
SELECT "Round" FROM table_6775 WHERE "Home" = 'fc augsburg' AND "Result" = '3-0'
CREATE TABLE routes ( rid integer, dst_apid integer, dst_ap varchar(4), src_apid bigint, src_ap varchar(4), alid bigint, airline varchar(4), codeshare text ) CREATE TABLE airlines ( alid integer, name text, iata varchar(2), icao varchar(3), callsign text, country...
What are the countries of all airlines whose names start with Orbit, and count them by a bar chart, could you display Y in desc order?
SELECT country, COUNT(country) FROM airlines WHERE name LIKE 'Orbit%' GROUP BY country ORDER BY COUNT(country) DESC
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, pa...
what was the daily average amount of insulin in patient 006-97726's body?
SELECT AVG(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-97726')) AND intakeoutput.celllabel = 'insul...
CREATE TABLE table_name_34 ( average VARCHAR, total_points VARCHAR, rank_by_average VARCHAR )
What is the total average with 54 total points and a rank less than 10?
SELECT COUNT(average) FROM table_name_34 WHERE total_points = 54 AND rank_by_average < 10
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 admission type is urgent and lab test fluid is joint fluid?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.fluid = "Joint Fluid"
CREATE TABLE aircraft ( aid number(9,0), name varchar2(30), distance number(6,0) ) CREATE TABLE flight ( flno number(4,0), origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arrival_date date, price number(7,2), aid number(9,0) ) CREAT...
Show name and distance for all aircrafts by a bar chart, could you order by the x-axis in desc?
SELECT name, distance FROM aircraft ORDER BY name DESC
CREATE TABLE table_name_67 ( year_built INTEGER, parish___prestegjeld__ VARCHAR, location_of_the_church VARCHAR )
Which Year Built has a Parish (Prestegjeld) of bremanger parish, and a Location of the Church of bremanger?
SELECT AVG(year_built) FROM table_name_67 WHERE parish___prestegjeld__ = "bremanger parish" AND location_of_the_church = "bremanger"
CREATE TABLE table_8040 ( "Year started" real, "Number of cars" real, "Current car" text, "Car #" real, "Website" text )
WHAT WAS THE LOWEST CAR # WITH SON-E-WA, AND 2012 START YEAR?
SELECT MIN("Car #") FROM table_8040 WHERE "Current car" = 'son-e-wa' AND "Year started" < '2012'
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerU...
Amount of questions for the tag PHP.
SELECT * FROM Tags AS t WHERE t.TagName = 'php'
CREATE TABLE table_1569625_1 ( margin_of_victory VARCHAR, tournament VARCHAR )
Name the margin of victory when tournament is algarve open de portugal
SELECT margin_of_victory FROM table_1569625_1 WHERE tournament = "Algarve Open de Portugal"
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text,...
had patient 009-11591 had heartrate less than 88.0 on 10/10/2105?
SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-11591')) AND vitalperiodic.heartrate < 88.0 AND NOT vitalperiodi...
CREATE TABLE table_name_11 ( date VARCHAR, visitor VARCHAR, attendance VARCHAR )
What is the date of the game where the vistor team was the Knicks and more than 18,165 were in attendance?
SELECT date FROM table_name_11 WHERE visitor = "knicks" AND attendance > 18 OFFSET 165
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 demographic ...
how many of the patients with hypopotassemia died?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.long_title = "Hypopotassemia"
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...
what was the name of the drug prescribed to patient 009-12985 in the same day after having received a vasodilating agent - iv - labetalol until 63 months ago?
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-12985') AND treatment.treatme...
CREATE TABLE table_48971 ( "Player" text, "Country" text, "Year(s) won" text, "Total" text, "To par" real )
When the tom watson is playing for the United States and the To par is under 14, what's the total?
SELECT "Total" FROM table_48971 WHERE "Country" = 'united states' AND "To par" < '14' AND "Player" = 'tom watson'
CREATE TABLE table_14450 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text )
For Pontyberem RFC that has a Try Bonus of 2, what is the played?
SELECT "Played" FROM table_14450 WHERE "Try bonus" = '2' AND "Club" = 'pontyberem rfc'
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
Vicious Dog based on Suggested Edits.
SELECT COUNT(*) AS Count, MAX(s.CreationDate), v.UserId AS "user_link", uu.Reputation AS MainUserReputation, s.OwnerUserId AS "user_link", su.Reputation AS SuggesterReputation, su.CreationDate AS SuggesterCreationDate FROM SuggestedEditVotes AS v INNER JOIN SuggestedEdits AS s ON s.Id = v.SuggestedEditId INNER JOIN Pos...
CREATE TABLE table_7238 ( "Name" text, "Japanese" text, "Population ( 2012 )" real, "Date of designation" text, "Region" text, "Prefecture" text )
What region has the symbol ?
SELECT "Region" FROM table_7238 WHERE "Japanese" = '八尾'
CREATE TABLE table_6870 ( "Institution" text, "Location" text, "Affiliation" text, "Enrollment" real, "Mascot" text, "Colors" text )
What Public Institution is in Black River Falls?
SELECT "Institution" FROM table_6870 WHERE "Affiliation" = 'public' AND "Location" = 'black river falls'
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, ...
how many patients have been admitted to the hospital before the year 2137 with hyp kid nos w cr kid v as their diagnosis short title?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2137" AND diagnoses.short_title = "Hyp kid NOS w cr kid V"
CREATE TABLE table_23681 ( "Year" real, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text )
who won mixed doubles when zhou mi won womens singles
SELECT "Mixed doubles" FROM table_23681 WHERE "Womens singles" = 'Zhou Mi'
CREATE TABLE table_22815568_2 ( market_income_per_capita VARCHAR, poverty_rate VARCHAR )
What is the market income per capita of the county with the 9.4% poverty rate?
SELECT market_income_per_capita FROM table_22815568_2 WHERE poverty_rate = "9.4%"
CREATE TABLE table_2930244_3 ( number_of_hurricanes INTEGER )
What is the lowest overall number of hurricanes?
SELECT MIN(number_of_hurricanes) FROM table_2930244_3
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,...
find me the time of admission and short title of procedure for patient jane dillard.
SELECT demographic.admittime, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Jane Dillard"
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number...
i mean what was the last temperature c (calc) for patient 4401 during the previous day?
SELECT chartevents.valuenum 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 = 4401)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'temperatur...
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
what is drug type and drug route of drug name avapro?
SELECT prescriptions.drug_type, prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Avapro"
CREATE TABLE weekly_weather ( station_id int, day_of_week text, high_temperature int, low_temperature int, precipitation real, wind_speed_mph int ) CREATE TABLE train ( id int, train_number int, name text, origin text, destination text, time text, interval text ) CR...
Draw a bar chart for what is the average high temperature for each day of week?
SELECT day_of_week, AVG(high_temperature) FROM weekly_weather GROUP BY day_of_week
CREATE TABLE table_15070 ( "Tournament" text, "2009" text, "2010" text, "2011" text, "2012" text )
what is the 2011 performance for the US open?
SELECT "2011" FROM table_15070 WHERE "Tournament" = 'us open'
CREATE TABLE table_36980 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text )
What is the highest round of the player with a pick number lower than 34?
SELECT MAX("Round") FROM table_36980 WHERE "Pick #" > '34'
CREATE TABLE table_name_67 ( valid_poll VARCHAR, seats VARCHAR, candidates VARCHAR )
Name the total number of valid poll with seats more than 4 and candidates more than 9
SELECT COUNT(valid_poll) FROM table_name_67 WHERE seats > 4 AND candidates > 9
CREATE TABLE table_65529 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real )
Which Silver has a Total of 11, and a Gold smaller than 8?
SELECT MIN("Silver") FROM table_65529 WHERE "Total" = '11' AND "Gold" < '8'
CREATE TABLE table_63394 ( "Year" real, "Competition Description" text, "Location" text, "Apparatus" text, "Rank-Final" real, "Score-Final" real )
Which Year is the first one that has an Apparatus of uneven bars, and a Rank-Final smaller than 3?
SELECT MIN("Year") FROM table_63394 WHERE "Apparatus" = 'uneven bars' AND "Rank-Final" < '3'