instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
SELECT ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#], Id AS [User Link], Reputati. | CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId num... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE LOWER('%croatia%') ORDER BY Reputation DESC |
Angular vs Ember vs React in Last Month. | CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCou... | SELECT rate.TagName AS Tag, rate.Month AS Month, rate.Year AS Year, rate.Rate AS NumQuestions FROM (SELECT COUNT(PostId) AS Rate, TagName, YEAR(Posts.CreationDate) AS Year, MONTH(Posts.CreationDate) AS Month FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Posts.CreationDate > DATEADD... |
what is the total number of singles w l where doubles w l is 11 14 | CREATE TABLE table_31 ("Player" text,"Total W\u2013L" text,"Singles W\u2013L" text,"Doubles W\u2013L" text,"Ties played" real,"Debut" real,"Years played" real) | SELECT COUNT("Singles W\u2013L") FROM table_31 WHERE "Doubles W\u2013L" = '11–14' |
give the number of patients whose drug code is csa50i and lab test fluid is ascites. | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "CSA50I" AND lab.fluid = "Ascites" |
Record of 47 5 (1) involved what res? | CREATE TABLE table_name_49 (res VARCHAR,record VARCHAR) | SELECT res FROM table_name_49 WHERE record = "47–5 (1)" |
Where did carlton play while away? | CREATE TABLE table_10570 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Venue" FROM table_10570 WHERE "Away team" = 'carlton' |
Which Location Attendance has a Date of april 15? | CREATE TABLE table_7935 ("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_7935 WHERE "Date" = 'april 15' |
Give the maximum product price for each product type in a bar chart, I want to sort in asc by the total number. | CREATE TABLE Customer_Orders (order_id INTEGER,customer_id INTEGER,order_status_code VARCHAR(10),order_date DATETIME)CREATE TABLE Department_Stores (dept_store_id INTEGER,dept_store_chain_id INTEGER,store_name VARCHAR(80),store_address VARCHAR(255),store_phone VARCHAR(80),store_email VARCHAR(80))CREATE TABLE Department... | SELECT product_type_code, MAX(product_price) FROM Products GROUP BY product_type_code ORDER BY MAX(product_price) |
What was the loss of the game with a record of 54 42? | CREATE TABLE table_name_63 (loss VARCHAR,record VARCHAR) | SELECT loss FROM table_name_63 WHERE record = "54–42" |
Name the number of dates for alouettes | CREATE TABLE table_24126518_2 (date VARCHAR,opponent VARCHAR) | SELECT COUNT(date) FROM table_24126518_2 WHERE opponent = "Alouettes" |
age: 30 to 80 years old | CREATE TABLE table_train_247 ("id" int,"mini_mental_state_examination_mmse" int,"creatinine_consistently" float,"creatinine_clearance_cl" float,"seizure_disorder" bool,"age" float,"NOUSE" float) | SELECT * FROM table_train_247 WHERE age >= 30 AND age <= 80 |
Which title aired on 18 dec 2006- 10 feb 2007? | CREATE TABLE table_11710 ("Airing date" text,"English Title (Chinese title)" text,"Number of episodes" real,"Theme song (T) Sub-theme song (ST)" text,"Genre" text,"Official website" text) | SELECT "English Title (Chinese title)" FROM table_11710 WHERE "Airing date" = '18 dec 2006- 10 feb 2007' |
Which tie number has Bolton Wanderers as away? | CREATE TABLE table_name_59 (tie_no VARCHAR,away_team VARCHAR) | SELECT tie_no FROM table_name_59 WHERE away_team = "bolton wanderers" |
what is the venue when the result is 2nd and extra is 4 x 100 m relay? | CREATE TABLE table_name_30 (venue VARCHAR,result VARCHAR,extra VARCHAR) | SELECT venue FROM table_name_30 WHERE result = "2nd" AND extra = "4 x 100 m relay" |
What is the average Lost that has a Name of ec amberg (n), and a Position smaller than 4? | CREATE TABLE table_8225 ("Position" real,"Name" text,"Played" real,"Drawn" real,"Lost" real,"Points" real) | SELECT AVG("Lost") FROM table_8225 WHERE "Name" = 'ec amberg (n)' AND "Position" < '4' |
What is the total for the player with a Finish of T39? | CREATE TABLE table_name_96 (total VARCHAR,finish VARCHAR) | SELECT total FROM table_name_96 WHERE finish = "t39" |
What result has a year after 2002? | CREATE TABLE table_name_35 (result VARCHAR,year INTEGER) | SELECT result FROM table_name_35 WHERE year > 2002 |
who is the grand finalist where scores is 11.11 (77) 10.8 (68) | CREATE TABLE table_1139835_3 (grand_finalist VARCHAR,scores VARCHAR) | SELECT grand_finalist FROM table_1139835_3 WHERE scores = "11.11 (77) – 10.8 (68)" |
which was the first song he performed that was originally a beatles song ? | CREATE TABLE table_204_889 (id number,"date" text,"week (stage)" text,"song choice" text,"original artist" text,"theme" text,"result" text) | SELECT "song choice" FROM table_204_889 WHERE "original artist" = 'the beatles' ORDER BY "date" LIMIT 1 |
what is minimum age of patients whose discharge location is home and primary disease is posterior communicating aneurysm/sda? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT MIN(demographic.age) FROM demographic WHERE demographic.discharge_location = "HOME" AND demographic.diagnosis = "POSTERIOR COMMUNICATING ANEURYSM/SDA" |
Name the number ends won when L is 4 and stolen ends is 17 | CREATE TABLE table_15333005_1 (Ends VARCHAR,l VARCHAR,stolen_ends VARCHAR) | SELECT COUNT(Ends) AS won FROM table_15333005_1 WHERE l = 4 AND stolen_ends = 17 |
Name the CPU clock for L2 cache of 2*512 and series ^ of e-series and DDR3 speed of 1066 | CREATE TABLE table_55086 ("Series ^" text,"Model" text,"CPU clock (MHz)" text,"CPU cores" real,"TDP (W)" text,"L2 cache (KiB)" text,"Radeon cores" real,"DDR3 speed" real) | SELECT "CPU clock ( MHz )" FROM table_55086 WHERE "L2 cache (KiB)" = '2*512' AND "Series ^" = 'e-series' AND "DDR3 speed" = '1066' |
Which type has a quantity of 11? | CREATE TABLE table_10413 ("Class" text,"Type" text,"Quantity" real,"Date" text,"LNER Class" text,"1946 LNER nos." text) | SELECT "Type" FROM table_10413 WHERE "Quantity" = '11' |
count the number of patients who had received a laboratory test of sodium, urine in this year. | CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)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 microbiologyevents (row_id number,subject_i... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium, urine') AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 's... |
The golfer who won in 1993 had what total has his total? | CREATE TABLE table_name_97 (total INTEGER,year_s__won VARCHAR) | SELECT SUM(total) FROM table_name_97 WHERE year_s__won = "1993" |
member of a protected population ( pregnant, prisoner ) | CREATE TABLE table_train_32 ("id" int,"pregnancy_or_lactation" bool,"renal_disease" bool,"hemachromatosis" bool,"glucose_6_phosphate_dehydrogenase_deficiency_g6pd" int,"prisoners" bool,"NOUSE" float) | SELECT * FROM table_train_32 WHERE pregnancy_or_lactation = 1 OR prisoners = 1 |
how many days have passed since the last time patient 004-79017 has received a insertion of venous catheter for hemodialysis treatment in this hospital visit? | 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 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-79017'... |
Show the trend about the number of attendance at home games change over the years, bin year into year interval, order year in ascending order please. | CREATE TABLE batting_postseason (year INTEGER,round TEXT,player_id TEXT,team_id TEXT,league_id TEXT,g INTEGER,ab INTEGER,r INTEGER,h INTEGER,double INTEGER,triple INTEGER,hr INTEGER,rbi INTEGER,sb INTEGER,cs NUMERIC,bb INTEGER,so INTEGER,ibb NUMERIC,hbp NUMERIC,sh NUMERIC,sf NUMERIC,g_idp NUMERIC)CREATE TABLE hall_of_f... | SELECT year, SUM(attendance) FROM home_game ORDER BY year |
What is the call sign with a 222 erp w? | CREATE TABLE table_name_15 (call_sign VARCHAR,erp_w VARCHAR) | SELECT call_sign FROM table_name_15 WHERE erp_w = 222 |
What are the different classes of races, and how many races correspond to each Show bar chart, could you rank by the X in desc? | CREATE TABLE race (Race_ID int,Name text,Class text,Date text,Track_ID text)CREATE TABLE track (Track_ID int,Name text,Location text,Seating real,Year_Opened real) | SELECT Class, COUNT(*) FROM race GROUP BY Class ORDER BY Class DESC |
provide the number of patients whose admission type is emergency and lab test name is uric acid? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND lab.label = "Uric Acid" |
What's the maximal L3 cache for any of the models given? | CREATE TABLE table_269920_3 (l2_cache__mb_ INTEGER) | SELECT MAX(l2_cache__mb_) FROM table_269920_3 |
Who are the writers of the episode titled 'Mac Bangs Dennis' Mom'? | CREATE TABLE table_31034 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text) | SELECT "Written by" FROM table_31034 WHERE "Title" = 'Mac Bangs Dennis'' Mom' |
What kind of IATA has an Airport of hamburg airport? | CREATE TABLE table_name_5 (iata VARCHAR,airport VARCHAR) | SELECT iata FROM table_name_5 WHERE airport = "hamburg airport" |
Top 200 users from Bulgaria. | CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,MarkdownConcensusDescription text,CreationDate time,CreationModeratorId number,ApprovalDate time,ApprovalModeratorId number,DeactivationDat... | SELECT Id AS "user_link", DisplayName, Reputation, Location FROM Users WHERE Location LIKE '%Sofia%' OR Location LIKE '%Bulgaria%' ORDER BY Reputation DESC LIMIT 200 |
Which Attendance has an Arena of arrowhead pond of anaheim, and Points smaller than 5? | CREATE TABLE table_64932 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text,"Arena" text,"Points" real) | SELECT "Attendance" FROM table_64932 WHERE "Arena" = 'arrowhead pond of anaheim' AND "Points" < '5' |
What was the ranking of episode #19? | CREATE TABLE table_28418 ("No." real,"#" real,"Title" text,"Directed by" text,"Written by" text,"U.S. viewers (million)" text,"Rank (week)" text,"Original air date" text,"Production code" text) | SELECT "Rank (week)" FROM table_28418 WHERE "#" = '19' |
Which Driver has a Grid of 1? | CREATE TABLE table_name_45 (driver VARCHAR,grid VARCHAR) | SELECT driver FROM table_name_45 WHERE grid = "1" |
Which Horse finished in 8? | CREATE TABLE table_76507 ("Finished" text,"Horse" text,"Jockey" text,"Trainer" text,"Odds" text) | SELECT "Horse" FROM table_76507 WHERE "Finished" = '8' |
How many ranks have assets of $70.74 billion and market value greater than $11.29 billion? | CREATE TABLE table_name_49 (rank VARCHAR,assets__bn$_ VARCHAR,market_value__bn$_ VARCHAR) | SELECT COUNT(rank) FROM table_name_49 WHERE assets__bn$_ = 70.74 AND market_value__bn$_ > 11.29 |
calculate patient 006-254232's duration of stay of the last stay in the icu. | CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE lab (labid number,patientunitstayid number,labnam... | SELECT STRFTIME('%j', patient.unitdischargetime) - STRFTIME('%j', patient.unitadmittime) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-254232') AND NOT patient.unitadmittime IS NULL ORDER BY patient.unitadmittime DESC LIMIT ... |
Top Ranking by Tag and Country. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE Comments (Id number,PostId number,Score number,Text text,CreationDate time,UserDisplayName text,UserId number,ContentLicense text)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate ti... | SELECT ROW_NUMBER() OVER (ORDER BY SUM(CASE WHEN VoteTypeId = 2 THEN 1 ELSE (CASE WHEN VoteTypeId = 3 THEN -1 ELSE 0 END) END) DESC) AS "#", Users.Id AS "user_link", SUM(CASE WHEN VoteTypeId = 2 THEN 1 ELSE (CASE WHEN VoteTypeId = 3 THEN -1 ELSE 0 END) END) AS CalcRep FROM Users, Tags INNER JOIN PostTags ON PostTags.Ta... |
What is the total point count of the youngest gymnast? | CREATE TABLE gymnast (gymnast_id number,floor_exercise_points number,pommel_horse_points number,rings_points number,vault_points number,parallel_bars_points number,horizontal_bar_points number,total_points number)CREATE TABLE people (people_id number,name text,age number,height number,hometown text) | SELECT T1.total_points FROM gymnast AS T1 JOIN people AS T2 ON T1.gymnast_id = T2.people_id ORDER BY T2.age LIMIT 1 |
Name the melbourne for adelaide of no with auckland of yes and gold coast of yes | CREATE TABLE table_name_49 (melbourne VARCHAR,gold_coast VARCHAR,adelaide VARCHAR,auckland VARCHAR) | SELECT melbourne FROM table_name_49 WHERE adelaide = "no" AND auckland = "yes" AND gold_coast = "no" |
Who was the opponent at the game later than game 22 when the record was 17-10-4? | CREATE TABLE table_6601 ("Game" real,"December" real,"Opponent" text,"Score" text,"Record" text) | SELECT "Opponent" FROM table_6601 WHERE "Game" > '22' AND "Record" = '17-10-4' |
What is the highest points with g Tyres and Minardi m187? | CREATE TABLE table_71123 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Tyres" text,"Points" real) | SELECT MAX("Points") FROM table_71123 WHERE "Tyres" = 'g' AND "Chassis" = 'minardi m187' |
Name the total number of affiliation for enrollment being 14898 | CREATE TABLE table_20707 ("School" text,"Location" text,"Founded" real,"Affiliation" text,"Enrollment" real,"Nickname" text,"Primary conference" text) | SELECT COUNT("Affiliation") FROM table_20707 WHERE "Enrollment" = '14898' |
c _ peptide value less than 1 pmol / ml 90 minutes after oral boost plus administration. | CREATE TABLE table_train_161 ("id" int,"white_blood_cell_count_wbc" int,"systolic_blood_pressure_sbp" int,"c_peptide_level" float,"diastolic_blood_pressure_dbp" int,"heart_rate" int,"glycosylated_hemoglobin" float,"NOUSE" float) | SELECT * FROM table_train_161 WHERE c_peptide_level < 1 |
What's the mountains classification of winner Carlos Sastre when the general classification is Denis Menchov? | CREATE TABLE table_name_15 (mountains_classification VARCHAR,general_classification VARCHAR,winner VARCHAR) | SELECT mountains_classification FROM table_name_15 WHERE general_classification = "denis menchov" AND winner = "carlos sastre" |
what was the minimum monthly number of patients who were diagnosed with sinusitis - radiographically demonstrated until 2 years ago? | CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,obs... | SELECT MIN(t1.c1) FROM (SELECT COUNT(DISTINCT diagnosis.patientunitstayid) AS c1 FROM diagnosis WHERE diagnosis.diagnosisname = 'sinusitis - radiographically demonstrated' AND DATETIME(diagnosis.diagnosistime) <= DATETIME(CURRENT_TIME(), '-2 year') GROUP BY STRFTIME('%y-%m', diagnosis.diagnosistime)) AS t1 |
give me the number of patients whose insurance is private and days of hospital stay is greater than 7? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime tex... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.insurance = "Private" AND demographic.days_stay > "7" |
what the first height of patient 012-35195. | CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime ti... | SELECT patient.admissionheight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-35195') AND NOT patient.admissionheight IS NULL ORDER BY patient.unitadmittime LIMIT 1 |
List the names of all distinct races in reversed lexicographic order? | CREATE TABLE drivers (driverid number,driverref text,number number,code text,forename text,surname text,dob text,nationality text,url text)CREATE TABLE circuits (circuitid number,circuitref text,name text,location text,country text,lat number,lng number,alt number,url text)CREATE TABLE seasons (year number,url text)CRE... | SELECT DISTINCT name FROM races ORDER BY name DESC |
Calvin Abueva Calvin Abueva had what statistic? | CREATE TABLE table_59136 ("Statistic" text,"Name" text,"Total" text,"School" text,"Opponent" text,"Stage" text) | SELECT "Statistic" FROM table_59136 WHERE "Name" = 'calvin abueva calvin abueva' |
What is every time(cet) for the name of Lillehammer 2? | CREATE TABLE table_21536557_2 (time__cet_ VARCHAR,name VARCHAR) | SELECT time__cet_ FROM table_21536557_2 WHERE name = "Lillehammer 2" |
When the opposing team was SSC-R what was the statistic? | CREATE TABLE table_59137 ("Statistic" text,"Name" text,"Total" text,"School" text,"Opponent" text,"Stage" text) | SELECT "Statistic" FROM table_59137 WHERE "Opponent" = 'ssc-r' |
when was their first loss of the season ? | CREATE TABLE table_203_280 (id number,"week" number,"date" text,"opponent" text,"result" text,"record" text,"game site" text,"tv time" text,"attendance" number,"bye" text) | SELECT "date" FROM table_203_280 WHERE "result" = 'l' ORDER BY id LIMIT 1 |
Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot. | CREATE TABLE pilot (pilot_id number,pilot_name text,rank number,age number,nationality text,position text,join_year number,team text)CREATE TABLE pilot_record (record_id number,pilot_id number,aircraft_id number,date text)CREATE TABLE aircraft (aircraft_id number,order_year number,manufacturer text,model text,fleet_ser... | SELECT T3.pilot_name, T2.fleet_series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.aircraft_id = T2.aircraft_id JOIN pilot AS T3 ON T1.pilot_id = T3.pilot_id ORDER BY T3.rank |
what year was beyond the sea released ? | CREATE TABLE table_203_438 (id number,"year" number,"title" text,"role" text,"notes" text) | SELECT "year" FROM table_203_438 WHERE "title" = 'beyond the sea' |
how many titles are listed for august ? | CREATE TABLE table_203_349 (id number,"no. in\nseries" number,"no. in\nseason" number,"title" text,"directed by" text,"written by" text,"original air date" text,"production\ncode" text,"u.s. viewers\n(millions)" number) | SELECT COUNT("title") FROM table_203_349 WHERE "original air date" = 8 |
What is the accrediation for united tribes technical college? | CREATE TABLE table_2076522_2 (accreditation VARCHAR,school VARCHAR) | SELECT accreditation FROM table_2076522_2 WHERE school = "United Tribes Technical College" |
What is the average round of the player from the college of baylor with a pick less than 28? | CREATE TABLE table_name_18 (round INTEGER,college VARCHAR,pick VARCHAR) | SELECT AVG(round) FROM table_name_18 WHERE college = "baylor" AND pick < 28 |
What component has an integrated of one? | CREATE TABLE table_name_21 (component VARCHAR,integrated VARCHAR) | SELECT component FROM table_name_21 WHERE integrated = "one" |
What are the dates that have an average sea level pressure between 303 and 31, and count them by a bar chart, and rank by the y-axis in ascending please. | CREATE TABLE weather (date TEXT,max_temperature_f INTEGER,mean_temperature_f INTEGER,min_temperature_f INTEGER,max_dew_point_f INTEGER,mean_dew_point_f INTEGER,min_dew_point_f INTEGER,max_humidity INTEGER,mean_humidity INTEGER,min_humidity INTEGER,max_sea_level_pressure_inches NUMERIC,mean_sea_level_pressure_inches NUM... | SELECT date, COUNT(date) FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 ORDER BY COUNT(date) |
How many values of prominence(m) occur at rank 5? | CREATE TABLE table_18946749_4 (prominence__m_ VARCHAR,rank VARCHAR) | SELECT COUNT(prominence__m_) FROM table_18946749_4 WHERE rank = 5 |
What country has a To par of e? | CREATE TABLE table_name_84 (country VARCHAR,to_par VARCHAR) | SELECT country FROM table_name_84 WHERE to_par = "e" |
baseline hb < 10.5 gm / dl in female , or < 13 gm / dl in male | CREATE TABLE table_dev_31 ("id" int,"gender" string,"pre_dm" bool,"hemoglobin_a1c_hba1c" float,"renal_disease" bool,"diabetic" string,"fasting_blood_glucose_fbg" float,"creatinine_clearance_cl" float,"estimated_glomerular_filtration_rate_egfr" int,"fasting_plasma_glucose" int,"early_dm" bool,"oral_glucose_tolerance_tes... | SELECT * FROM table_dev_31 WHERE (baseline_hemoglobin_hgb < 10.5 AND gender = 'female') OR (baseline_hemoglobin_hgb < 13 AND gender = 'male') |
how many patients whose gender is m and days of hospital stay is greater than 5? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "M" AND demographic.days_stay > "5" |
What week was the member who arrived on the main island in week 6 sent to the third island? | CREATE TABLE table_11764007_2 (week_sent_to_third_island VARCHAR,week_arrived_on_main_island VARCHAR) | SELECT week_sent_to_third_island FROM table_11764007_2 WHERE week_arrived_on_main_island = "6" |
Which giant slalom had an Overall number of 25? | CREATE TABLE table_10849 ("Season" real,"Overall" real,"Slalom" real,"Giant Slalom" text,"Super G" text,"Downhill" text) | SELECT "Giant Slalom" FROM table_10849 WHERE "Overall" = '25' |
On what Date is the Circuit at Sandown Raceway? | CREATE TABLE table_name_37 (date VARCHAR,circuit VARCHAR) | SELECT date FROM table_name_37 WHERE circuit = "sandown raceway" |
how many more runs does john have than albert ? | CREATE TABLE table_204_154 (id number,"player" text,"matches" number,"innings" number,"runs" number,"average" number,"100s" number,"50s" number) | SELECT (SELECT "runs" FROM table_204_154 WHERE "player" = 'john challen') - (SELECT "runs" FROM table_204_154 WHERE "player" = 'albert clapp') |
What grand prixs did Daijiro Hiura win? | CREATE TABLE table_73000 ("Round" real,"Date" text,"Grand Prix" text,"Circuit" text,"Pole Position" text,"Fastest Lap" text,"Race Winner" text) | SELECT "Grand Prix" FROM table_73000 WHERE "Race Winner" = 'Daijiro Hiura' |
how many patients hospital stay is more than 4 days with drug code cita20? | 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 procedures (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "4" AND prescriptions.formulary_drug_cd = "CITA20" |
How many of the patients on urgent admission were born before 2024? | 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.admission_type = "URGENT" AND demographic.dob_year < "2024" |
What is the gold number when total is more than 1, and bronze is 0, and rank is 5? | CREATE TABLE table_name_19 (gold INTEGER,rank VARCHAR,total VARCHAR,bronze VARCHAR) | SELECT SUM(gold) FROM table_name_19 WHERE total > 1 AND bronze = 0 AND rank = "5" |
count the number of patients whose diagnoses short title is polyp of nasal cavity and drug route is nu? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Polyp of nasal cavity" AND prescriptions.route = "NU" |
What was the date of the game that lasted 75:43? | CREATE TABLE table_name_93 (date VARCHAR,length_of_game VARCHAR) | SELECT date FROM table_name_93 WHERE length_of_game = "75:43" |
What is the school or country for the guard from 2000? | CREATE TABLE table_33330 ("Player" text,"Nationality" text,"Position" text,"From" text,"School/Country" text) | SELECT "School/Country" FROM table_33330 WHERE "Position" = 'guard' AND "From" = '2000' |
What is the method of resolution for the fight against akihiro gono? | CREATE TABLE table_45147 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Method" FROM table_45147 WHERE "Opponent" = 'akihiro gono' |
how many patients have gotten discharged from the hospital since 6 years ago? | CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE NOT admissions.dischtime IS NULL AND DATETIME(admissions.dischtime) >= DATETIME(CURRENT_TIME(), '-6 year') |
What tournament was after 2009? | CREATE TABLE table_name_8 (tournament VARCHAR,year INTEGER) | SELECT tournament FROM table_name_8 WHERE year > 2009 |
What was the attendance of the game in week 6? | CREATE TABLE table_name_9 (attendance VARCHAR,week VARCHAR) | SELECT attendance FROM table_name_9 WHERE week = 6 |
What is the Rank of the Swimmer with a Time of 2:25.65 in a Lane larger than 3? | CREATE TABLE table_name_36 (rank INTEGER,time VARCHAR,lane VARCHAR) | SELECT AVG(rank) FROM table_name_36 WHERE time = "2:25.65" AND lane > 3 |
What is the Opponent of the game in Week 3? | CREATE TABLE table_63605 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text) | SELECT "Opponent" FROM table_63605 WHERE "Week" = '3' |
What season had Kanto Gakuin University as the winner, with an attendance of n/a, and a title of 37th? | CREATE TABLE table_34610 ("Title" text,"Season" text,"Winner" text,"Score" text,"Runner-up" text,"Venue" text,"Attendance" text) | SELECT "Season" FROM table_34610 WHERE "Winner" = 'kanto gakuin university' AND "Attendance" = 'n/a' AND "Title" = '37th' |
How many pole position achieved 0 points from Mexico? | CREATE TABLE table_27279050_1 (poles VARCHAR,points VARCHAR,nation VARCHAR) | SELECT COUNT(poles) FROM table_27279050_1 WHERE points = "0" AND nation = "Mexico" |
what is the total when the rank is total and the silver is less than 10? | CREATE TABLE table_65435 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT SUM("Total") FROM table_65435 WHERE "Rank" = 'total' AND "Silver" < '10' |
What is the number of each allergie type that the student with first name Lisa has? Visualize by bar chart, and order x axis from high to low order. | 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 AllergyType, COUNT(AllergyType) 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 AllergyType ORDER BY AllergyType DESC |
find the age of subject name bruce harris. | 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 lab (subject_id text,hadm_id text,itemid text,charttime tex... | SELECT demographic.age FROM demographic WHERE demographic.name = "Bruce Harris" |
What is the date of the episode written by Michael Poryes? | CREATE TABLE table_72255 ("Series #" real,"Season #" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text) | SELECT "Original air date" FROM table_72255 WHERE "Written by" = 'Michael Poryes' |
which Points has Games smaller than 7? | CREATE TABLE table_6478 ("Games" real,"Drawn" real,"Lost" real,"Points difference" text,"Points" real) | SELECT MAX("Points") FROM table_6478 WHERE "Games" < '7' |
What is the total amount of Gold from guatemala and silver smaller than 0? | CREATE TABLE table_name_88 (gold INTEGER,nation VARCHAR,silver VARCHAR) | SELECT SUM(gold) FROM table_name_88 WHERE nation = "guatemala" AND silver < 0 |
For those records from the products and each product's manufacturer, give me the comparison about the average of code over the name , and group by attribute name by a bar chart, and could you sort by the mean code in descending please? | CREATE TABLE Products (Code INTEGER,Name VARCHAR(255),Price DECIMAL,Manufacturer INTEGER)CREATE TABLE Manufacturers (Code INTEGER,Name VARCHAR(255),Headquarter VARCHAR(255),Founder VARCHAR(255),Revenue REAL) | SELECT T2.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Name ORDER BY T1.Code DESC |
Age off by one error. | CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE ... | SELECT Id AS "user_link", age FROM Users WHERE DisplayName LIKE 'Richard J. Ross III' |
how many patients whose discharge location is disch-tran to psych hosp and primary disease is t5 fracture? | 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 procedures (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND demographic.diagnosis = "T5 FRACTURE" |
what is the average lost when played is more than 14? | CREATE TABLE table_name_32 (lost INTEGER,played INTEGER) | SELECT AVG(lost) FROM table_name_32 WHERE played > 14 |
what is date of death of subject name kelly gallardo? | 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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd t... | SELECT demographic.dod FROM demographic WHERE demographic.name = "Kelly Gallardo" |
Which date had a venue of the Gold Coast Convention Centre? | CREATE TABLE table_name_36 (date VARCHAR,venue VARCHAR) | SELECT date FROM table_name_36 WHERE venue = "gold coast convention centre" |
What was the result of the election in the Virginia 3 district? | CREATE TABLE table_18238 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Result" FROM table_18238 WHERE "District" = 'Virginia 3' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.