instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
did patient 006-62367 ever underwent any therapeutic antibacterials - vancomycin procedure in 2105?
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text...
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-62367')) AND treatment.treatmentname = 'therapeutic antibacterials - van...
When the score is 71 and the player is from United States what is the place?
CREATE TABLE table_name_89 (place VARCHAR,score VARCHAR,country VARCHAR)
SELECT place FROM table_name_89 WHERE score = 71 AND country = "united states"
What score has notts county as the home team?
CREATE TABLE table_7254 ("Tie no" text,"Home team" text,"Score" text,"Away team" text,"Date" text)
SELECT "Score" FROM table_7254 WHERE "Home team" = 'notts county'
What are the names of artists who are Male and are from UK?
CREATE TABLE files (f_id number,artist_name text,file_size text,duration text,formats text)CREATE TABLE song (song_name text,artist_name text,country text,f_id number,genre_is text,rating number,languages text,releasedate time,resolution number)CREATE TABLE artist (artist_name text,country text,gender text,preferred_ge...
SELECT artist_name FROM artist WHERE country = "UK" AND gender = "Male"
What is the 2006 when the 2013 is 1r, and the 2012 is 1r?
CREATE TABLE table_75955 ("Tournament" text,"2006" text,"2009" text,"2012" text,"2013" text)
SELECT "2006" FROM table_75955 WHERE "2013" = '1r' AND "2012" = '1r'
what was the drug patient 22648 had been prescribed two or more times in this month?
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 TABLE microbiologyevents (row_id number,subject_id number,hadm_id nu...
SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22648) AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 ...
nelsano albano served in the same year as which washington twp . member ?
CREATE TABLE table_204_699 (id number,"district" text,"name" text,"party" text,"residence" text,"first served" number)
SELECT "name" FROM table_204_699 WHERE "name" <> 'nelson albano' AND "first served" = (SELECT "first served" FROM table_204_699 WHERE "name" = 'nelson albano') AND "residence" = 'washington twp'
Which Score has a Place of t2?
CREATE TABLE table_name_95 (score VARCHAR,place VARCHAR)
SELECT score FROM table_name_95 WHERE place = "t2"
what time was the last time patient 006-2586 had the maximum respiration value today?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid numbe...
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-2586')) AND NOT vitalperiodic.respiration IS NU...
Buscando posts sobre windows phone de 2018 at hoje.
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, LastActivityDate, CreationDate, Score, ViewCount, Body, OwnerUserId, Title, Tags, AnswerCount FROM Posts WHERE Tags LIKE '%<windows-phone%' AND PostTypeId = 1 AND CreationDate >= '01/01/2018' ORDER BY LastActivityDate DESC
For those employees who did not have any job in the past, visualize the relationship between salary and commission_pct .
CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPARTMENT_NAME varchar(30),MANAGER_ID decimal(6,0),LOCATION_ID decimal(4,0))CREATE TABLE ...
SELECT SALARY, COMMISSION_PCT FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)
What type of object has an NGC number higher than 2090 and has a right ascension (J2000) of 05h52m19s?
CREATE TABLE table_53963 ("NGC number" real,"Object type" text,"Constellation" text,"Right ascension (J2000)" text,"Declination (J2000)" text)
SELECT "Object type" FROM table_53963 WHERE "NGC number" > '2090' AND "Right ascension ( J2000 )" = '05h52m19s'
In which year did he finish 8th?
CREATE TABLE table_14378 ("Year" real,"Tournament" text,"Venue" text,"Result" text,"Distance" text)
SELECT "Year" FROM table_14378 WHERE "Result" = '8th'
In what Year was Rhode Island the National Champion?
CREATE TABLE table_name_77 (year VARCHAR,national_champion VARCHAR)
SELECT year FROM table_name_77 WHERE national_champion = "rhode island"
give me US flights for next wednesday from CLEVELAND to MIAMI
CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE fare_basis (fare_basis_code text,booking_class text,class_type text,premium text,economy text,discounted text,night text,season text,basis_days text)CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport tex...
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 WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MIAMI' AND date_day.day_number = 23 AND date_day.month_number = 4 AND da...
What's the number of the game played on June 22?
CREATE TABLE table_19778010_5 (game INTEGER,date VARCHAR)
SELECT MAX(game) FROM table_19778010_5 WHERE date = "June 22"
How many total points did roman Koudelka have
CREATE TABLE table_19338 ("Rank" real,"Name" text,"Nationality" text,"1st (m)" text,"2nd (m)" text,"Points" text,"Overall FHT points" text,"Overall WC points (Rank)" text)
SELECT "Overall WC points (Rank)" FROM table_19338 WHERE "Name" = 'Roman Koudelka'
What is Tries Against, when Tries For is 20?
CREATE TABLE table_name_22 (tries_against VARCHAR,tries_for VARCHAR)
SELECT tries_against FROM table_name_22 WHERE tries_for = "20"
when is the last time patient 015-52724 has had a heartrate measurement since 2 days ago?
CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE allergy (allergyid number,patientunitst...
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-52724')) AND NOT vitalperiodic.heartrate IS NUL...
is there a meal on DL flight 852 from SAN FRANCISCO to DALLAS FORT WORTH
CREATE TABLE aircraft (aircraft_code varchar,aircraft_description varchar,manufacturer varchar,basic_type varchar,engines int,propulsion varchar,wide_body varchar,wing_span int,length int,weight int,capacity int,pay_load int,cruising_speed int,range_miles int,pressurized varchar)CREATE TABLE flight_stop (flight_id int,...
SELECT DISTINCT food_service.compartment, food_service.meal_code, food_service.meal_number 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, food_service WHERE (((CITY_1.city_code = AIRPORT_SERVI...
What were the LOA metres for the yacht ichi ban?
CREATE TABLE table_3313 ("Position" real,"Sail number" text,"Yacht" text,"State/country" text,"Yacht type" text,"LOA (Metres)" text,"Skipper" text,"Corrected time d:hh:mm:ss" text)
SELECT "LOA (Metres)" FROM table_3313 WHERE "Yacht" = 'Ichi Ban'
Which tournament resulted in 6th place?
CREATE TABLE table_58606 ("Year" real,"Tournament" text,"Venue" text,"Result" text,"Extra" text)
SELECT "Tournament" FROM table_58606 WHERE "Result" = '6th'
Give me a group line chart showing the number of documents in different ending date The x-axis is ending date and group by location code, rank by the x axis from low to high please.
CREATE TABLE Documents_to_be_Destroyed (Document_ID INTEGER,Destruction_Authorised_by_Employee_ID INTEGER,Destroyed_by_Employee_ID INTEGER,Planned_Destruction_Date DATETIME,Actual_Destruction_Date DATETIME,Other_Details VARCHAR(255))CREATE TABLE All_Documents (Document_ID INTEGER,Date_Stored DATETIME,Document_Type_Code...
SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Location_Code, Date_in_Locaton_To ORDER BY Date_in_Locaton_To
How tall is the structure built in 1907?
CREATE TABLE table_59946 ("Rank" text,"Name" text,"Height ft (m)" text,"Floors" real,"Year" real)
SELECT "Height ft (m)" FROM table_59946 WHERE "Year" = '1907'
What is the issued serial given in 1966?
CREATE TABLE table_49496 ("Issued" real,"Type" text,"Design" text,"Serial format" text,"Serials issued" text)
SELECT "Serials issued" FROM table_49496 WHERE "Issued" = '1966'
Find the name and account balance of the customer whose name includes the letter a Visualize them using a bar chart, show y-axis in descending order.
CREATE TABLE bank (branch_ID int,bname varchar(20),no_of_customers int,city varchar(10),state varchar(20))CREATE TABLE customer (cust_ID varchar(3),cust_name varchar(20),acc_type char(1),acc_bal int,no_of_loans int,credit_score int,branch_ID int,state varchar(20))CREATE TABLE loan (loan_ID varchar(3),loan_type varchar(...
SELECT cust_name, acc_bal FROM customer WHERE cust_name LIKE '%a%' ORDER BY acc_bal DESC
what is the object type when the right ascension (j2000) is 11h10m42.8s?
CREATE TABLE table_name_77 (object_type VARCHAR,right_ascension___j2000__ VARCHAR)
SELECT object_type FROM table_name_77 WHERE right_ascension___j2000__ = "11h10m42.8s"
What loss has 26-9 as a loss?
CREATE TABLE table_name_96 (loss VARCHAR,record VARCHAR)
SELECT loss FROM table_name_96 WHERE record = "26-9"
which team was the first team to score six goals ?
CREATE TABLE table_203_620 (id number,"tie no" number,"home team" text,"score" text,"away team" text,"attendance" number)
SELECT "home team" FROM table_203_620 WHERE "score" = 6 LIMIT 1
what stadium has a prior record of 7th?
CREATE TABLE table_68203 ("Team" text,"City" text,"Stadium" text,"Manager" text,"Past season" text)
SELECT "Stadium" FROM table_68203 WHERE "Past season" = '7th'
When the elevator was Innocent IV what was the nationality?
CREATE TABLE table_47749 ("Elector" text,"Nationality" text,"Order and title" text,"Elevated" text,"Elevator" text)
SELECT "Nationality" FROM table_47749 WHERE "Elevator" = 'innocent iv'
Find all the catalog publishers whose name contains 'Murray
CREATE TABLE attribute_definitions (attribute_id number,attribute_name text,attribute_data_type text)CREATE TABLE catalog_contents (catalog_entry_id number,catalog_level_number number,parent_entry_id number,previous_entry_id number,next_entry_id number,catalog_entry_name text,product_stock_number text,price_in_dollars ...
SELECT DISTINCT (catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE "%Murray%"
Tell me the tournament with a hard surface for 6 1, 6 2
CREATE TABLE table_31945 ("Outcome" text,"Date" text,"Tournament" text,"Surface" text,"Opponent in the final" text,"Score" text)
SELECT "Tournament" FROM table_31945 WHERE "Surface" = 'hard' AND "Score" = '6–1, 6–2'
What's the date when Yelena Isinbayeva for Russia was in Beijing, China?
CREATE TABLE table_66262 ("Event" text,"Performance" text,"Athlete" text,"Nation" text,"Place" text,"Date" text)
SELECT "Date" FROM table_66262 WHERE "Nation" = 'russia' AND "Place" = 'beijing, china' AND "Athlete" = 'yelena isinbayeva'
How many earnings values are associated with players who had a best finish of T38?
CREATE TABLE table_28540609_2 (earnings__ VARCHAR,best_finish VARCHAR)
SELECT COUNT(earnings__) AS €_ FROM table_28540609_2 WHERE best_finish = "T38"
What is the total where there are 4 MLS Cups and more US Open Cups than 1?
CREATE TABLE table_58991 ("Name" text,"Years" text,"MLS Cup" real,"U.S. Open Cup" real,"CONCACAF" real,"Other" real,"Total" real)
SELECT COUNT("Total") FROM table_58991 WHERE "MLS Cup" = '4' AND "U.S. Open Cup" > '1'
High Rep users with the peer pressure badge. A way to find which users (mostly high rep) have the peer pressure badge. Was just playing around with T-SQL and cooked this. =D
CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDa...
SELECT Id AS "user_link", DisplayName, Reputation FROM Users WHERE Reputation > @RepLimit AND NOT EXISTS(SELECT Id FROM Badges AS b WHERE b.UserId = Users.Id AND b.Name = 'Peer Pressure') ORDER BY Reputation DESC
how many patients with drug code glyb5 died in or before 2115?
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 diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2115.0" AND prescriptions.formulary_drug_cd = "GLYB5"
Which junior team is associated with an NHL pick by the Buffalo Sabres?
CREATE TABLE table_4036 ("Pick #" real,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text)
SELECT "College/junior/club team" FROM table_4036 WHERE "NHL team" = 'Buffalo Sabres'
What is the average Jianshu higher than rank 2, with a Qiangshu smaller than 9.85?
CREATE TABLE table_name_29 (jianshu INTEGER,rank VARCHAR,qiangshu VARCHAR)
SELECT AVG(jianshu) FROM table_name_29 WHERE rank < 2 AND qiangshu < 9.85
what is the date for the first game played in the meadowlands ?
CREATE TABLE table_204_443 (id number,"week" number,"date" text,"opponent" text,"result" text,"game site" text,"attendance" number,"bye" text)
SELECT "date" FROM table_204_443 WHERE "game site" = 'the meadowlands' ORDER BY "date" LIMIT 1
provide the number of patients whose admission location is phys referral/normal deli and diagnoses short title is 29-30 comp wks gestation?
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 lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND diagnoses.short_title = "29-30 comp wks gestation"
Tell me the average top 25 with events of 5 and cuts madde less than 3
CREATE TABLE table_name_33 (top_25 INTEGER,events VARCHAR,cuts_made VARCHAR)
SELECT AVG(top_25) FROM table_name_33 WHERE events = 5 AND cuts_made < 3
Find all cities which has a ' Taj Mahal ' .
CREATE TABLE neighborhood (id int,business_id varchar,neighborhood_name varchar)CREATE TABLE business (bid int,business_id varchar,name varchar,full_address varchar,city varchar,latitude varchar,longitude varchar,review_count bigint,is_open tinyint,rating float,state varchar)CREATE TABLE category (id int,business_id va...
SELECT city FROM business WHERE name = 'Taj Mahal'
If the points is 15, what is the fin. pos?
CREATE TABLE table_17330069_1 (fin_pos VARCHAR,points VARCHAR)
SELECT COUNT(fin_pos) FROM table_17330069_1 WHERE points = "15"
What is the percent yes of Alberta, which had a percent no larger than 60.2?
CREATE TABLE table_name_68 (percent_yes VARCHAR,jurisdiction VARCHAR,percent_no VARCHAR)
SELECT COUNT(percent_yes) FROM table_name_68 WHERE jurisdiction = "alberta" AND percent_no > 60.2
Which Title has a Dance Partner of adele astaire, and Lyrics of ira gershwin, and a Director of felix edwardes?
CREATE TABLE table_37099 ("Title" text,"Date" text,"Theatre" text,"Role" text,"Dance Partner" text,"Director" text,"Lyrics" text,"Music" text)
SELECT "Title" FROM table_37099 WHERE "Dance Partner" = 'adele astaire' AND "Lyrics" = 'ira gershwin' AND "Director" = 'felix edwardes'
How many joined when the enrollment was 1150 in Sioux City, Iowa?
CREATE TABLE table_28499 ("Institution" text,"Location" text,"Founded" real,"Type" text,"Enrollment" real,"Joined" real,"Nickname" text)
SELECT "Joined" FROM table_28499 WHERE "Enrollment" = '1150' AND "Location" = 'Sioux City, Iowa'
What year did the San Agustin gym open?
CREATE TABLE table_name_44 (year_opened VARCHAR,arena_venue VARCHAR)
SELECT year_opened FROM table_name_44 WHERE arena_venue = "san agustin gym"
What episode in the season was episode us18 in the series?
CREATE TABLE table_23398 ("No. in series" text,"No. in season" real,"Family/families" text,"Location(s)" text,"Original air date" text)
SELECT COUNT("No. in season") FROM table_23398 WHERE "No. in series" = 'US18'
What is the total number of enrollment of schools that do not have any goalie player?
CREATE TABLE tryout (enr INTEGER,cName VARCHAR,pPos VARCHAR)CREATE TABLE college (enr INTEGER,cName VARCHAR,pPos VARCHAR)
SELECT SUM(enr) FROM college WHERE NOT cName IN (SELECT cName FROM tryout WHERE pPos = "goalie")
what is the maximum monthly number of patients who have had chro kidney dis stage ii since 2102?
CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime ...
SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnoses_icd.hadm_id) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'chro kidney dis stage ii') AND STRFTIME('%y', diagnoses_icd.charttime) >= '2102' GROUP BY STRFTIME('%y...
How many seasons are there for the 3rd position?
CREATE TABLE table_4195 ("Season" real,"Series" text,"Team" text,"Races" real,"Wins" real,"Poles" real,"F/Laps" real,"Podiums" real,"Points" real,"Position" text)
SELECT COUNT("Season") FROM table_4195 WHERE "Position" = '3rd'
When the clippers are the team how many games are there?
CREATE TABLE table_23285849_10 (game VARCHAR,team VARCHAR)
SELECT COUNT(game) FROM table_23285849_10 WHERE team = "Clippers"
what are the number of times re elected is listed as the result ?
CREATE TABLE table_204_109 (id number,"district" text,"incumbent" text,"party" text,"first\nelected" text,"result" text,"candidates" text)
SELECT COUNT(*) FROM table_204_109 WHERE "result" = 're-elected'
What are the names and seatings for all tracks opened after 2000, ordered by seating?
CREATE TABLE track (track_id number,name text,location text,seating number,year_opened number)CREATE TABLE race (race_id number,name text,class text,date text,track_id text)
SELECT name, seating FROM track WHERE year_opened > 2000 ORDER BY seating
papers from 2014
CREATE TABLE cite (citingpaperid int,citedpaperid int)CREATE TABLE keyphrase (keyphraseid int,keyphrasename varchar)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TABLE paperdataset (paperid int,datasetid int)CREATE TABLE paperkeyphrase (paperid int,keyphraseid int)CREATE TABLE field (fieldid int)CREATE TABLE ...
SELECT DISTINCT paperid FROM paper WHERE year = 2014
Which team was the visitor on January 10?
CREATE TABLE table_name_69 (visitor VARCHAR,date VARCHAR)
SELECT visitor FROM table_name_69 WHERE date = "january 10"
state all spokesperson for the channel where dual commentator was elena batinova
CREATE TABLE table_2192 ("Year(s)" real,"Commentator" text,"Dual Commentator" text,"Spokesperson" text,"Channel" text)
SELECT "Spokesperson" FROM table_2192 WHERE "Dual Commentator" = 'Elena Batinova'
list the number of patients who were admitted before the year 2107.
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 diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admityear < "2107"
What is the remelting temperature for the alloy that has a Sn/Sb ratio of 9.5/15?
CREATE TABLE table_43083 ("Usage" text,"Sn/Sb (%)" text,"Liquid at (\u00b0C)" text,"Casting at (\u00b0C)" text,"Remelting at (\u00b0C)" text,"Hardness" text)
SELECT "Remelting at (\u00b0C)" FROM table_43083 WHERE "Sn/Sb (%)" = '9.5/15'
Name the total number for report july 23
CREATE TABLE table_2697 ("Year" real,"Date" text,"Driver" text,"Team" text,"Manufacturer" text,"Laps" text,"Miles (km)" text,"Race Time" text,"Average Speed (mph)" text,"Report" text)
SELECT COUNT("Report") FROM table_2697 WHERE "Date" = 'July 23'
Did Flamengo play in the Recopa Sudamericana in 1998
CREATE TABLE table_14962316_9 (recopa_sudamericana_1998 VARCHAR,team VARCHAR)
SELECT recopa_sudamericana_1998 FROM table_14962316_9 WHERE team = "Flamengo"
Which line offers Fast to Norwood Junction?
CREATE TABLE table_1612760_1 (line VARCHAR,service_pattern VARCHAR)
SELECT line FROM table_1612760_1 WHERE service_pattern = "Fast to Norwood Junction"
did patient 016-9636 have calcium gluconate 10% prescribed since 12/2105?
CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE cost (costid number,uniquepid text,pati...
SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-9636')) AND medication.drugname = 'calcium gluconate 10%' AND STRFTIME...
Which city lives most of staffs? List the city name and number of staffs.
CREATE TABLE Addresses (city VARCHAR,address_id VARCHAR)CREATE TABLE Staff (staff_address_id VARCHAR)
SELECT T1.city, COUNT(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY COUNT(*) DESC LIMIT 1
Which season did he have 0 points and 31st position?
CREATE TABLE table_21429 ("Season" real,"Series" text,"Team" text,"Races" real,"Wins" real,"Poles" real,"FLaps" real,"Podiums" real,"Points" real,"Position" text)
SELECT MAX("Season") FROM table_21429 WHERE "Points" = '0' AND "Position" = '31st'
what date is after october 1st ?
CREATE TABLE table_204_55 (id number,"date" text,"time" text,"opponent#" text,"rank#" text,"site" text,"tv" text,"result" text,"attendance" number)
SELECT "date" FROM table_204_55 WHERE "date" > (SELECT "date" FROM table_204_55 WHERE "date" = 'october 1, 2005') ORDER BY "date" LIMIT 1
What's the average Year for the Position of 7th (sf)?
CREATE TABLE table_name_47 (year INTEGER,position VARCHAR)
SELECT AVG(year) FROM table_name_47 WHERE position = "7th (sf)"
What is the lowest Against when the played is more than 10?
CREATE TABLE table_name_4 (against INTEGER,played INTEGER)
SELECT MIN(against) FROM table_name_4 WHERE played > 10
What is the number of films of each director? Return a bar chart, and could you display by the how many directed by in asc?
CREATE TABLE schedule (Cinema_ID int,Film_ID int,Date text,Show_times_per_day int,Price float)CREATE TABLE cinema (Cinema_ID int,Name text,Openning_year int,Capacity int,Location text)CREATE TABLE film (Film_ID int,Rank_in_series int,Number_in_season int,Title text,Directed_by text,Original_air_date text,Production_cod...
SELECT Directed_by, COUNT(Directed_by) FROM film GROUP BY Directed_by ORDER BY COUNT(Directed_by)
what is patient 027-144847's gender?
CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim...
SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '027-144847'
what's the total number of tasmania with new south wales crop of 190 kilotonnes
CREATE TABLE table_1057262_2 (tasmania VARCHAR,new_south_wales VARCHAR)
SELECT COUNT(tasmania) FROM table_1057262_2 WHERE new_south_wales = 190
What is the least amount of wickets?
CREATE TABLE table_27922491_8 (wickets INTEGER)
SELECT MIN(wickets) FROM table_27922491_8
who were the top 3 finishers in the 2005 belgian grand prix ?
CREATE TABLE table_202_179 (id number,"pos" text,"no" number,"driver" text,"constructor" text,"laps" number,"time/retired" text,"grid" number,"points" number)
SELECT "driver" FROM table_202_179 ORDER BY "points" DESC LIMIT 3
what is drug type of drug name nafcillin?
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,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id tex...
SELECT prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "Nafcillin"
how many patients with infected right thigh graft were of american indian/alaska native ethnicty?
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.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.diagnosis = "INFECTED RIGHT THIGH GRAFT"
Show the number of documents in different ending date Bin ending date by weekday and group by location code with a stacked bar chart, could you display in descending by the y axis please?
CREATE TABLE Employees (Employee_ID INTEGER,Role_Code CHAR(15),Employee_Name VARCHAR(255),Gender_MFU CHAR(1),Date_of_Birth DATETIME,Other_Details VARCHAR(255))CREATE TABLE Document_Locations (Document_ID INTEGER,Location_Code CHAR(15),Date_in_Location_From DATETIME,Date_in_Locaton_To DATETIME)CREATE TABLE Ref_Locations...
SELECT Date_in_Locaton_To, COUNT(Date_in_Locaton_To) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(Date_in_Locaton_To) DESC
Which Position has a Round larger than 4, and a Player of patrick johnson?
CREATE TABLE table_name_45 (position VARCHAR,round VARCHAR,player VARCHAR)
SELECT position FROM table_name_45 WHERE round > 4 AND player = "patrick johnson"
when was the last time that patient 31482 had a minimum calcium, total on their current hospital encounter?
CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)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 ...
SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31482 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'calcium, total') ORDER BY labevents.valuenum, ...
Who was the fight against when loss was the result at the Gladiator Challenge 87: Collision Course event?
CREATE TABLE table_66332 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text)
SELECT "Opponent" FROM table_66332 WHERE "Res." = 'loss' AND "Event" = 'gladiator challenge 87: collision course'
when was the last time patient 010-1155 had a drug intake of volume (ml) magnesium sulfate since 01/16/2105?
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 allergy (allergyid number,patientunitstayid number,drugname text,allergyname text...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-1155')) AND intakeoutput.cellpath LIKE '%intake%'...
What is the primary disease and drug route of Albers Bauer?
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.diagnosis, prescriptions.route FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Albert Bauer"
did patient 006-171217 suffer from any type of allergy in the previous year?
CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE lab (labid number,patientunitstayid number,labnam...
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-171217')) AND DATETIME(allergy.allergytime, 'start of year') = DATETIME(CURR...
Which venue had an against smaller than 7?
CREATE TABLE table_12963 ("Opposing Teams" text,"Against" real,"Date" text,"Venue" text,"Status" text)
SELECT "Venue" FROM table_12963 WHERE "Against" < '7'
What was the to par of the tournament that had Ken Duke as a runner-up?
CREATE TABLE table_77498 ("Date" text,"Tournament" text,"Winning score" text,"To par" text,"Margin of victory" text,"Runner-up" text)
SELECT "To par" FROM table_77498 WHERE "Runner-up" = 'ken duke'
Who is in November after 1988 when Prinzzess is in October?
CREATE TABLE table_name_52 (november VARCHAR,year VARCHAR,october VARCHAR)
SELECT november FROM table_name_52 WHERE year > 1988 AND october = "prinzzess"
What time do NATIVEAM 311 lectures start next semester ?
CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE area (course_id int,area varchar)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE course (course...
SELECT DISTINCT course_offering.start_time FROM course INNER JOIN program_course ON program_course.course_id = course.course_id INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course.department = 'NATIVEAM' AND cours...
COMP 416 requires me to take what classes before I can take it ?
CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE student (student_id int,lastname varchar,firstname varcha...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
what is the name of the first race in the year ?
CREATE TABLE table_204_48 (id number,"date" text,"race name" text,"location" text,"uci rating" text,"winner" text,"team" text)
SELECT "race name" FROM table_204_48 ORDER BY "date" LIMIT 1
For each year, bin the year into day of the week interval, and return the average of the number of times the team Boston Red Stockings won in the postseasons using a line chart, order X in desc order please.
CREATE TABLE player_award (player_id TEXT,award_id TEXT,year INTEGER,league_id TEXT,tie TEXT,notes TEXT)CREATE TABLE team_half (year INTEGER,league_id TEXT,team_id TEXT,half INTEGER,div_id TEXT,div_win TEXT,rank INTEGER,g INTEGER,w INTEGER,l INTEGER)CREATE TABLE pitching_postseason (player_id TEXT,year INTEGER,round TE...
SELECT year, AVG(COUNT(*)) FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner = T2.team_id_br WHERE T2.name = 'Boston Red Stockings' ORDER BY year DESC
Reasonable quality old posts with spelling errors.
CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE PostLinks (Id n...
SELECT P.Id AS "post_link", P.CreationDate, P.Score, P.PostTypeId, p.LastEditDate, p.LastActivityDate FROM Posts AS P WHERE p.LastEditDate < DATEADD(month, -6, p.LastActivityDate) AND Score >= 5 AND (Title LIKE '%dinamic%' OR Title LIKE '%sintax%' OR Title LIKE '%programatically%') ORDER BY P.Score, P.CreationDate
who is the person that is part of the belgian vw club that works with fr d ric miclotte
CREATE TABLE table_30241 ("Entrant" text,"Constructor" text,"Car" text,"Driver" text,"Co-driver" text,"Rounds" text)
SELECT "Driver" FROM table_30241 WHERE "Entrant" = 'Belgian VW Club' AND "Co-driver" = 'Frédéric Miclotte'
What is the segment A on episode 237?
CREATE TABLE table_15187735_19 (segment_a VARCHAR,episode VARCHAR)
SELECT segment_a FROM table_15187735_19 WHERE episode = 237
What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.
CREATE TABLE pilot (Pilot_ID int,Pilot_name text,Rank int,Age int,Nationality text,Position text,Join_Year int,Team text)CREATE TABLE pilot_record (Record_ID int,Pilot_ID int,Aircraft_ID int,Date text)CREATE TABLE aircraft (Aircraft_ID int,Order_Year int,Manufacturer text,Model text,Fleet_Series text,Powertrain text,Fu...
SELECT Nationality, COUNT(*) FROM pilot GROUP BY Nationality
Percent of closed answered negative-scored questions over time.
CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDi...
SELECT MAX(h.t), h.pc AS "Percent of closed answered negative-scored questions over time" FROM (SELECT q.t AS t, NTILE(100) OVER (ORDER BY q.t) AS pc FROM (SELECT ClosedDate - CreationDate AS t FROM Posts WHERE PostTypeId = 1 AND AnswerCount > 0 AND Score < 0 AND NOT ClosedDate IS NULL) AS q) AS h WHERE h.t <= '23:59:5...
What was the first airdate or the season that had less than 24 episodes and a Nielsen ranking of #38?
CREATE TABLE table_name_68 (first_airdate VARCHAR,episodes VARCHAR,nielsen_ranking VARCHAR)
SELECT first_airdate FROM table_name_68 WHERE episodes < 24 AND nielsen_ranking = "#38"
when was the first time patient 022-187132 had a gastric (ng) output during the previous day?
CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid nu...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-187132')) AND intakeoutput.cellpath LIKE '%output...
did in 2105 patient 71689 visit the hospital?
CREATE TABLE icustays (row_id number,subject_id number,hadm_id number,icustay_id number,first_careunit text,last_careunit text,first_wardid number,last_wardid number,intime time,outtime time)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE d_items (r...
SELECT COUNT(*) > 0 FROM admissions WHERE admissions.subject_id = 71689 AND STRFTIME('%y', admissions.admittime) = '2105'
has patient 24921 undergone any medical procedure on their first hospital encounter?
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 labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE outputevents (row_id...
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 24921 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1)