instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
Where was the game that was larger than 30 and scored 106-111
CREATE TABLE table_name_94 (location VARCHAR,game VARCHAR,score VARCHAR)
SELECT location FROM table_name_94 WHERE game > 30 AND score = "106-111"
Sites by relative meta activity (compared to the main). Compares the SE sites to their metas - shows the percentage of the users having a post on the meta site, compared to the percentage of the users having a post on the main. Counts only the users over the RepLimit. You can set this RepLimit to 1.
CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TA...
COMMIT
What is the date for CBS label?
CREATE TABLE table_12906 ("Date" text,"Label" text,"Format" text,"Country" text,"Catalog" text)
SELECT "Date" FROM table_12906 WHERE "Label" = 'cbs'
count the number of patients whose admission location is trsf within this facility and diagnoses short title is convulsions nec?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)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,la...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "TRSF WITHIN THIS FACILITY" AND diagnoses.short_title = "Convulsions NEC"
What is the maximum series number what is smaller than season 7.0 and directed by Laura Innes?
CREATE TABLE table_17356106_1 (series__number INTEGER,directed_by VARCHAR,season__number VARCHAR)
SELECT MAX(series__number) FROM table_17356106_1 WHERE directed_by = "Laura Innes" AND season__number < 7.0
See the CreationDate of the most recent Vote record per VoteTypeId..
CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId numbe...
WITH summary AS (SELECT VoteTypeId, CreationDate, ROW_NUMBER() OVER (PARTITION BY VoteTypeId ORDER BY CreationDate DESC) AS r FROM Votes) SELECT VoteTypeId, CreationDate FROM summary WHERE r = 1 ORDER BY VoteTypeId
Name the authority for morrinsville college
CREATE TABLE table_71701 ("Name" text,"Years" text,"Gender" text,"Area" text,"Authority" text,"Decile" real,"Roll" real)
SELECT "Authority" FROM table_71701 WHERE "Name" = 'morrinsville college'
what are the three most frequent drugs prescribed to valve replacement < 7days female patients of the 50s within the same month after they have been diagnosed since 4 years ago with valve replacement < 7days?
CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE lab (labid number,patientunitstayid nu...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'valve replacement < 7days' AND DATETIME(diagnosis....
until 3 years ago, what were the five most commonly taken lab tests for patients of age 60 or above?
CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careunit text,wardid number,intime time,outtime time)CREATE TABLE procedures_icd (...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age >= 60) AND DATETIME(labevents.charttime) <= DATET...
Specify the death status of the patient named Charles Nilsson
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)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital...
SELECT demographic.expire_flag FROM demographic WHERE demographic.name = "Charles Nilsson"
give the birthdate and gender of subject id 990.
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)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime tex...
SELECT demographic.dob, demographic.gender FROM demographic WHERE demographic.subject_id = "990"
Which Drawn is the highest one that has a Played smaller than 18?
CREATE TABLE table_38555 ("Position" real,"Team" text,"Points" real,"Played" real,"Drawn" real,"Lost" real,"Against" real,"Difference" text)
SELECT MAX("Drawn") FROM table_38555 WHERE "Played" < '18'
When 22' 37.06 100.090mph is the time for Monday August 24th how many times are there for Friday August 28th?
CREATE TABLE table_2883 ("Rank" real,"Rider" text,"Mon 24 Aug" text,"Tues 25 Aug" text,"Wed 26 Aug" text,"Thurs 27 Aug" text,"Fri 28 Aug" text,"Sat 29 Aug" text)
SELECT COUNT("Fri 28 Aug") FROM table_2883 WHERE "Mon 24 Aug" = '22'' 37.06 100.090mph'
Show id and location of railways that are associated with more than one train Visualize by bar chart, and could you display by the x-axis in ascending?
CREATE TABLE railway_manage (Railway_ID int,Manager_ID int,From_Year text)CREATE TABLE train (Train_ID int,Train_Num text,Name text,From text,Arrival text,Railway_ID int)CREATE TABLE manager (Manager_ID int,Name text,Country text,Working_year_starts text,Age int,Level int)CREATE TABLE railway (Railway_ID int,Railway te...
SELECT T1.Location, T1.Railway_ID FROM railway AS T1 JOIN train AS T2 ON T1.Railway_ID = T2.Railway_ID ORDER BY T1.Location
What is the catalog of the release from January 23, 2002?
CREATE TABLE table_name_59 (catalog VARCHAR,date VARCHAR)
SELECT catalog FROM table_name_59 WHERE date = "january 23, 2002"
select * from users where Location like 'pune'.
CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoR...
SELECT * FROM Users WHERE Location LIKE '%Oklahoma%' ORDER BY Reputation DESC
What's the Hangul/Japanese of Boys Over Flowers that's drama?
CREATE TABLE table_64508 ("Year" real,"Title" text,"Hangul / Japanese" text,"Role" text,"Network" text,"Genre" text)
SELECT "Hangul / Japanese" FROM table_64508 WHERE "Genre" = 'drama' AND "Title" = 'boys over flowers'
What game date was the game at AOL Arena?
CREATE TABLE table_24453847_2 (date VARCHAR,game_site VARCHAR)
SELECT date FROM table_24453847_2 WHERE game_site = "AOL Arena"
What was the away team's score when the home team scored 15.16 (106)?
CREATE TABLE table_58528 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Away team score" FROM table_58528 WHERE "Home team score" = '15.16 (106)'
What game site had a result at l 21 13?
CREATE TABLE table_name_27 (game_site VARCHAR,result VARCHAR)
SELECT game_site FROM table_name_27 WHERE result = "l 21–13"
Which name was in a position less than 4 with 2 losses?
CREATE TABLE table_name_78 (name VARCHAR,position VARCHAR,lost VARCHAR)
SELECT name FROM table_name_78 WHERE position < 4 AND lost = 2
How many clubs remain in the fourth round?
CREATE TABLE table_18328569_1 (clubs_remaining INTEGER,round VARCHAR)
SELECT MIN(clubs_remaining) FROM table_18328569_1 WHERE round = "Fourth round"
What are the names of the states where at least 3 heads were born?
CREATE TABLE head (born_state VARCHAR)
SELECT born_state FROM head GROUP BY born_state HAVING COUNT(*) >= 3
What is the lowest attendance when the Atlanta Falcons were the opponent?
CREATE TABLE table_name_69 (week INTEGER,opponent VARCHAR)
SELECT MIN(week) FROM table_name_69 WHERE opponent = "atlanta falcons"
Who directed Episode 8?
CREATE TABLE table_11075747_4 (directed_by VARCHAR,episode__number VARCHAR)
SELECT directed_by FROM table_11075747_4 WHERE episode__number = 8
show me the number of male patients who were born before 2101.
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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.dob_year < "2101"
what is the maximum age of female patients who died of death status 0?
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,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id te...
SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.expire_flag = "0"
What song has a length of 3:05?
CREATE TABLE table_10848177_1 (song VARCHAR,length VARCHAR)
SELECT song FROM table_10848177_1 WHERE length = "3:05"
What was the maximum speed for the P4-1 (24/36 ps)?
CREATE TABLE table_name_78 (vmax VARCHAR,type VARCHAR)
SELECT vmax FROM table_name_78 WHERE type = "p4-1 (24/36 ps)"
Show the position of players and the corresponding number of players with a bar chart, and show the total number in asc order.
CREATE TABLE team (Team_id int,Name text)CREATE TABLE player (Player_ID int,Player text,Years_Played text,Total_WL text,Singles_WL text,Doubles_WL text,Team int)CREATE TABLE match_season (Season real,Player text,Position text,Country int,Team int,Draft_Pick_Number int,Draft_Class text,College text)CREATE TABLE country ...
SELECT Position, COUNT(*) FROM match_season GROUP BY Position ORDER BY COUNT(*)
For those records from the products and each product's manufacturer, find name and the average of manufacturer , and group by attribute name, and visualize them by a bar chart, and I want to order in desc by the y axis please.
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)
SELECT T2.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Manufacturer DESC
Which team does Colin Moore drive for?
CREATE TABLE table_name_12 (team VARCHAR,driver VARCHAR)
SELECT team FROM table_name_12 WHERE driver = "colin moore"
What was the away team that played at Windy Hill?
CREATE TABLE table_33576 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Away team" FROM table_33576 WHERE "Venue" = 'windy hill'
Which years have a Decile smaller than 2, and an Area of mohaka?
CREATE TABLE table_70264 ("Name" text,"Years" text,"Gender" text,"Area" text,"Authority" text,"Decile" real,"Roll" real)
SELECT "Years" FROM table_70264 WHERE "Decile" < '2' AND "Area" = 'mohaka'
What is the earliest year of disaffiliation of a CHCH-TV station, licensed in Hamilton, Ontario?
CREATE TABLE table_name_74 (year_of_disaffiliation INTEGER,city_of_license_market VARCHAR)
SELECT MIN(year_of_disaffiliation) FROM table_name_74 WHERE city_of_license_market = "hamilton, ontario"
What is the average share for episodes with over 7.82 viewers, ranks of 3 and a weekly rank of 54?
CREATE TABLE table_name_56 (share INTEGER,rank__week_ VARCHAR,viewers__millions_ VARCHAR,rank__timeslot_ VARCHAR)
SELECT AVG(share) FROM table_name_56 WHERE viewers__millions_ > 7.82 AND rank__timeslot_ = "3" AND rank__week_ = "54"
What player has a number of playoff games played greater than 0?
CREATE TABLE table_name_51 (player VARCHAR,pl_gp INTEGER)
SELECT player FROM table_name_51 WHERE pl_gp > 0
Find users eligible for moderator nomination.
CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE U...
SELECT Id, DisplayName, Reputation FROM Users WHERE Reputation >= 3000 AND EXISTS(SELECT Id FROM Badges AS b WHERE b.UserId = Users.Id AND b.Name = 'Civic Duty') AND EXISTS(SELECT Id FROM Badges AS b WHERE b.UserId = Users.Id AND b.Name = 'Strunk & White') AND EXISTS(SELECT Id FROM Badges AS b WHERE b.UserId = Users.Id...
find the number of days of hospital stay and death status of elizabeth bateman.
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 (subject_id text,hadm_id text,name text,marital_status text,age text,do...
SELECT demographic.days_stay, demographic.expire_flag FROM demographic WHERE demographic.name = "Elizabeth Bateman"
Which player made the highest number of assists during the game played at the FleetCenter, with end score of W 120-87?
CREATE TABLE table_47733 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Series" text)
SELECT "High assists" FROM table_47733 WHERE "Location Attendance" = 'fleetcenter' AND "Score" = 'w 120-87'
What is the Score for the 1999 fifa confederations cup?
CREATE TABLE table_40344 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text)
SELECT "Score" FROM table_40344 WHERE "Competition" = '1999 fifa confederations cup'
What was the date of appointment for the manager of the 23rd team?
CREATE TABLE table_22616 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Replaced by" text,"Date of appointment" text,"Position in table" text)
SELECT "Date of appointment" FROM table_22616 WHERE "Position in table" = '23rd'
What was launched and laid down in February 1819?
CREATE TABLE table_40494 ("Name" text,"Built by HM Dockyard" text,"Ordered" text,"Laid down" text,"Launched" text)
SELECT "Launched" FROM table_40494 WHERE "Laid down" = 'february 1819'
Which Rank has a Col (m) of 0, and a Peak of aoraki/mount cook, and a Prominence (m) larger than 3,755?
CREATE TABLE table_13836 ("Rank" real,"Peak" text,"Country" text,"Island" text,"Elevation (m)" real,"Prominence (m)" real,"Col (m)" real)
SELECT SUM("Rank") FROM table_13836 WHERE "Col (m)" = '0' AND "Peak" = 'aoraki/mount cook' AND "Prominence (m)" > '3,755'
What's the total number of Heat recorded for the british virgin islands?
CREATE TABLE table_45034 ("Heat" real,"Lane" real,"Name" text,"Country" text,"Mark" text)
SELECT COUNT("Heat") FROM table_45034 WHERE "Country" = 'british virgin islands'
What is the Position with a Year with freshman, and a Weight larger than 210?
CREATE TABLE table_77513 ("Name" text,"Position" text,"Height" text,"Weight" real,"Year" text,"Home Town" text,"High School" text)
SELECT "Position" FROM table_77513 WHERE "Year" = 'freshman' AND "Weight" > '210'
Is there an afternoon 421 class in Spring-Summer 2014 ?
CREATE TABLE jobs (job_id int,job_title varchar,description varchar,requirement varchar,city varchar,state varchar,country varchar,zip int)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE course_prerequisite (pre_course_id int,course_id int)CREATE TABLE program_course (program_id int,cour...
SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course_offering.start_time >= '12:00:00' AND course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 421 AND semester.semester = 'Spring-Summer' AND semester.semester_id = course_offering.semester AND semester.year ...
What is the English name of the country that has Ramallah as its capital?
CREATE TABLE table_name_59 (english_country_name VARCHAR,english_capital_name VARCHAR)
SELECT english_country_name FROM table_name_59 WHERE english_capital_name = "ramallah"
If class a is canadian and class aaa is wimberley, which possible school years could this fall on?
CREATE TABLE table_14603212_1 (school_year VARCHAR,class_aAA VARCHAR,Wimberley VARCHAR,class_a VARCHAR)
SELECT school_year FROM table_14603212_1 WHERE class_aAA = Wimberley AND class_a = "Canadian"
What was the Attendance on 11/09/1946?
CREATE TABLE table_name_88 (attendance VARCHAR,date VARCHAR)
SELECT attendance FROM table_name_88 WHERE date = "11/09/1946"
Name the wrestlers for days held of 69
CREATE TABLE table_name_58 (wrestlers VARCHAR,days_held VARCHAR)
SELECT wrestlers FROM table_name_58 WHERE days_held = "69"
The rider mike di meglio had a total of how many grids?
CREATE TABLE table_name_71 (grid VARCHAR,rider VARCHAR)
SELECT COUNT(grid) FROM table_name_71 WHERE rider = "mike di meglio"
What is the type with a quantity of fewer than 6 and number(s) 5201?
CREATE TABLE table_name_88 (type VARCHAR,quantity VARCHAR,number_s_ VARCHAR)
SELECT type FROM table_name_88 WHERE quantity < 6 AND number_s_ = "5201"
Which rider had a speed of 90.57mph?
CREATE TABLE table_name_59 (rider VARCHAR,speed VARCHAR)
SELECT rider FROM table_name_59 WHERE speed = "90.57mph"
What is points sgsinst when points diff is +96?
CREATE TABLE table_name_70 (points_against VARCHAR,points_diff VARCHAR)
SELECT points_against FROM table_name_70 WHERE points_diff = "+96"
during the first hospital encounter, what was the daily maximum dose of enteral 2 cal hn of patient 017-55081?
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 diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,...
SELECT MAX(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 = '017-55081' AND NOT patient.hospitaldischargetime...
Which Winner has Semi-Finalists of 2,000?
CREATE TABLE table_37402 ("Year" text,"Winner" text,"Runner-Up" text,"Semi-Finalists" text,"Quarter-Finalists" text,"Last 16" text,"Last 32" text,"Last 64" text,"Total" text)
SELECT "Winner" FROM table_37402 WHERE "Semi-Finalists" = '£2,000'
Which date has 1 as the week?
CREATE TABLE table_name_22 (date VARCHAR,week VARCHAR)
SELECT date FROM table_name_22 WHERE week = 1
provide the number of patients whose gender is m and diagnoses icd9 code is 51889?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.icd9_code = "51889"
provide the number of patients whose year of birth is less than 1882 and drug route is tp?
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 text,gender text,language text,religion text,admission_type text,days_stay ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "1882" AND prescriptions.route = "TP"
which athlete had the fastest run ?
CREATE TABLE table_203_358 (id number,"pos." number,"athlete" text,"run 1" number,"run 2" number,"total" text)
SELECT "athlete" FROM table_203_358 ORDER BY "total" LIMIT 1
What's the bronze medal count of Spain that has less than 39 Gold, 3 silver, and a rank better than 35?
CREATE TABLE table_name_27 (bronze VARCHAR,nation VARCHAR,rank VARCHAR,gold VARCHAR,silver VARCHAR)
SELECT bronze FROM table_name_27 WHERE gold < 39 AND silver = 3 AND rank < 35 AND nation = "spain"
In what division was there a population density in km2 of 1,604.3 in 2011?
CREATE TABLE table_24027047_1 (administrative_division VARCHAR,population_density___km²_2011_ VARCHAR)
SELECT administrative_division FROM table_24027047_1 WHERE population_density___km²_2011_ = "1,604.3"
What country did Day & Age rank number 1 in Q prior to 2011?
CREATE TABLE table_name_52 (country VARCHAR,publication VARCHAR,year VARCHAR,rank VARCHAR)
SELECT country FROM table_name_52 WHERE year < 2011 AND rank > 1 AND publication = "q"
What is the average grid number for paul cruickshank racing with less than 27 laps?
CREATE TABLE table_32491 ("Name" text,"Team" text,"Laps" real,"Time/Retired" text,"Grid" real)
SELECT AVG("Grid") FROM table_32491 WHERE "Team" = 'paul cruickshank racing' AND "Laps" < '27'
give me the number of patients whose diagnoses icd9 code is 41041 and drug type is main?
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "41041" AND prescriptions.drug_type = "MAIN"
What is the release date of the bonus interview with Peter Purves?
CREATE TABLE table_21105 ("Story #" real,"Title" text,"Doctor" text,"Narrator" text,"Format" text,"release date" text,"Notes" text)
SELECT "release date" FROM table_21105 WHERE "Notes" = 'Bonus interview with Peter Purves'
How many values of first elected are for district 16?
CREATE TABLE table_39599 ("District" text,"Name" text,"Party" text,"Hometown" text,"First Elected" real,"Towns Represented" text)
SELECT COUNT("First Elected") FROM table_39599 WHERE "District" = '16'
tell me the four most frequent surgeries that patients received within the same month after having had a rt heart angiocardiogram procedure since 2105?
CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE cost (row_id numbe...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.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 = admi...
What T9 Place Player had a Score of 73-67-74-71=285?
CREATE TABLE table_62410 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" real)
SELECT "Player" FROM table_62410 WHERE "Place" = 't9' AND "Score" = '73-67-74-71=285'
give me the number of patients whose days of hospital stay is greater than 15 and drug name is meropenem?
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "15" AND prescriptions.drug = "Meropenem"
did patient 1272 have the results of the tracheal aspirate microbiology tests since 104 months ago?
CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE transfers (row_id number,subject_id number,hadm_id n...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1272) AND microbiologyevents.spec_type_desc = 'tracheal aspirate' AND DATETIME(microbiologyevents.charttime) >= DATETIME(CURRENT_TIME(), '-104 month')
Who had the high points dated march 13?
CREATE TABLE table_886 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "High points" FROM table_886 WHERE "Date" = 'March 13'
which airline is US
CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_required text,minimum_stay int,maximum_stay int,application text,no_discounts text)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time i...
SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'US'
Find out the number of patients younger than 43 years who had a urine lab test.
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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "43" AND lab.fluid = "Urine"
Find first question from query.
CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat...
SELECT OwnerUserId AS "user_link", MIN(Id) AS "post_link" FROM Posts WHERE PostTypeId = 2 OR PostTypeId = 1 GROUP BY OwnerUserId
How much is the GDP for an area of 61,395?
CREATE TABLE table_43017 ("Country" text,"Area (km\u00b2)" text,"Population (2011 est.)" text,"Population density (per km\u00b2)" text,"GDP (PPP) $M USD" text)
SELECT "GDP (PPP) $M USD" FROM table_43017 WHERE "Area (km\u00b2)" = '61,395'
Where delegate is feldman, brian j. brian j. feldman, please specify all the party
CREATE TABLE table_27050336_7 (party VARCHAR,delegate VARCHAR)
SELECT party FROM table_27050336_7 WHERE delegate = "Feldman, Brian J. Brian J. Feldman"
The easiest MDE course is taught by whom ?
CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)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,...
SELECT DISTINCT instructor.name, program_course.workload FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN program_course ON program_course.course_id = cour...
what is the final score when the date is 2009-02-26?
CREATE TABLE table_name_62 (final_score VARCHAR,date VARCHAR)
SELECT final_score FROM table_name_62 WHERE date = "2009-02-26"
Who was the Champion in Snellville, GA in 2006?
CREATE TABLE table_name_46 (champion VARCHAR,location VARCHAR,year VARCHAR)
SELECT champion FROM table_name_46 WHERE location = "snellville, ga" AND year = "2006"
Which courses are compulsory for the major but not in the MOVESCI department ?
CREATE TABLE ta (campus_job_id int,student_id int,location varchar)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_project ...
SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE course.department <> 'MOVESCI' AND program_course.course_id = course.course_id AND program.program_id = program_course.program_id
Which Drawn is the highest one that has a Played smaller than 18?
CREATE TABLE table_name_36 (drawn INTEGER,played INTEGER)
SELECT MAX(drawn) FROM table_name_36 WHERE played < 18
What is the record at the UW: Ultimate Fight Minnesota?
CREATE TABLE table_9633 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" text)
SELECT "Record" FROM table_9633 WHERE "Event" = 'uw: ultimate fight minnesota'
What is the Dance with the Highest score under 30 and Stacy Keibler as the Best dancer(s)?
CREATE TABLE table_name_10 (dance VARCHAR,highest_score VARCHAR,best_dancer_s_ VARCHAR)
SELECT dance FROM table_name_10 WHERE highest_score < 30 AND best_dancer_s_ = "stacy keibler"
what is the only year that had 114 minor children registered ?
CREATE TABLE table_203_467 (id number,"year" number,"numer of jamaicans\ngranted british\ncitizenship" number,"naturalisation\nby residence" number,"naturalisation\nby marriage" number,"registration\nof a minor child" number,"registration\nby other means" number)
SELECT "year" FROM table_203_467 WHERE "registration\nof a minor child" = 114
How many deposits had a Non-Interest Income of 0.9500000000000001 and number of branch/offices less than 17?
CREATE TABLE table_name_63 (deposits VARCHAR,non_interest_income VARCHAR,no_of_branches_offices VARCHAR)
SELECT COUNT(deposits) FROM table_name_63 WHERE non_interest_income = 0.9500000000000001 AND no_of_branches_offices < 17
get me the number of female patients who were hospitalized for more than 7 days.
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.days_stay > "7"
In which years are co-stars mala sinha and amitabh bachchan?
CREATE TABLE table_2528382_2 (year VARCHAR,co_stars VARCHAR)
SELECT year FROM table_2528382_2 WHERE co_stars = "Mala Sinha and Amitabh Bachchan"
are there any flights between PITTSBURGH and BALTIMORE using a J31 aircraft
CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers text,saturday_stay_requi...
SELECT DISTINCT flight.flight_id FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE (aircraft.aircraft_code = 'J31' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND equipment...
On what flight day was U2 played?
CREATE TABLE table_name_2 (flight_day VARCHAR,artist VARCHAR)
SELECT flight_day FROM table_name_2 WHERE artist = "u2"
What is Party, when District is 'Tennessee 8'?
CREATE TABLE table_name_33 (party VARCHAR,district VARCHAR)
SELECT party FROM table_name_33 WHERE district = "tennessee 8"
Which Home Team has a Tie no of 13?
CREATE TABLE table_name_61 (home_team VARCHAR,tie_no VARCHAR)
SELECT home_team FROM table_name_61 WHERE tie_no = "13"
find the admission location and procedure short title for subject id 2560.
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 text,discharge_location text,diagnosis text,dod text,dob_year text,dod_year ...
SELECT demographic.admission_location, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "2560"
How many classes between senior and junior year for world history
CREATE TABLE table_13967239_2 (senior__4th_year_ VARCHAR,junior__3rd_year_ VARCHAR)
SELECT COUNT(senior__4th_year_) FROM table_13967239_2 WHERE junior__3rd_year_ = "World History"
Which Year has a Competition of olympic games, and a Venue of atlanta, united states?
CREATE TABLE table_42871 ("Year" real,"Competition" text,"Venue" text,"Position" text,"Event" text,"Notes" text)
SELECT AVG("Year") FROM table_42871 WHERE "Competition" = 'olympic games' AND "Venue" = 'atlanta, united states'
Number of questions for PHP and cURL.
CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Tags text,Ans...
SELECT Id, Title FROM Posts WHERE Title LIKE '%php%curl%' OR Title LIKE '%php%post%'
i would like a flight from PHILADELPHIA to DALLAS that makes a stop in ATLANTA
CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE airport_service (city_c...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND CITY_2.cit...
look for the long title of diagnoses for diagnoses icd9 code 40391.
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)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,sho...
SELECT diagnoses.long_title FROM diagnoses WHERE diagnoses.icd9_code = "40391"
Can I get 7 credits from taking any of these courses ?
CREATE TABLE course (course_id int,name varchar,department varchar,number varchar,credits varchar,advisory_requirement varchar,enforced_requirement varchar,description varchar,num_semesters int,num_enrolled int,has_discussion varchar,has_lab varchar,has_projects varchar,has_exams varchar,num_reviews int,clarity_score i...
SELECT DISTINCT name, number FROM course WHERE credits = 7 AND department = 'EECS'