instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What is Team when Qual 1 is 1:20.139?
CREATE TABLE table_49034 ("Name" text,"Team" text,"Qual 1" text,"Qual 2" text,"Best" text)
SELECT "Team" FROM table_49034 WHERE "Qual 1" = '1:20.139'
Name the rank world for 7 rank subcontinent
CREATE TABLE table_2248784_3 (rank_world VARCHAR,rank_subcontinent VARCHAR)
SELECT rank_world FROM table_2248784_3 WHERE rank_subcontinent = 7
When was the game played at the Western Oval venue?
CREATE TABLE table_55810 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Date" FROM table_55810 WHERE "Venue" = 'western oval'
What is the Priority-entry-rights to Derby in rank 4?
CREATE TABLE table_name_51 (priority_entry_rights_to_derby VARCHAR,race_name VARCHAR)
SELECT priority_entry_rights_to_derby FROM table_name_51 WHERE NOT race_name = 4
how many patients are under age 55 and tested with lab item id 51026?
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "55" AND lab.itemid = "51026"
What is the storage stability of Arsine with a toxicity of 8, and field stability less than 5?
CREATE TABLE table_name_30 (storage_stability INTEGER,field_stability VARCHAR,toxicity_as_blood_agent VARCHAR,agent VARCHAR)
SELECT MIN(storage_stability) FROM table_name_30 WHERE toxicity_as_blood_agent > 8 AND agent = "arsine" AND field_stability < 5
What rank did the chassis reynard 94i have in 1996?
CREATE TABLE table_name_66 (rank VARCHAR,chassis VARCHAR,year VARCHAR)
SELECT rank FROM table_name_66 WHERE chassis = "reynard 94i" AND year = "1996"
did patient 013-33898 undergone oxygen therapy (40% to 60%) - non-rebreather mask procedure since 2100?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)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 = '013-33898')) AND treatment.treatmentname = 'oxygen therapy (40% to 60%) - no...
What is the outcome of the election with 43.3% share of votes?
CREATE TABLE table_47456 ("Election" text,"Candidate" text,"Number of votes" text,"Share of votes" text,"Outcome of election" text)
SELECT "Outcome of election" FROM table_47456 WHERE "Share of votes" = '43.3%'
Who is 111years, 358days Age as of 1 February 2014?
CREATE TABLE table_name_86 (name VARCHAR,age_as_of_1_february_2014 VARCHAR)
SELECT name FROM table_name_86 WHERE age_as_of_1_february_2014 = "111years, 358days"
What is channel 33.7's official call sign?
CREATE TABLE table_1404984_1 (call_sign VARCHAR,virtual_channel VARCHAR)
SELECT call_sign FROM table_1404984_1 WHERE virtual_channel = "33.7"
Show a bar chart about how many employees does each role have?, and I want to display Y in ascending order please.
CREATE TABLE Ref_Document_Types (document_type_code CHAR(15),document_type_description VARCHAR(255))CREATE TABLE Employees (employee_id INTEGER,role_code CHAR(15),employee_name VARCHAR(255),other_details VARCHAR(255))CREATE TABLE Addresses (address_id INTEGER,address_details VARCHAR(255))CREATE TABLE Documents_Mailed (...
SELECT role_description, COUNT(*) FROM Roles AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code GROUP BY T2.role_code ORDER BY COUNT(*)
how many of the patients admitted on transfer from hosp/extram had a hospital stay of more than 26 days?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND demographic.days_stay > "26"
all posts with all fields.
CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE FlagTypes ...
SELECT * FROM PostHistoryTypes
Find all movies in which ' Robin Wright ' appears
CREATE TABLE copyright (id int,msid int,cid int)CREATE TABLE producer (pid int,gender text,name text,nationality text,birth_city text,birth_year int)CREATE TABLE movie (mid int,title text,release_year int,title_aka text,budget text)CREATE TABLE cast (id int,msid int,aid int,role text)CREATE TABLE tv_series (sid int,tit...
SELECT movie.title FROM actor, cast, movie WHERE actor.name = 'Robin Wright' AND cast.aid = actor.aid AND movie.mid = cast.msid
how many times do patient 55360's visit the icu in 2105?
CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABL...
SELECT COUNT(DISTINCT icustays.icustay_id) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 55360) AND STRFTIME('%y', icustays.intime) = '2105'
Can you tell me the Player that has the Place of t5, and the Score of 73-72-71-75=291?
CREATE TABLE table_name_33 (player VARCHAR,place VARCHAR,score VARCHAR)
SELECT player FROM table_name_33 WHERE place = "t5" AND score = 73 - 72 - 71 - 75 = 291
what is drug type of drug name sodium chloride 3% inhalation soln?
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 prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "Sodium Chloride 3% Inhalation Soln"
what is the rank for the city of cologne, floors is 34 and height (ft) is more than 452.8?
CREATE TABLE table_name_90 (rank VARCHAR,height__ft_ VARCHAR,city VARCHAR,floors VARCHAR)
SELECT COUNT(rank) FROM table_name_90 WHERE city = "cologne" AND floors = 34 AND height__ft_ > 452.8
What is the smallest capacity for Fandok?
CREATE TABLE table_name_84 (capacity INTEGER,team VARCHAR)
SELECT MIN(capacity) FROM table_name_84 WHERE team = "fandok"
count the number of patients who received insulin - continuous infusion in the same hospital encounter after their respiratory arrest was diagnosed during this year.
CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayi...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'respiratory arrest' AND DATETIME(diagnosis.diagnosistime, 'start of year'...
what are the three most commonly ordered specimen tests for patients who had previously been diagnosed with acute respiratory failure - due to neurological process in the same month, since 4 years ago?
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 t3.culturesite FROM (SELECT t2.culturesite, 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 = 'acute respiratory failure - due to neurologi...
What is the affiliation of the University called Explorers?
CREATE TABLE table_19210115_1 (affiliation VARCHAR,nickname VARCHAR)
SELECT affiliation FROM table_19210115_1 WHERE nickname = "Explorers"
what is the circuit where the fastest lap is sam lowes and the winning rider is luca scassa?
CREATE TABLE table_31296 ("Round" real,"Country" text,"Circuit" text,"Date" text,"Pole Position" text,"Fastest Lap" text,"Winning Rider" text,"Winning Team" text,"Report" text)
SELECT "Circuit" FROM table_31296 WHERE "Fastest Lap" = 'Sam Lowes' AND "Winning Rider" = 'Luca Scassa'
glomerular filtration rate ( gfr ) < 60 ml / min / 1.73 m2
CREATE TABLE table_train_249 ("id" int,"gender" string,"allergy_to_dapagliflozin" bool,"body_weight" float,"estimated_glomerular_filtration_rate_egfr" int,"body_mass_index_bmi" float,"age" float,"NOUSE" float)
SELECT * FROM table_train_249 WHERE estimated_glomerular_filtration_rate_egfr < 60
What shows for the 1st round when the team 1 was Lb Ch teauroux (d2)?
CREATE TABLE table_62575 ("Team 1" text,"Score" text,"Team 2" text,"1st round" text,"2nd round" text)
SELECT "1st round" FROM table_62575 WHERE "Team 1" = 'lb châteauroux (d2)'
What type is ?
CREATE TABLE table_2538117_5 (type VARCHAR,letters VARCHAR)
SELECT type FROM table_2538117_5 WHERE letters = "ΣΑΕΠ"
who placed next after paul tracy ?
CREATE TABLE table_203_761 (id number,"pos" number,"no" number,"driver" text,"team" text,"laps" number,"time/retired" text,"grid" number,"points" number)
SELECT "driver" FROM table_203_761 WHERE "pos" = (SELECT "pos" FROM table_203_761 WHERE "driver" = 'paul tracy') + 1
What is the total number of each fate? Give me the result in a bar graph, and display in desc by the the number of fate please.
CREATE TABLE mission (Mission_ID int,Ship_ID int,Code text,Launched_Year int,Location text,Speed_knots int,Fate text)CREATE TABLE ship (Ship_ID int,Name text,Type text,Nationality text,Tonnage int)
SELECT Fate, COUNT(Fate) FROM mission GROUP BY Fate ORDER BY COUNT(Fate) DESC
What is the color of the locomotive built by Minirail 1954?
CREATE TABLE table_name_42 (colour VARCHAR,built VARCHAR)
SELECT colour FROM table_name_42 WHERE built = "minirail 1954"
in which date the strea was w 2
CREATE TABLE table_30047613_12 (date VARCHAR,streak VARCHAR)
SELECT date FROM table_30047613_12 WHERE streak = "W 2"
find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion.
CREATE TABLE company (rank VARCHAR,company VARCHAR,market_value VARCHAR,main_industry VARCHAR,sales_billion VARCHAR,profits_billion VARCHAR)
SELECT rank, company, market_value FROM company WHERE main_industry = 'Banking' ORDER BY sales_billion, profits_billion
Which artist's work is the butterfly Tiger Swallowtail?
CREATE TABLE table_10557 ("Year" real,"Butterfly" text,"Artist" text,"Mintage" real,"Issue Price" text,"Finish" text)
SELECT "Artist" FROM table_10557 WHERE "Butterfly" = 'tiger swallowtail'
what is the procedure, which patient 63676 underwent two or more times in 04/this year?
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 patients (...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 636...
count the number of times that patient 031-22988 in their first hospital encounter had a gastric (ng) output.
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,wardid number,admissionheight number,admissionweight number,disch...
SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-22988' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient....
Find the number of female patients that survived.
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.expire_flag = "0"
count the number of patients whose religion is greek orthodox and diagnoses long title is drug-induced delirium?
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.religion = "GREEK ORTHODOX" AND diagnoses.long_title = "Drug-induced delirium"
show me the flights from BOSTON to DENVER
CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE ground_service (city_code text,airport_code text,transport_type text,ground_fare int)CREATE TABLE airline (airline_code varchar,airline_name text,note text)CREATE TABLE restri...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER'...
How many engineers did each staff contact? List both the contact staff name and number of engineers contacted Plot them as bar chart, I want to order in desc by the y axis.
CREATE TABLE Part_Faults (part_fault_id INTEGER,part_id INTEGER,fault_short_name VARCHAR(20),fault_description VARCHAR(255),other_fault_details VARCHAR(255))CREATE TABLE Assets (asset_id INTEGER,maintenance_contract_id INTEGER,supplier_company_id INTEGER,asset_details VARCHAR(255),asset_make VARCHAR(20),asset_model VAR...
SELECT staff_name, COUNT(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id = T2.contact_staff_id GROUP BY T1.staff_name ORDER BY COUNT(*) DESC
What is Australia's highest total?
CREATE TABLE table_name_86 (total INTEGER,country VARCHAR)
SELECT MAX(total) FROM table_name_86 WHERE country = "australia"
What is Segment D of 20-08 series Ep.?
CREATE TABLE table_name_89 (segment_d VARCHAR,series_ep VARCHAR)
SELECT segment_d FROM table_name_89 WHERE series_ep = "20-08"
What is the record of the team from chicago?
CREATE TABLE table_name_6 (record VARCHAR,home VARCHAR)
SELECT record FROM table_name_6 WHERE home = "chicago"
what is the number of patients whose primary disease is aortic valve insuffiency\aortic valve replacement /sda and days of hospital stay is greater than 27?
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 WHERE demographic.diagnosis = "AORTIC VALVE INSUFFIENCY\AORTIC VALVE REPLACEMENT /SDA" AND demographic.days_stay > "27"
how many candidates were elected in 1971 ?
CREATE TABLE table_203_330 (id number,"year of election" number,"candidates elected" number,"# of seats available" number,"# of votes" number,"% of popular vote" text)
SELECT "candidates elected" FROM table_203_330 WHERE "year of election" = 1971
What is the U.S. rap ranking in 2000 of the U.S. 105 single?
CREATE TABLE table_49717 ("Year" real,"U.S." text,"U.S. R&B" text,"U.S. Rap" text,"Album" text)
SELECT "U.S. Rap" FROM table_49717 WHERE "Year" = '2000' AND "U.S." = '105'
What is the highest PL GP for a round greater than 9?
CREATE TABLE table_53160 ("Rd #" real,"Pick #" real,"Player" text,"Team (League)" text,"Reg GP" real,"Pl GP" real)
SELECT MAX("Pl GP") FROM table_53160 WHERE "Rd #" > '9'
How many companies are there?
CREATE TABLE Companies (Id VARCHAR)
SELECT COUNT(*) FROM Companies
When there were 30 races and the final placing was 13th, how many points were scored?
CREATE TABLE table_29029 ("Season" real,"Series" text,"Team Name" text,"Races" real,"Poles" real,"Wins" real,"Podiums" real,"F/Laps" real,"Points" text,"Final Placing" text)
SELECT "Points" FROM table_29029 WHERE "Final Placing" = '13th' AND "Races" = '30'
What is the Season with an Acquisition via of rookie draft, and the number is 15?
CREATE TABLE table_name_50 (season VARCHAR,acquisition_via VARCHAR,number VARCHAR)
SELECT season FROM table_name_50 WHERE acquisition_via = "rookie draft" AND number = "15"
What is the lowest amount of money player jim colbert has?
CREATE TABLE table_50249 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" real)
SELECT MIN("Money ( $ )") FROM table_50249 WHERE "Player" = 'jim colbert'
top hundred user for rajkot.
CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,Tags text,RevisionGUID other)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE Rev...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%Bengalore%' OR UPPER(Location) LIKE '%BENGALORE' ORDER BY Reputation DESC LIMIT 100
what is the cheapest flight from DENVER to PITTSBURGH
CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int,dual_carrier text,flight_days text,flight_id int,flight_number int,from_airport varchar,meal_code text,stops int,time_elapsed int,to_airport varchar)CREATE TABLE state (state_cod...
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, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1....
on 12/24/2105 the arterial bp [systolic] of patient 12775 had been normal?
CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)C...
SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12775)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp [syst...
how many people attended the new york giants game on october 25 , 1981 ?
CREATE TABLE table_203_257 (id number,"week" number,"date" text,"opponent" text,"result" text,"attendance" number)
SELECT "attendance" FROM table_203_257 WHERE "opponent" = 'new york giants' AND "date" = 'october 25, 1981'
What is the number of points for the maserati straight-4 engine, later than 1959?
CREATE TABLE table_14465 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" real)
SELECT COUNT("Points") FROM table_14465 WHERE "Engine" = 'maserati straight-4' AND "Year" > '1959'
how many female patients were born before the year 1821?
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 demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.dob_year < "1821"
How many medications are prescribed for each brand Visualize by bar chart, I want to display in desc by the x axis.
CREATE TABLE Block (BlockFloor INTEGER,BlockCode INTEGER)CREATE TABLE Physician (EmployeeID INTEGER,Name VARCHAR(30),Position VARCHAR(30),SSN INTEGER)CREATE TABLE Medication (Code INTEGER,Name VARCHAR(30),Brand VARCHAR(30),Description VARCHAR(30))CREATE TABLE Procedures (Code INTEGER,Name VARCHAR(30),Cost REAL)CREATE T...
SELECT Name, COUNT(*) FROM Medication AS T1 JOIN Prescribes AS T2 ON T1.Code = T2.Medication GROUP BY T1.Brand ORDER BY Name DESC
highly cited sentiment analysis papers
CREATE TABLE paper (paperid int,title varchar,venueid int,year int,numciting int,numcitedby int,journalid int)CREATE TABLE venue (venueid int,venuename varchar)CREATE TABLE journal (journalid int,journalname varchar)CREATE TABLE writes (paperid int,authorid int)CREATE TABLE paperfield (fieldid int,paperid int)CREATE TA...
SELECT DISTINCT cite.citedpaperid, COUNT(cite.citedpaperid) FROM cite, keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'sentiment analysis' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = cite.citedpaperid AND paper.paperid = paperkeyphrase.paperid GROUP BY cite.citedpaperid ...
For those records from the products and each product's manufacturer, visualize a bar chart about the distribution of name and code , and group by attribute headquarter, and list in ascending by the Y-axis.
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 T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Code
How many patients with private insurance had spinal canal explor nec?
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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.short_title = "Spinal canal explor NEC"
What would my uncapped reputation be?.
CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE TagS...
SELECT SUM(CASE WHEN VoteTypeId = 1 THEN 15 WHEN VoteTypeId = 2 AND PostTypeId = 1 THEN 5 WHEN VoteTypeId = 2 AND PostTypeId = 2 THEN 10 WHEN VoteTypeId = 3 THEN -2 WHEN VoteTypeId = 9 THEN BountyAmount END) AS UncappedReputation FROM Votes INNER JOIN Posts ON Posts.Id = Votes.PostId WHERE Posts.OwnerUserId = @UserId
what are your flights from PITTSBURGH to BALTIMORE
CREATE TABLE flight_stop (flight_id int,stop_number int,stop_days text,stop_airport text,arrival_time int,arrival_airline text,arrival_flight_number int,departure_time int,departure_airline text,departure_flight_number int,stop_time int)CREATE TABLE month (month_number int,month_name text)CREATE TABLE flight_fare (flig...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BAL...
how many more winners were there than nominees ?
CREATE TABLE table_204_337 (id number,"festival" text,"year" number,"award" text,"nominee" text,"result" text)
SELECT (SELECT COUNT(*) FROM table_204_337 WHERE "result" = 'won') - (SELECT COUNT(*) FROM table_204_337 WHERE "result" = 'nominated')
For each zip code, find the ids of all trips that have a higher average mean temperature above 60?
CREATE TABLE status (station_id number,bikes_available number,docks_available number,time text)CREATE TABLE trip (id number,duration number,start_date text,start_station_name text,start_station_id number,end_date text,end_station_name text,end_station_id number,bike_id number,subscription_type text,zip_code number)CREA...
SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.zip_code HAVING AVG(T2.mean_temperature_f) > 60
how many chevrolets were in the top 10 ?
CREATE TABLE table_203_131 (id number,"pos." number,"car #" number,"driver" text,"make" text,"team" text)
SELECT COUNT(*) FROM table_203_131 WHERE "make" = 'chevrolet'
please list the morning flights from KANSAS CITY to ATLANTA
CREATE TABLE airport (airport_code varchar,airport_name text,airport_location text,state_code varchar,country_name varchar,time_zone_code varchar,minimum_connect_time int)CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE restriction (restriction_code text,advance_purchase int,stopovers...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'KANSAS CITY' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'A...
Average number of undeleted questions per day per month since site inception.
CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,O...
SELECT DATEFROMPARTS(YEAR('date'), MONTH('date'), 1) AS "month", AVG('count') AS "average_questions_/_day_/_month" FROM (SELECT DATEFROMPARTS(YEAR(CreationDate), MONTH(CreationDate), DAY(CreationDate)) AS "date", COUNT(*) AS "count" FROM Posts WHERE PostTypeId = 1 GROUP BY YEAR(CreationDate), MONTH(CreationDate), DAY(C...
What is the total for the week in the game against the Chicago Bears
CREATE TABLE table_name_38 (week VARCHAR,opponent VARCHAR)
SELECT COUNT(week) FROM table_name_38 WHERE opponent = "chicago bears"
what is the number of hours since patient 3125 was admitted to the hospital?
CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE icustays (r...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', admissions.admittime)) FROM admissions WHERE admissions.subject_id = 3125 AND admissions.dischtime IS NULL
Which Ratio has a Ratio as % of 78%?
CREATE TABLE table_40438 ("Band" text,"Value" text,"Ratio" text,"Ratio as %" text,"Average" text)
SELECT "Ratio" FROM table_40438 WHERE "Ratio as %" = '78%'
Which Character has a Category of favourite naya sadasya?
CREATE TABLE table_58880 ("Year" real,"Award" text,"Category" text,"Show" text,"Character" text,"Results" text)
SELECT "Character" FROM table_58880 WHERE "Category" = 'favourite naya sadasya'
What is the rank with 0 bronze?
CREATE TABLE table_name_9 (rank INTEGER,bronze INTEGER)
SELECT AVG(rank) FROM table_name_9 WHERE bronze < 0
symptomatic congestive heart failure
CREATE TABLE table_train_225 ("id" int,"heart_disease" bool,"diabetic" string,"creatinine_clearance_cl" float,"panel_reactive_antibodies" int,"age" float,"NOUSE" float)
SELECT * FROM table_train_225 WHERE heart_disease = 1
how many times did patient 14054 have lipids 20% in his system the previous month?
CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,end...
SELECT COUNT(*) 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 = 14054)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'lipids 20%' ...
What was the film title used in nomination for the film directed by Gheorghe Vitanidis?
CREATE TABLE table_name_89 (film_title_used_in_nomination VARCHAR,director VARCHAR)
SELECT film_title_used_in_nomination FROM table_name_89 WHERE director = "gheorghe vitanidis"
Which upper elective classes are available for CS ?
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.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id
How many times was the high assists earl watson (5) and the date of the game was december 2?
CREATE TABLE table_11964154_7 (score VARCHAR,high_assists VARCHAR,date VARCHAR)
SELECT COUNT(score) FROM table_11964154_7 WHERE high_assists = "Earl Watson (5)" AND date = "December 2"
patient 60136 has been tested for granular casts in this 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 labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id...
SELECT COUNT(*) > 0 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'granular casts') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 60136 AND admissions.dischtime IS NULL)
What is the average heat ranked at 30?
CREATE TABLE table_name_54 (heat INTEGER,rank VARCHAR)
SELECT AVG(heat) FROM table_name_54 WHERE rank = 30
What's was the location for fight against Liam Mccarty?
CREATE TABLE table_79151 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Location" text)
SELECT "Location" FROM table_79151 WHERE "Opponent" = 'liam mccarty'
how much did patient 5849 pay in their last hospital encounter for his hospital stay?
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 labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum ...
SELECT SUM(cost.cost) FROM cost WHERE cost.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5849 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1)
When was the match with an away team score of 13.15 (93)?
CREATE TABLE table_8945 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Ground" text,"Crowd" real,"Date" text,"Time" text)
SELECT "Date" FROM table_8945 WHERE "Away team score" = '13.15 (93)'
what is discharge location of subject id 29541?
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 demographic.discharge_location FROM demographic WHERE demographic.subject_id = "29541"
What is the total number of Grid, when Rider is Aleix Espargaro?
CREATE TABLE table_name_2 (grid VARCHAR,rider VARCHAR)
SELECT COUNT(grid) FROM table_name_2 WHERE rider = "aleix espargaro"
when is the last year as listed ?
CREATE TABLE table_204_379 (id number,"year" text,"title" text,"hangul" text,"network" text,"further info" text)
SELECT MAX("year") FROM table_204_379
What is the record for the date 15 december, and a round of final?
CREATE TABLE table_44620 ("Event" text,"Date" text,"Round" text,"Name" text,"Nationality" text,"Time" text,"Record" text)
SELECT "Record" FROM table_44620 WHERE "Date" = '15 december' AND "Round" = 'final'
how many times is the chassis brabham bt33?
CREATE TABLE table_49674 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Points" text)
SELECT COUNT("Year") FROM table_49674 WHERE "Chassis" = 'brabham bt33'
Which Score has a Tournament of san jose, us (2)?
CREATE TABLE table_name_56 (score VARCHAR,tournament VARCHAR)
SELECT score FROM table_name_56 WHERE tournament = "san jose, us (2)"
Where did they play in week 14?
CREATE TABLE table_name_57 (game_site VARCHAR,week VARCHAR)
SELECT game_site FROM table_name_57 WHERE week = "14"
What is the height of the player who attended Hartford?
CREATE TABLE table_72218 ("Player" text,"No.(s)" text,"Height in Ft." text,"Position" text,"Years for Rockets" text,"School/Club Team/Country" text)
SELECT "Height in Ft." FROM table_72218 WHERE "School/Club Team/Country" = 'Hartford'
written and oral fluency in english or spanish .
CREATE TABLE table_train_77 ("id" int,"gender" string,"pregnancy_or_lactation" bool,"language" string,"hiv_aids" bool,"age" float,"NOUSE" float)
SELECT * FROM table_train_77 WHERE language = 'english' OR language = 'spanish'
Return a bar chart about the distribution of All_Home and School_ID , and group by attribute ACC_Home, and order in asc by the Y-axis please.
CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Perce...
SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Home, All_Home ORDER BY School_ID
What is the name where the license number is PL 22?
CREATE TABLE table_59732 ("Name (year commissioned)" text,"Owner/operator" text,"Length" text,"Maximum diameter" text,"From/to" text,"Licence number" text)
SELECT "Name (year commissioned)" FROM table_59732 WHERE "Licence number" = 'pl 22'
What is the 1976 value of the Australian Open?
CREATE TABLE table_52460 ("Tournament" text,"1972" text,"1973" text,"1974" text,"1975" text,"1976" text,"1977" text,"1978" text)
SELECT "1976" FROM table_52460 WHERE "Tournament" = 'australian open'
Which 2009 year has a total of 1, and 2004 year of 7th?
CREATE TABLE table_name_45 (total VARCHAR)
SELECT 2009 FROM table_name_45 WHERE total = 1 AND 2004 = "7th"
What numbered pick attended western ontario and is an OL?
CREATE TABLE table_26916 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"School" text)
SELECT "Pick #" FROM table_26916 WHERE "School" = 'Western Ontario' AND "Position" = 'OL'
What is the nationality of the HMS Cheshire?
CREATE TABLE table_name_32 (nationality VARCHAR,name VARCHAR)
SELECT nationality FROM table_name_32 WHERE name = "hms cheshire"
For the Player playing for the College of Kentucky and a Height of 6-7 what was their corresponding School?
CREATE TABLE table_name_72 (school VARCHAR,college VARCHAR,height VARCHAR)
SELECT school FROM table_name_72 WHERE college = "kentucky" AND height = "6-7"
What was the box score for the game that had the Cairns Taipans as home team?
CREATE TABLE table_47221 ("Date" text,"Home team" text,"Score" text,"Away team" text,"Venue" text,"Box Score" text,"Report" text)
SELECT "Box Score" FROM table_47221 WHERE "Home team" = 'cairns taipans'
What is the Place of the Player with a Score of 73-75-71-73=292?
CREATE TABLE table_58864 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text,"Money ($)" text)
SELECT "Place" FROM table_58864 WHERE "Score" = '73-75-71-73=292'