table
stringlengths
33
7.14k
question
stringlengths
4
1.06k
output
stringlengths
2
4.44k
⌀
CREATE TABLE table_name_18 ( opponent VARCHAR, loss VARCHAR )
Which Opponent has a Loss of weaver (9-9)?
SELECT opponent FROM table_name_18 WHERE loss = "weaver (9-9)"
CREATE TABLE table_name_86 ( track_s_ VARCHAR, date VARCHAR )
Which Track(s) is on 18 november 1985?
SELECT track_s_ FROM table_name_86 WHERE date = "18 november 1985"
CREATE TABLE table_name_48 ( boarded VARCHAR, class VARCHAR )
Who boarded first class?
SELECT boarded FROM table_name_48 WHERE class = "first"
CREATE TABLE table_62265 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text )
What is Score, when Home is 'Montreal Canadiens', and when Date is 'May 16'?
SELECT "Score" FROM table_62265 WHERE "Home" = 'montreal canadiens' AND "Date" = 'may 16'
CREATE TABLE products ( code number, name text, price number, manufacturer number ) CREATE TABLE manufacturers ( code number, name text, headquarter text, founder text, revenue number )
How many companies were created by Andy?
SELECT COUNT(*) FROM manufacturers WHERE founder = 'Andy'
CREATE TABLE table_name_4 ( date VARCHAR, round VARCHAR, home_team VARCHAR )
On what date was the 4th round, with home team Itabuna, played?
SELECT date FROM table_name_4 WHERE round = "4th" AND home_team = "itabuna"
CREATE TABLE table_name_73 ( prefix VARCHAR, chemical_class VARCHAR )
What prefix has chemical class Iodoalkane?
SELECT prefix FROM table_name_73 WHERE chemical_class = "iodoalkane"
CREATE TABLE table_2980024_1 ( total_apps VARCHAR, league_goals VARCHAR )
What were the total apps for Dunne in season where he had 0 league goals?
SELECT total_apps FROM table_2980024_1 WHERE league_goals = 0
CREATE TABLE table_80218 ( "Rank" real, "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text )
Name the average rank with larger than 3 and heat more than 5
SELECT AVG("Rank") FROM table_80218 WHERE "Lane" > '3' AND "Heat" > '5'
CREATE TABLE table_name_60 ( winner VARCHAR, race_name VARCHAR )
Who was the winner of the tre valli varesine race?
SELECT winner FROM table_name_60 WHERE race_name = "tre valli varesine"
CREATE TABLE table_49437 ( "Borough" text, "1970" real, "1980" real, "1990" real, "2000" real, "2006" real )
What was the percentage in 2006 that had less than 9% in 1970?
SELECT AVG("2006") FROM table_49437 WHERE "1970" < '9'
CREATE TABLE table_51250 ( "Year" real, "Date" text, "Winner" text, "Result" text, "Loser" text, "Attendance" real, "Location" text )
what date saw the chicago bears lose in green bay earlier than 1931?
SELECT "Date" FROM table_51250 WHERE "Loser" = 'chicago bears' AND "Location" = 'green bay' AND "Year" < '1931'
CREATE TABLE table_53807 ( "Track" real, "Title" text, "Translation" text, "Composer" text, "Recorded" text )
Which track 7 title was recorded in 1959-09-15?
SELECT "Title" FROM table_53807 WHERE "Recorded" = '1959-09-15' AND "Track" = '7'
CREATE TABLE table_48680 ( "Date" text, "Time" text, "Opponent" text, "Score" text, "Site" text, "City" text )
What is the time in Baltimore?
SELECT "Time" FROM table_48680 WHERE "City" = 'baltimore'
CREATE TABLE table_65865 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Opposition" text )
What is the average rank of the match where offaly was the opposition and the total was greater than 9?
SELECT AVG("Rank") FROM table_65865 WHERE "Opposition" = 'offaly' AND "Total" > '9'
CREATE TABLE table_name_8 ( school_club_team VARCHAR, acquisition_via VARCHAR, name VARCHAR )
Which School/ Club Team acquired Jondan Salvador via trade?
SELECT school_club_team FROM table_name_8 WHERE acquisition_via = "trade" AND name = "jondan salvador"
CREATE TABLE table_29458735_5 ( colonel VARCHAR, county VARCHAR )
in how many of the arkansas colomel the county was pope
SELECT COUNT(colonel) FROM table_29458735_5 WHERE county = "Pope"
CREATE TABLE table_33827 ( "Series Ep." text, "Episode" real, "Segment A" text, "Segment B" text, "Segment C" text, "Segment D" text )
Which items in segment C is episode 160?
SELECT "Segment C" FROM table_33827 WHERE "Episode" = '160'
CREATE TABLE table_46847 ( "Year" real, "Album" text, "Vocals" text, "Bass" text, "Drums" text, "Label" text )
Who played the bass for the Against the Grain album after 1982?
SELECT "Bass" FROM table_46847 WHERE "Year" > '1982' AND "Album" = 'against the grain'
CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, baseP...
what is the average base price of different bed type? List bed type and average base price, and I want to display in desc by the Y-axis please.
SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY AVG(basePrice) DESC
CREATE TABLE table_name_81 ( location VARCHAR, year VARCHAR, killed VARCHAR )
What location has a killed of 100.9, and a year later than 1993?
SELECT location FROM table_name_81 WHERE year > 1993 AND killed = "100.9"
CREATE TABLE table_name_62 ( draw INTEGER, place VARCHAR )
What is the greatest draw that has 4th for place?
SELECT MAX(draw) FROM table_name_62 WHERE place = "4th"
CREATE TABLE table_train_97 ( "id" int, "pulmonary_disease" bool, "systolic_blood_pressure_sbp" int, "diabetic" string, "psychiatric_disease" bool, "hematologic_disease" bool, "diastolic_blood_pressure_dbp" int, "lung_disease" bool, "NOUSE" float )
pulmonary or lung disorders
SELECT * FROM table_train_97 WHERE pulmonary_disease = 1 OR lung_disease = 1
CREATE TABLE table_76675 ( "Number" text, "D\u00e9partment (or collectivity)" text, "Pr\u00e9sident" text, "Party" text, "Since" real )
Which department has Guy-Dominique Kennel as president since 2008?
SELECT "D\u00e9partment (or collectivity)" FROM table_76675 WHERE "Since" = '2008' AND "Pr\u00e9sident" = 'guy-dominique kennel'
CREATE TABLE table_name_8 ( game VARCHAR, date VARCHAR )
Which game took place on April 22?
SELECT game FROM table_name_8 WHERE date = "april 22"
CREATE TABLE table_67542 ( "Member countries" text, "Population" text, "Area (km\u00b2)" text, "GDP (billion US$)" text, "GDP per capita (US$)" text )
What is the per-capita GDP for the country with an overall GDP of 156.640?
SELECT "GDP per capita (US$)" FROM table_67542 WHERE "GDP (billion US$)" = '156.640'
CREATE TABLE table_43377 ( "Date" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Total" text )
What is the Total when the Set 3 was 25-15?
SELECT "Total" FROM table_43377 WHERE "Set 3" = '25-15'
CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), DEPT_EXTENSION varchar(4) ) CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ...
Bar chart of sum crs credit from each dept code
SELECT DEPT_CODE, SUM(CRS_CREDIT) FROM COURSE GROUP BY DEPT_CODE
CREATE TABLE table_66237 ( "State (class)" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date of successor's formal installation" text )
When is it that successor's formal installation has a Vacator of ross bass (d)?
SELECT "Date of successor's formal installation" FROM table_66237 WHERE "Vacator" = 'ross bass (d)'
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
How many patients admitted before the year 2131 had procedure icd9 code 3895?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2131" AND procedures.icd9_code = "3895"
CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) CREATE TABLE player ( pid number, pname text, ycard text, hs number ) CREATE TABLE college ( cname text, state text, enr number )
What are the names of the states that have some college students playing in the positions of goalie and mid-field?
SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.ppos = 'goalie' INTERSECT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.ppos = 'mid'
CREATE TABLE customers ( customer_id number, payment_method text, customer_name text, date_became_customer time, other_customer_details text ) CREATE TABLE products ( product_id number, product_details text ) CREATE TABLE customer_orders ( order_id number, customer_id number, o...
What is the name of customers who do not use Cash as payment method.
SELECT customer_name FROM customers WHERE payment_method <> 'Cash'
CREATE TABLE table_31463 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text )
how many high assits have a date of february 5?
SELECT "High assists" FROM table_31463 WHERE "Date" = 'February 5'
CREATE TABLE table_54955 ( "Rank" real, "Player" text, "Country" text, "Earnings( $ )" real, "Wins" real )
Which player has the lowest earnings and has at least 4 wins and is ranked higher than 4?
SELECT MIN("Earnings( $ )") FROM table_54955 WHERE "Wins" = '4' AND "Rank" > '4'
CREATE TABLE Guests ( guest_id INTEGER, gender_code CHAR(1), guest_first_name VARCHAR(80), guest_last_name VARCHAR(80), date_of_birth DATETIME ) CREATE TABLE View_Unit_Status ( apt_id INTEGER, apt_booking_id INTEGER, status_date DATETIME, available_yn BIT ) CREATE TABLE Apartments ...
Show the booking status code and the corresponding number of bookings in a bar chart.
SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
CREATE TABLE table_16313 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
What is the pick # for the position de?
SELECT "Pick #" FROM table_16313 WHERE "Position" = 'DE'
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...
what number of patients have been diagnosed with seizures - from ischemia/infarction during the same hospital visit after having received a anticonvulsant - valproate procedure the last year?
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'anticonvulsant - valproate' AND DATETIME(treatment.treatmenttime, 'start ...
CREATE TABLE table_name_90 ( yards VARCHAR, in_20 VARCHAR )
What number of Yards has 32 as an In 20?
SELECT COUNT(yards) FROM table_name_90 WHERE in_20 = 32
CREATE TABLE table_64476 ( "Date" real, "Doubles, I Class" real, "Doubles, II Class" real, "Greater Doubles" real, "Doubles" real, "Semidoubles" real, "Total" real )
How much Total has Semidoubles smaller than 78, and Doubles, II Class smaller than 17?
SELECT COUNT("Total") FROM table_64476 WHERE "Semidoubles" < '78' AND "Doubles, II Class" < '17'
CREATE TABLE table_48796 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text )
What was the result of the game that had 20,627 fans in attendance?
SELECT "Result" FROM table_48796 WHERE "Attendance" = '20,627'
CREATE TABLE table_25938117_1 ( tournament VARCHAR, location VARCHAR )
Name the tournament for dominican republic
SELECT tournament FROM table_25938117_1 WHERE location = "Dominican Republic"
CREATE TABLE files ( formats VARCHAR )
What is the most popular file format?
SELECT formats FROM files GROUP BY formats ORDER BY COUNT(*) DESC LIMIT 1
CREATE TABLE table_8088 ( "Season" text, "President" text, "General Sec" text, "Treasurer" text, "Fixtures Sec" text, "Social Sec Bradford" text, "Social Sec Leeds" text, "Media Officer" text )
Name the Social Sec Leeds has Fixtures Sec of n/a, and a General Sec of n/a, and the Season of 2005 2006?
SELECT "Social Sec Leeds" FROM table_8088 WHERE "Fixtures Sec" = 'n/a' AND "General Sec" = 'n/a' AND "Season" = '2005–2006'
CREATE TABLE table_45769 ( "Rank" real, "Name" text, "Country" text, "Wins" real, "Years" text )
Which Years have a Rank larger than 2, and Wins of 2, and a Country of france?
SELECT "Years" FROM table_45769 WHERE "Rank" > '2' AND "Wins" = '2' AND "Country" = 'france'
CREATE TABLE table_60427 ( "map#" real, "County" text, "Capital" text, "Population (2008)" real, "Area" text, "Created" real )
What is the earliest created year when the map# was 10?
SELECT MIN("Created") FROM table_60427 WHERE "map#" = '10'
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 Users ( Id number, Reputation number, CreationD...
Number of questions closed by close vote count.. Sceptics questions closed, by number of close votes. Useful to identify moderator-closed questions.
SELECT 'close_votes', COUNT(*) FROM (SELECT COUNT(*) AS "close_votes" FROM Posts INNER JOIN Votes ON Posts.Id = Votes.PostId WHERE Votes.VoteTypeId = 6 AND NOT Posts.ClosedDate IS NULL GROUP BY Posts.Id) AS X GROUP BY 'close_votes'
CREATE TABLE table_20465 ( "Rank by average" real, "Place" text, "Couple" text, "Perfect 40s" real, "Total" real, "Number of dances" real, "Season" real, "Average" text )
What is the minimum number of perfect 40s?
SELECT MIN("Perfect 40s") FROM table_20465
CREATE TABLE vocals ( songid number, bandmate number, type text ) CREATE TABLE instruments ( songid number, bandmateid number, instrument text ) CREATE TABLE band ( id number, firstname text, lastname text ) CREATE TABLE performance ( songid number, bandmate number, st...
What are the different stage positions for all musicians whose first name is 'Solveig'?
SELECT DISTINCT T1.stageposition FROM performance AS T1 JOIN band AS T2 ON T1.bandmate = T2.id WHERE firstname = "Solveig"
CREATE TABLE table_37130 ( "Driver" text, "Season" text, "Wins" real, "Entries" text, "Percentage" text )
What is the fewest number of wins in the chart for Ayrton Senna?
SELECT MIN("Wins") FROM table_37130 WHERE "Driver" = 'ayrton senna'
CREATE TABLE table_72795 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text )
What position is Justin Shaw in?
SELECT "Position" FROM table_72795 WHERE "Player" = 'Justin Shaw'
CREATE TABLE table_10845 ( "Tournament" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text )
What is the 2010 for the grand slam tournaments of 2007?
SELECT "2010" FROM table_10845 WHERE "2007" = 'grand slam tournaments'
CREATE TABLE Events ( Event_ID INTEGER, Service_ID INTEGER, Event_Details VARCHAR(255) ) CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15) ) CREATE TABLE Participants ( Participant_ID INTEGER, Participant_Type_Code CHAR(15), Participant_Details VARCHAR(255) ) CREA...
Give me a bar chart to show the number of event details of events that have more than one participant, and list from high to low by the total number.
SELECT Event_Details, COUNT(Event_Details) FROM Events AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY Event_Details ORDER BY COUNT(Event_Details) DESC
CREATE TABLE table_203_2 ( id number, "name" text, "mineral" text, "opened" text, "closed" text, "years connected" text, "notes" text )
how many quarries was slate mined at ?
SELECT COUNT(*) FROM table_203_2 WHERE "mineral" = 'slate'
CREATE TABLE table_63111 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Record" text )
What was the final score of Game #4?
SELECT "Score" FROM table_63111 WHERE "Game" = '4'
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 cost ( costid number, ...
in the first hospital visit, patient 006-193056 has been allergic to any substance?
SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-193056' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi...
CREATE TABLE table_name_6 ( year INTEGER, position VARCHAR )
What was the earliest year that T rlea took 7th place?
SELECT MIN(year) FROM table_name_6 WHERE position = "7th"
CREATE TABLE table_name_96 ( laps INTEGER, grid VARCHAR, time_retired VARCHAR, driver VARCHAR )
When the driver mike hailwood has a grid greater than 12 and a Time/Retired of + 2 laps, what is the average number of laps?
SELECT AVG(laps) FROM table_name_96 WHERE time_retired = "+ 2 laps" AND driver = "mike hailwood" AND grid > 12
CREATE TABLE table_38216 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text )
Which competition was in Dubai?
SELECT "Competition" FROM table_38216 WHERE "Venue" = 'dubai'
CREATE TABLE table_43732 ( "Internet Plan" text, "Downstream" text, "Upstream" text, "Bandwidth Included" text, "Price" text )
What is the name of the plan that has a downstream rate of 4,096 kbit?
SELECT "Internet Plan" FROM table_43732 WHERE "Downstream" = '4,096 kbit'
CREATE TABLE table_16928 ( "Governorate" text, "Name in Russian" text, "Name in Polish" text, "Seat" text, "Area, in thousands of km 2" real, "Population, in thousands,( 1905 )" real )
governs an area with what area (in thousand km 2)?
SELECT "Area, in thousands of km 2" FROM table_16928 WHERE "Name in Russian" = 'Плоцкая губерния'
CREATE TABLE city ( City_ID int, Official_Name text, Status text, Area_km_2 real, Population real, Census_Ranking text ) CREATE TABLE farm ( Farm_ID int, Year int, Total_Horses real, Working_Horses real, Total_Cattle real, Oxen real, Bulls real, Cows real, Pi...
Show the number of competitions held in each city with a bar chart.
SELECT Official_Name, COUNT(Official_Name) FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID GROUP BY Official_Name
CREATE TABLE table_206217_2 ( periselene__km_ VARCHAR, period__h_ VARCHAR )
What is every value for periselene if period is 4.947432?
SELECT periselene__km_ FROM table_206217_2 WHERE period__h_ = "4.947432"
CREATE TABLE table_43914 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text )
Which college had a pick in a round under 7, with a pick number 13 and overall was under 186?
SELECT "College" FROM table_43914 WHERE "Round" < '7' AND "Overall" < '186' AND "Pick" = '13'
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 was hired before 2002-06-21, give me the comparison about the amount of job_id over the job_id , and group by attribute job_id by a bar chart, sort by the X in desc.
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY JOB_ID 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 patient ( uniquep...
how much is the changing of bedside glucose of patient 010-29520 last measured on the last hospital visit compared to the first value measured on the last hospital visit?
SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-29520' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi...
CREATE TABLE table_59792 ( "Year" real, "Country/Territory" text, "Miss International" text, "National title" text, "Location" text )
What's the earliest year the philippines won?
SELECT MIN("Year") FROM table_59792 WHERE "Country/Territory" = 'philippines'
CREATE TABLE table_name_68 ( recnet VARCHAR, city_of_license VARCHAR )
what is the recnet when the city of license is peterborough?
SELECT recnet FROM table_name_68 WHERE city_of_license = "peterborough"
CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby int, journalid int ) CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE field ( fieldid int...
What papers has srinivasan iyer written ?
SELECT DISTINCT writes.paperid FROM author, writes WHERE author.authorname = 'srinivasan iyer' AND writes.authorid = author.authorid
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE compartment_cla...
wednesday morning flights between BALTIMORE and NEWARK NEW JERSEY
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 = 'NEWARK' AND date_day.day_number = 23 AND date_day.month_number = ...
CREATE TABLE table_name_68 ( pick VARCHAR, school VARCHAR )
What is the total pick number of Virginia Tech?
SELECT COUNT(pick) FROM table_name_68 WHERE school = "virginia tech"
CREATE TABLE table_24616 ( "Original number" text, "UIC number" text, "Name" text, "Constructer" text, "constructor number" real, "Year" real, "Withdrawn" text, "Kilometers worked" real )
When 9/07/1999 is the date of withdrawn what is the original number?
SELECT "Original number" FROM table_24616 WHERE "Withdrawn" = '9/07/1999'
CREATE TABLE table_123462_2 ( _number_of_seats_won VARCHAR, _number_of_total_votes VARCHAR )
How many times was the # of total votes 2582322?
SELECT COUNT(_number_of_seats_won) FROM table_123462_2 WHERE _number_of_total_votes = 2582322
CREATE TABLE table_name_62 ( time VARCHAR, group VARCHAR, race VARCHAR )
What was the time for the G2 group at the Hobartville Stakes?
SELECT time FROM table_name_62 WHERE group = "g2" AND race = "hobartville stakes"
CREATE TABLE table_58298 ( "Team" text, "Make" text, "Driver" text, "Sponsor" text, "Car Owner" text )
Who drives for the sponsor w.h. bolin?
SELECT "Driver" FROM table_58298 WHERE "Sponsor" = 'w.h. bolin'
CREATE TABLE table_name_66 ( date VARCHAR, winner VARCHAR )
What is Date, when Winner is 'Murilo Figueiredo'?
SELECT date FROM table_name_66 WHERE winner = "murilo figueiredo"
CREATE TABLE classroom ( building VARCHAR )
Count the number of rooms that are not in the Lamberton building.
SELECT COUNT(*) FROM classroom WHERE building <> 'Lamberton'
CREATE TABLE table_25207 ( "Year" text, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race time" text, "Average speed (mph)" text, "Report" text )
Name the manufacturer for cale yarborough for 1984
SELECT "Manufacturer" FROM table_25207 WHERE "Driver" = 'Cale Yarborough' AND "Year" = '1984'
CREATE TABLE table_13982 ( "Draw" real, "Language" text, "Artist" text, "Song" text, "English translation" text, "Place" real, "Points" real )
Which Place has an English translation of lullaby for my beloved?
SELECT MAX("Place") FROM table_13982 WHERE "English translation" = 'lullaby for my beloved'
CREATE TABLE table_name_4 ( venue VARCHAR, home_team VARCHAR )
What venue features collingwood as the home side?
SELECT venue FROM table_name_4 WHERE home_team = "collingwood"
CREATE TABLE table_31090 ( "No." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text )
Name the least number for production code 3x6266
SELECT MIN("No.") FROM table_31090 WHERE "Production code" = '3X6266'
CREATE TABLE table_204_538 ( id number, "pos." number, "driver" text, "co-driver" text, "car" text, "time" text )
who was the co driver of the first place driver ?
SELECT "co-driver" FROM table_204_538 WHERE "pos." = 1
CREATE TABLE table_24575253_4 ( division_five VARCHAR, division_one VARCHAR )
When westcott is in division one how many leagues are in division 5?
SELECT COUNT(division_five) FROM table_24575253_4 WHERE division_one = "Westcott"
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, ...
until 5 months ago, how much terazosin has been prescribed to patient 64538 in total?
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 64538) AND prescriptions.drug = 'terazosin' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-5 month')
CREATE TABLE table_name_76 ( d3_compatible VARCHAR, availability VARCHAR, name VARCHAR )
Tell me the D3 compatible for availability of yes for wode jukebox
SELECT d3_compatible FROM table_name_76 WHERE availability = "yes" AND name = "wode jukebox"
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time )...
how many days has passed since the last time patient 032-9230 got a procedure on this hospital encounter?
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-9230' ...
CREATE TABLE table_75524 ( "Round" real, "Pick" real, "Player" text, "Position" text, "School/Club Team" text )
What is the highest round number for the player who came from team Missouri?
SELECT MAX("Round") FROM table_75524 WHERE "School/Club Team" = 'missouri'
CREATE TABLE table_name_72 ( last VARCHAR, total VARCHAR, first VARCHAR )
What is the last when the first was January 2001 and more than 26 total?
SELECT last FROM table_name_72 WHERE total > 26 AND first = "january 2001"
CREATE TABLE table_29547777_1 ( original_performer VARCHAR, episode VARCHAR )
Who is the original performer when the episode is casting?
SELECT original_performer FROM table_29547777_1 WHERE episode = "Casting"
CREATE TABLE table_33313 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text )
Who was the home team that scored 10.12 (72)?
SELECT "Home team" FROM table_33313 WHERE "Home team score" = '10.12 (72)'
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime ...
what were the total amount of d20w intake that patient 30171 had received on 05/30/2101?
SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30171)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab...
CREATE TABLE Subjects ( subject_name VARCHAR, subject_id VARCHAR ) CREATE TABLE Courses ( subject_id VARCHAR )
Find the subject ID, subject name, and the corresponding number of available courses for each subject.
SELECT T1.subject_id, T2.subject_name, COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id = T2.subject_id GROUP BY T1.subject_id
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname var...
Does Prof. William Iii teach other courses besides 646 ?
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.number <> 646 AND instructor.name LIKE '%William Iii%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_i...
CREATE TABLE table_33856 ( "Celebrity" text, "Famous for" text, "Entered" text, "Exited" text, "Finished" text )
Who was the celebrity who finished in 7th place?
SELECT "Celebrity" FROM table_33856 WHERE "Finished" = '7th'
CREATE TABLE table_70227 ( "Year" real, "Team" text, "Co-Drivers" text, "Class" text, "Pos." text, "Class Pos." text )
Which class has a Year of 1968?
SELECT "Class" FROM table_70227 WHERE "Year" = '1968'
CREATE TABLE customers ( customer_name VARCHAR, payment_method VARCHAR )
Find the name of customers who did not pay with Cash.
SELECT customer_name FROM customers WHERE payment_method <> 'Cash'
CREATE TABLE table_name_15 ( attendance VARCHAR, date VARCHAR )
How many people were in attendance on the game on April 8, 2007?
SELECT attendance FROM table_name_15 WHERE date = "april 8, 2007"
CREATE TABLE table_name_28 ( competition VARCHAR, score VARCHAR )
what is the competition when the score is 2-1?
SELECT competition FROM table_name_28 WHERE score = "2-1"
CREATE TABLE table_name_79 ( gold INTEGER, rank VARCHAR, bronze VARCHAR )
What is the average Gold when the rank is less than 3 and the bronze is less than 1?
SELECT AVG(gold) FROM table_name_79 WHERE rank < 3 AND bronze < 1
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, ...
what is the number of patients whose discharge location is disch-tran to psych hosp and admission year is less than 2131?
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND demographic.admityear < "2131"
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
tell me the two year survival rate of patients who were prescribed ns after they were diagnosed with paranoid schizo-chronic?
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd...