instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
Draw a bar chart of owner versus total number of rating in percent, and order in descending by the y axis.
CREATE TABLE broadcast_share (Channel_ID int,Program_ID int,Date text,Share_in_percent real)CREATE TABLE program (Program_ID int,Name text,Origin text,Launch real,Owner text)CREATE TABLE channel (Channel_ID int,Name text,Owner text,Share_in_percent real,Rating_in_percent real)CREATE TABLE broadcast (Channel_ID int,Prog...
SELECT Owner, SUM(Rating_in_percent) FROM channel GROUP BY Owner ORDER BY SUM(Rating_in_percent) DESC
What is the average Extras for Muttiah Muralitharan, with less than 353 Runs Conceded?
CREATE TABLE table_6930 ("Name" text,"Overs Bowled" real,"Maidens" real,"Runs Conceded" real,"Wickets" real,"Extras" real,"E.R." real)
SELECT AVG("Extras") FROM table_6930 WHERE "Name" = 'muttiah muralitharan' AND "Runs Conceded" < '353'
the previous year, what is the three most frequent drugs prescribed during the same month to female patients of age 50s after having been diagnosed with thrombocytopenia nos?
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
What is the total prominence in ft of the peak of kangchenjunga central, which has a prominence in m less than 32?
CREATE TABLE table_name_67 (prominence__ft_ VARCHAR,name_of_peak VARCHAR,prominence__m_ VARCHAR)
SELECT COUNT(prominence__ft_) FROM table_name_67 WHERE name_of_peak = "kangchenjunga central" AND prominence__m_ < 32
what year was the memphis event?
CREATE TABLE table_name_97 (year INTEGER,event VARCHAR)
SELECT SUM(year) FROM table_name_97 WHERE event = "memphis"
What is the name of the ship that had a Pennant number of h55?
CREATE TABLE table_name_48 (ship VARCHAR,pennant_number VARCHAR)
SELECT ship FROM table_name_48 WHERE pennant_number = "h55"
when was the first time patient 9338 had the maximum arterial bp [systolic] on 01/28/last year.
CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE transfers (row...
SELECT chartevents.charttime 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 = 9338)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ...
SO - Total Posts by Could Service Providers Per Month - Azure.
CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE Users (Id number,Reputation number,CreationDate time,DisplayName text,LastAccessDate time,WebsiteUrl text,Location text,AboutMe text,Views number,UpVotes number,DownVotes number,ProfileImageUrl text,Ema...
SELECT CONCAT(YEAR(P.CreationDate), '-', MONTH(P.CreationDate)) AS YearMonth, 'Azure' AS TagName, COUNT(*) AS PostCount FROM Posts AS P INNER JOIN PostTags AS PT ON (P.Id = PT.PostId) INNER JOIN Tags AS T ON (PT.TagId = T.Id) WHERE T.TagName LIKE '%azure%' GROUP BY YEAR(P.CreationDate), MONTH(P.CreationDate) ORDER BY Y...
On how many different dates did schools from Chestnut Hill, Massachusetts join the conference?
CREATE TABLE table_1973842_1 (joined VARCHAR,location VARCHAR)
SELECT COUNT(joined) FROM table_1973842_1 WHERE location = "Chestnut Hill, Massachusetts"
Show the location codes and the number of documents in each location in a bar chart, and I want to display by the names from high to low.
CREATE TABLE Ref_Locations (Location_Code CHAR(15),Location_Name VARCHAR(255),Location_Description VARCHAR(255))CREATE TABLE All_Documents (Document_ID INTEGER,Date_Stored DATETIME,Document_Type_Code CHAR(15),Document_Name CHAR(255),Document_Description CHAR(255),Other_Details VARCHAR(255))CREATE TABLE Documents_to_be_...
SELECT Location_Code, COUNT(*) FROM Document_Locations GROUP BY Location_Code ORDER BY Location_Code DESC
When the winning driver was jacques villeneuve what was the fastest lap driven?
CREATE TABLE table_name_31 (fastest_lap VARCHAR,winning_driver VARCHAR)
SELECT fastest_lap FROM table_name_31 WHERE winning_driver = "jacques villeneuve"
When the rank is larger than 3 with a second quarter of johnson & johnson 156,515.9, what is the fourth quarter?
CREATE TABLE table_name_86 (fourth_quarter VARCHAR,rank VARCHAR,second_quarter VARCHAR)
SELECT fourth_quarter FROM table_name_86 WHERE rank > 3 AND second_quarter = "johnson & johnson 156,515.9"
Where was game 41 held, and how many people attended?
CREATE TABLE table_25497 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "Location Attendance" FROM table_25497 WHERE "Game" = '41'
Which Moving from has a Nat of ned?
CREATE TABLE table_62853 ("Nat." text,"Name" text,"Moving from" text,"Type" text,"Transfer window" text,"Ends" real,"Transfer fee" text)
SELECT "Moving from" FROM table_62853 WHERE "Nat." = 'ned'
What is the Portuguese word for the English word 'welcome'?
CREATE TABLE table_28807 ("English" text,"Galician (Official)" text,"Galician (Reintegrationist)" text,"Portuguese" text,"Spanish" text)
SELECT "Portuguese" FROM table_28807 WHERE "English" = 'Welcome'
give me the number of patients whose insurance is medicare and diagnoses long title is acute respiratory failure?
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 demographic (subject_id text,hadm_id text,name text,marita...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Medicare" AND diagnoses.long_title = "Acute respiratory failure"
Number of posts with links to Wikipedia.
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,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Ta...
SELECT COUNT(p.Id) FROM Posts AS p WHERE p.Body LIKE '%http://en.wikipedia%'
What is the date of the inauguration with a Length of retirement of 00,624 days?
CREATE TABLE table_name_78 (date_of_inauguration VARCHAR,length_of_retirement VARCHAR)
SELECT date_of_inauguration FROM table_name_78 WHERE length_of_retirement = "00,624 days"
How many u.s. viewers (million) have the production code of 5.09?
CREATE TABLE table_19229713_6 (us_viewers__million_ VARCHAR,production_code VARCHAR)
SELECT us_viewers__million_ FROM table_19229713_6 WHERE production_code = "5.09"
Which stage has kourdali as the name?
CREATE TABLE table_24482 ("Day" text,"Stage" text,"Time (EET)" text,"Name" text,"Length" text,"Winner" text,"Time" text,"Avg. spd." text,"Rally leader" text)
SELECT "Stage" FROM table_24482 WHERE "Name" = 'Kourdali'
how many programs are broadcast in each time section of the day?
CREATE TABLE broadcast (channel_id number,program_id number,time_of_day text)CREATE TABLE broadcast_share (channel_id number,program_id number,date text,share_in_percent number)CREATE TABLE channel (channel_id number,name text,owner text,share_in_percent number,rating_in_percent number)CREATE TABLE program (program_id ...
SELECT COUNT(*), time_of_day FROM broadcast GROUP BY time_of_day
until 2104 is the three most frequent drugs prescribed during the same month to the patients aged 20s after being diagnosed with status autm crd dfbrltr.
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 outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE prescriptions (r...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
how many patients have had foley catheter within 2 months after the beta blocker - metoprolol until 2100?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresul...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'beta blocker - metoprolol' AND STRFTIME('%y', treatment.treatmenttime) <= '2100') AS t1 JOIN (SELECT patient...
What is the purse total for the royal caribbean golf classic?
CREATE TABLE table_53351 ("Date" text,"Tournament" text,"Location" text,"Purse($)" real,"Winner" text,"Score" text,"1st Prize($)" real)
SELECT SUM("Purse( $ )") FROM table_53351 WHERE "Tournament" = 'royal caribbean golf classic'
Show all card type codes and the number of cards in each type by a bar chart, and I want to rank names in ascending order.
CREATE TABLE Accounts (account_id INTEGER,customer_id INTEGER,account_name VARCHAR(50),other_account_details VARCHAR(255))CREATE TABLE Financial_Transactions (transaction_id INTEGER,previous_transaction_id INTEGER,account_id INTEGER,card_id INTEGER,transaction_type VARCHAR(15),transaction_date DATETIME,transaction_amou...
SELECT card_type_code, COUNT(*) FROM Customers_Cards GROUP BY card_type_code ORDER BY card_type_code
How many golds have bronze values of 4 and silver values over 2?
CREATE TABLE table_name_65 (gold VARCHAR,bronze VARCHAR,silver VARCHAR)
SELECT COUNT(gold) FROM table_name_65 WHERE bronze = 4 AND silver > 2
Who was Class AAA during the same year that Class A was (tie) Apple Springs/Texline?
CREATE TABLE table_10399701_2 (class_aAA VARCHAR,class_a VARCHAR)
SELECT class_aAA FROM table_10399701_2 WHERE class_a = "(tie) Apple Springs/Texline"
what were the top four most frequent diagnoses of patients who were diagnosed with arterial thromboembolism - left upper extremity until 2103 that followed during the same hospital visit?
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 intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,cellla...
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'arter...
what's the cost of a drug named multivitamin-12?
CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime ...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'multivitamin-12')
how many medals did france and cuba win ?
CREATE TABLE table_203_535 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number)
SELECT SUM("total") FROM table_203_535 WHERE "nation" IN ('france', 'cuba')
What is the platform for the latest release 8.4?
CREATE TABLE table_47558 ("Name" text,"Company" text,"Platform" text,"Latest stable release" text,"Price in USD" text)
SELECT "Platform" FROM table_47558 WHERE "Latest stable release" = '8.4'
Find the maximum age of all the students.
CREATE TABLE STUDENT (Age INTEGER)
SELECT MAX(Age) FROM STUDENT
What round was Ken Irvin drafted?
CREATE TABLE table_name_54 (round INTEGER,player VARCHAR)
SELECT MAX(round) FROM table_name_54 WHERE player = "ken irvin"
what is the name of the drug that patient 808 was prescribed within 2 days, after being diagnosed this month with unsp hemiplga unspf side?
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE d_icd_diagnoses (row_id number,icd9_code...
SELECT t2.drug FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE admissions.subject_id = 808 AND diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'unsp hem...
Which 2011 is the lowest one that has a 1948 smaller than 15872624, and a 1966 of 263103, and a 1992 larger than 266308?
CREATE TABLE table_39346 ("County" text,"1948" real,"1956" real,"1966" real,"1977" real,"1992" real,"2002" real,"2011" real)
SELECT MIN("2011") FROM table_39346 WHERE "1948" < '15872624' AND "1966" = '263103' AND "1992" > '266308'
What is the school with the nickname Tornadoes Lady Tornadoes?
CREATE TABLE table_12382 ("School" text,"Location (Population)" text,"Nickname(s)" text,"Colors" text,"Years Member" text,"Enrollment (2013/14)" text)
SELECT "School" FROM table_12382 WHERE "Nickname(s)" = 'tornadoes lady tornadoes'
Which regular season had the playoffs of 0 mls cups?
CREATE TABLE table_name_87 (regular_season VARCHAR,playoffs VARCHAR)
SELECT regular_season FROM table_name_87 WHERE playoffs = "0 mls cups"
What home team score has a Away team of melbourne?
CREATE TABLE table_55794 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Home team score" FROM table_55794 WHERE "Away team" = 'melbourne'
What is Team, when High Rebounds is David Lee (15)?
CREATE TABLE table_name_61 (team VARCHAR,high_rebounds VARCHAR)
SELECT team FROM table_name_61 WHERE high_rebounds = "david lee (15)"
What is the result when the week is greater than 6 and the Buffalo Bills are the opponent?
CREATE TABLE table_43461 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text)
SELECT "Result" FROM table_43461 WHERE "Week" > '6' AND "Opponent" = 'buffalo bills'
How many courses for each course description? Show me a stacked bar chart The x-axis is course description and group by office name, and order by the y-axis in descending.
CREATE TABLE CLASS (CLASS_CODE varchar(5),CRS_CODE varchar(10),CLASS_SECTION varchar(2),CLASS_TIME varchar(20),CLASS_ROOM varchar(8),PROF_NUM int)CREATE TABLE EMPLOYEE (EMP_NUM int,EMP_LNAME varchar(15),EMP_FNAME varchar(12),EMP_INITIAL varchar(1),EMP_JOBCODE varchar(5),EMP_HIREDATE datetime,EMP_DOB datetime)CREATE TAB...
SELECT CRS_DESCRIPTION, COUNT(CRS_DESCRIPTION) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY PROF_OFFICE, CRS_DESCRIPTION ORDER BY COUNT(CRS_DESCRIPTION) DESC
how many times was the metoclopramide prescribed in this month for patient 42829?
CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careu...
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 42829) AND prescriptions.drug = 'metoclopramide' AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 month')
Name the total number of wins with top-25 of 10 and events less than 26
CREATE TABLE table_79799 ("Tournament" text,"Wins" real,"Top-5" real,"Top-10" real,"Top-25" real,"Events" real,"Cuts made" real)
SELECT COUNT("Wins") FROM table_79799 WHERE "Top-25" = '10' AND "Events" < '26'
In what competition was the score reported as 12.8 (80) - 8.7 (55)?
CREATE TABLE table_74491 ("Year" text,"Competition" text,"Opponent" text,"Score" text,"Venue" text)
SELECT "Competition" FROM table_74491 WHERE "Score" = '12.8 (80) - 8.7 (55)'
what is the five most commonly taken lab test until 3 years ago for patients with age 40s?
CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE treatment (treatmentid number,patientu...
SELECT t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 40 AND 49) AND DATETIME(lab.labresulttime) <= DATETIME(CURRENT_TIME(), '-3 year') GROUP BY lab.labname) AS t1 WHER...
could you please list all of the classes of flights there are
CREATE TABLE city (city_code varchar,city_name varchar,state_code varchar,country_name varchar,time_zone_code 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_airlin...
SELECT DISTINCT booking_class FROM class_of_service
What is the latest first year with 0 total medals and over 0 golds?
CREATE TABLE table_75033 ("Games" real,"First" real,"Last" real,"Gold" real,"Bronze" real,"Total" real,"Best finish (first/last)" text)
SELECT MAX("First") FROM table_75033 WHERE "Total" > '0' AND "Gold" > '0'
Name the least Laps for accident and gird more than 13
CREATE TABLE table_name_41 (laps INTEGER,time_retired VARCHAR,grid VARCHAR)
SELECT MIN(laps) FROM table_name_41 WHERE time_retired = "accident" AND grid > 13
What is the result for partial thromboplastin time when prothrombin time and bleeding time are prolonged?
CREATE TABLE table_24819 ("Condition" text,"Prothrombin time" text,"Partial thromboplastin time" text,"Bleeding time" text,"Platelet count" text)
SELECT "Partial thromboplastin time" FROM table_24819 WHERE "Prothrombin time" = 'Prolonged' AND "Bleeding time" = 'Prolonged'
what is the earliest flight leaving from BOSTON going to ATLANTA
CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE food_service (meal_code text,meal_number int,compartment text,meal_description varchar)CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE code_description (code varchar,description text)CREATE...
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 = 'ATLANT...
tell me the number of patients who were diagnosed with acute respiratory failure and did not return to hospital during the same month since 4 years ago?
CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitsta...
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute respiratory failure' AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-4 yea...
Where was the Kai Kuh-1 Surion Produced?
CREATE TABLE table_name_28 (produced VARCHAR,aircraft VARCHAR)
SELECT produced FROM table_name_28 WHERE aircraft = "kai kuh-1 surion"
What was zach johnson's score to par?
CREATE TABLE table_275162_1 (to_par VARCHAR,player VARCHAR)
SELECT to_par FROM table_275162_1 WHERE player = "Zach Johnson"
what is the i/o bus when the sspec numebr is sr0n5(l1)?
CREATE TABLE table_13513 ("Model number" text,"sSpec number" text,"Cores" text,"Frequency" text,"Turbo" text,"L2 cache" text,"L3 cache" text,"GPU model" text,"GPU frequency" text,"Socket" text,"I/O bus" text,"Release date" text,"Part number(s)" text,"Release price (USD)" text)
SELECT "I/O bus" FROM table_13513 WHERE "sSpec number" = 'sr0n5(l1)'
who did they have the largest win/loss differential against ?
CREATE TABLE table_203_506 (id number,"opponent" text,"played" number,"won" number,"lost" number,"drawn" number,"% won overall" text)
SELECT "opponent" FROM table_203_506 ORDER BY ABS("won" - "lost") DESC LIMIT 1
What was the venue that featured the Melbourne Tigers as the away team?
CREATE TABLE table_name_95 (venue VARCHAR,away_team VARCHAR)
SELECT venue FROM table_name_95 WHERE away_team = "melbourne tigers"
During the championship where the winning score was 9 (66-69-73-71=279)?, who was the runner-up?
CREATE TABLE table_name_32 (runner_s__up VARCHAR,winning_score VARCHAR)
SELECT runner_s__up FROM table_name_32 WHERE winning_score = −9(66 - 69 - 73 - 71 = 279)
What was the transfer fee for the player who had an App(L/C/E) of 0 (0/0/0) and notes of to anagennisi karditsa?
CREATE TABLE table_name_61 (transfer_fee VARCHAR,app_l_c_e_ VARCHAR,notes VARCHAR)
SELECT transfer_fee FROM table_name_61 WHERE app_l_c_e_ = "0 (0/0/0)" AND notes = "to anagennisi karditsa"
What was the attendance at Kardinia Park?
CREATE TABLE table_name_63 (crowd INTEGER,venue VARCHAR)
SELECT AVG(crowd) FROM table_name_63 WHERE venue = "kardinia park"
is it possible to search my own topics?. http://meta.stackexchange.com/questions/167328/is-it-possible-to-search-my-own-topics
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...
WITH allQs AS (SELECT COALESCE(ParentId, Id) AS postid FROM Posts AS p WHERE OwnerUserId = '##userid:int?393087##') SELECT Id AS "post_link", OwnerUserId AS "user_link", CreationDate, Score FROM Posts AS p INNER JOIN allQs AS q ON q.postid = p.ParentId WHERE p.Body LIKE '%' + '##search:string?database##' + '%' AND p.Ow...
Who was the opponent in the game with save ||33,723||93 64?
CREATE TABLE table_56292 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Save" text)
SELECT "Opponent" FROM table_56292 WHERE "Save" = '||33,723||93–64'
count the number of patients whose ethnicity is black/cape verdean and drug name is 0.45% sodium chloride?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND prescriptions.drug = "0.45% Sodium Chloride"
For those employees who do not work in departments with managers that have ids between 100 and 200, return a bar chart about the distribution of phone_number and employee_id .
CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE departments (D...
SELECT PHONE_NUMBER, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
query question, get top python answers.
CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId...
SELECT p.Id, p2.Score, p2.ParentId, p2.Body FROM Posts AS p JOIN Posts AS p2 ON p2.ParentId = p.Id JOIN PostTags AS pt ON p.Id = pt.PostId JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName LIKE '%python%'
What record has points greater than 39, with 38 as the game?
CREATE TABLE table_35047 ("Game" real,"December" real,"Opponent" text,"Score" text,"Record" text,"Points" real)
SELECT "Record" FROM table_35047 WHERE "Points" > '39' AND "Game" = '38'
among patients who were prescribed methadone pca after they had been diagnosed with cerebral edema show me the four year survival rate.
CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE transfers (row_id number,subject_id number,hadm_id number,icustay_id number,eventtype text,careu...
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 4 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd...
what about a flight from BOSTON to SAN FRANCISCO stopping in DENVER
CREATE TABLE month (month_number int,month_name text)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE time_zone (time_zone_code text,time_zone_name text,hours_from_gmt int)CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE days (days_code varchar,day_name varchar)CREATE T...
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 = 'SAN FRANCISCO' AND CIT...
In Tonga, what is the conversion from patent application?
CREATE TABLE table_2279413_1 (conversion_from_patent_application VARCHAR,country VARCHAR)
SELECT conversion_from_patent_application FROM table_2279413_1 WHERE country = "Tonga"
Who are the opponents with a record of 3-0?
CREATE TABLE table_name_73 (opponents VARCHAR,record VARCHAR)
SELECT opponents FROM table_name_73 WHERE record = "3-0"
Which 2008 club has the name Francesca Piccinini Category:Articles with hCards?
CREATE TABLE table_65700 ("Name" text,"Height" text,"Weight" text,"Spike" text,"2008 club" text)
SELECT "2008 club" FROM table_65700 WHERE "Name" = 'francesca piccinini category:articles with hcards'
What Gershausen has a Willingshain of 243 and Reckerode of 224?
CREATE TABLE table_14773 ("Gersdorf" text,"Gershausen" text,"Heddersdorf" text,"Kemmerode" text,"Kirchheim" text,"Reckerode ****" text,"Reimboldsh." text,"Rotterterode" text,"Willingshain" text)
SELECT "Gershausen" FROM table_14773 WHERE "Willingshain" = '243' AND "Reckerode ****" = '224'
Who is the player with an E to par and a 68-73-69=210?
CREATE TABLE table_10050 ("Place" text,"Player" text,"Country" text,"Score" text,"To par" text)
SELECT "Player" FROM table_10050 WHERE "To par" = 'e' AND "Score" = '68-73-69=210'
how many patients are with death status 0 and procedure icd9 code 9744?
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 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.icd9_code = "9744"
mini _ mental state examination ( mmse ) score between 8 - 20
CREATE TABLE table_train_111 ("id" int,"mini_mental_state_examination_mmse" int,"liver_disease" bool,"geriatric_depression_scale_gds" int,"rosen_modified_hachinski_ischemic_score" int,"plasma_creatinine" float,"NOUSE" float)
SELECT * FROM table_train_111 WHERE mini_mental_state_examination_mmse >= 8 AND mini_mental_state_examination_mmse <= 20
what is primary disease and lab test name of subject name wilbur braatz?
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 text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital...
SELECT demographic.diagnosis, lab.label FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.name = "Wilbur Braatz"
What is the total attended for kilmarnock?
CREATE TABLE table_26980923_2 (total INTEGER,team VARCHAR)
SELECT MIN(total) FROM table_26980923_2 WHERE team = "Kilmarnock"
how many of the patients on government insurance had parenteral infusion of concentrated nutritional substances?
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 = "Government" AND procedures.long_title = "Parenteral infusion of concentrated nutritional substances"
Who was the rookie that played week 6?
CREATE TABLE table_name_59 (rookie VARCHAR,week VARCHAR)
SELECT rookie FROM table_name_59 WHERE week = 6
Which Goals scored has Points larger than 26 and Wins larger than 11?
CREATE TABLE table_name_79 (goals_scored INTEGER,points VARCHAR,wins VARCHAR)
SELECT SUM(goals_scored) FROM table_name_79 WHERE points > 26 AND wins > 11
give me the list of flights for CO between BOSTON and DENVER
CREATE TABLE equipment_sequence (aircraft_code_sequence varchar,aircraft_code varchar)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...
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 = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BOSTON...
has since 29 months ago cepacol (menthol), azithromycin or metoprolol tartrate been prescribed to patient 43959?
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 inputevents_cv (row_...
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 43959) AND prescriptions.drug IN ('cepacol (menthol)', 'azithromycin', 'metoprolol tartrate') AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-29 month')
Count of answers by user over time, by month.
CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUserId number,AutoRenameCount number,LastAutoRename time,Score number,ApprovedByUserId number,ApprovalDate time)CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE Comments (Id number,PostId number,Score number,...
SELECT DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0) AS "month", COUNT(*) AS Count FROM Posts WHERE OwnerUserId = @UserId GROUP BY DATEADD(MONTH, DATEDIFF(MONTH, 0, CreationDate), 0) ORDER BY 'month' DESC
How many picks had less than 11 rounds and a player of Charley Casey?
CREATE TABLE table_47330 ("Round" real,"Pick" real,"Player" text,"Position" text,"School" text)
SELECT SUM("Pick") FROM table_47330 WHERE "Round" < '11' AND "Player" = 'charley casey'
What is the highest track for Burning Love?
CREATE TABLE table_78430 ("Track" real,"Recorded" text,"Catalogue" text,"Release Date" text,"Song Title" text,"Time" text)
SELECT MAX("Track") FROM table_78430 WHERE "Song Title" = 'burning love'
What are the top 5 average finishes equalling 40.3?
CREATE TABLE table_24651 ("Year" real,"Starts" real,"Wins" real,"Top 5" real,"Top 10" real,"Poles" real,"Avg. Start" text,"Avg. Finish" text,"Winnings" text,"Position" text,"Team(s)" text)
SELECT "Top 5" FROM table_24651 WHERE "Avg. Finish" = '40.3'
What is other when no party preference is 19.1%?
CREATE TABLE table_27003186_3 (other VARCHAR,no_party_preference VARCHAR)
SELECT other FROM table_27003186_3 WHERE no_party_preference = "19.1%"
What is Player, when Pick is greater than 24, and when NBA years [a ] is '9'?
CREATE TABLE table_8382 ("Pick" real,"Player" text,"Pos." text,"Nationality" text,"Team" text,"Previous team" text,"NBA years [a ]" text,"Career with the franchise [b ]" text)
SELECT "Player" FROM table_8382 WHERE "Pick" > '24' AND "NBA years [a ]" = '9'
Name the surface when the partner is carlos berlocq
CREATE TABLE table_name_13 (surface VARCHAR,partner VARCHAR)
SELECT surface FROM table_name_13 WHERE partner = "carlos berlocq"
Where delegate is feldman, brian j. brian j. feldman, please specify all the party
CREATE TABLE table_29278 ("District" text,"Counties Represented" text,"Delegate" text,"Party" text,"First Elected" real,"Committee" text)
SELECT "Party" FROM table_29278 WHERE "Delegate" = 'Feldman, Brian J. Brian J. Feldman'
What's the segment A in episode 42?
CREATE TABLE table_5169 ("Series Ep." text,"Episode" real,"Netflix" text,"Segment A" text,"Segment B" text,"Segment C" text,"Segment D" text)
SELECT "Segment A" FROM table_5169 WHERE "Episode" = '42'
What's the average survived with a to Iran less than 1, more than 1 destroyed, and a brazil tucano aircraft?
CREATE TABLE table_59154 ("Aircraft" text,"1990" real,"destroyed" real,"damaged" real,"to Iran" real,"survived" real)
SELECT AVG("survived") FROM table_59154 WHERE "to Iran" < '1' AND "Aircraft" = 'brazil tucano' AND "destroyed" > '1'
Name the result for japanese
CREATE TABLE table_2505 ("Year (Ceremony)" text,"Film title used in nomination" text,"Language(s)" text,"Director" text,"Result" text)
SELECT "Result" FROM table_2505 WHERE "Language(s)" = 'Japanese'
when patient 1819 was admitted to the hospital via the phys referral/normal deli for the last time this year?
CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)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 d_icd_procedures (row_id number,icd9_code text,short_title text...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 1819 AND admissions.admission_location = 'phys referral/normal deli' AND DATETIME(admissions.admittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') ORDER BY admissions.admittime DESC LIMIT 1
without diagnosis of neuromuscular diseases,
CREATE TABLE table_train_18 ("id" int,"with_cardiac_pacemaker" bool,"neuromuscular_disease" bool,"diabetic_polyneuropathy" bool,"body_mass_index_bmi" float,"age" float,"NOUSE" float)
SELECT * FROM table_train_18 WHERE neuromuscular_disease = 0
What is the number of each allergie the girl named Lisa has? Plot them as bar chart, and sort by the total number in asc.
CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Allergy_Type (Allergy VARCHAR(20),AllergyType VARCHAR(20))CREATE TABLE Has_Allergy (StuID INTEGER,Allergy VARCHAR(20))
SELECT T1.Allergy, COUNT(T1.Allergy) FROM Allergy_Type AS T1 JOIN Has_Allergy AS T2 ON T1.Allergy = T2.Allergy JOIN Student AS T3 ON T3.StuID = T2.StuID WHERE T3.Fname = "Lisa" GROUP BY T1.Allergy ORDER BY T1.Allergy
What is the other that has 20.80% as the firefox?
CREATE TABLE table_name_85 (other VARCHAR,firefox VARCHAR)
SELECT other FROM table_name_85 WHERE firefox = "20.80%"
What date was the Home team fitzroy?
CREATE TABLE table_32734 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT "Date" FROM table_32734 WHERE "Home team" = 'fitzroy'
What is the lowest number of goals scored for the entry with goals conceded larger than 30, lost larger than 3, and fewer than 6 draws?
CREATE TABLE table_name_94 (goals_scored INTEGER,goals_conceded VARCHAR,draw VARCHAR,lost VARCHAR)
SELECT MIN(goals_scored) FROM table_name_94 WHERE draw < 6 AND lost > 3 AND goals_conceded > 30
How many total amounts of payments by each method code? You can give me a bar chart, and order x-axis in ascending order.
CREATE TABLE Settlements (Settlement_ID INTEGER,Claim_ID INTEGER,Date_Claim_Made DATE,Date_Claim_Settled DATE,Amount_Claimed INTEGER,Amount_Settled INTEGER,Customer_Policy_ID INTEGER)CREATE TABLE Customers (Customer_ID INTEGER,Customer_Details VARCHAR(255))CREATE TABLE Claims (Claim_ID INTEGER,Policy_ID INTEGER,Date_Cl...
SELECT Payment_Method_Code, SUM(Amount_Payment) FROM Payments GROUP BY Payment_Method_Code ORDER BY Payment_Method_Code
What game was on May 25?
CREATE TABLE table_21600 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "Game" FROM table_21600 WHERE "Date" = 'May 25'