instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
What female fenced with a saber on the team that had an average fencer rank of 3.5? | CREATE TABLE table_30490 ("Team" text,"Female \u00e9p\u00e9e" text,"Male \u00e9p\u00e9e" text,"Female foil" text,"Male foil" text,"Female saber" text,"Male saber" text,"Average fencers rank" text,"Initial Team rank" real) | SELECT "Female saber" FROM table_30490 WHERE "Average fencers rank" = '3.5' |
What is the averag weights for people of each sex? Show a bar chart. | CREATE TABLE people (People_ID int,Sex text,Name text,Date_of_Birth text,Height real,Weight real)CREATE TABLE candidate (Candidate_ID int,People_ID int,Poll_Source text,Date text,Support_rate real,Consider_rate real,Oppose_rate real,Unsure_rate real) | SELECT Sex, AVG(Weight) FROM people GROUP BY Sex |
What was the college for the player with the cfl team of Edmonton Eskimos (via calgary)? | CREATE TABLE table_16317 ("Pick #" real,"CFL Team" text,"Player" text,"Position" text,"College" text) | SELECT "College" FROM table_16317 WHERE "CFL Team" = 'Edmonton Eskimos (via Calgary)' |
calculate the number of patients who received a periph nerve destruction procedure two or more times. | 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 diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,chartti... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'periph nerve destruct... |
How many answers are there?. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE PostFeedback (Id number,PostId number,IsAnonymous boolean,VoteTypeId number,CreationDate time)CREATE TABLE ReviewRejectionReasons (Id number,Name te... | SELECT COUNT(A.Id) FROM Posts AS A WHERE A.PostTypeId = 2 |
Name the bleeding time with platelet count of unaffected and condition of factor xii deficiency | CREATE TABLE table_name_83 (bleeding_time VARCHAR,platelet_count VARCHAR,condition VARCHAR) | SELECT bleeding_time FROM table_name_83 WHERE platelet_count = "unaffected" AND condition = "factor xii deficiency" |
what is the highest number of games played when there was 2 losses, percentage was 0.00% and more than 0 draws? | CREATE TABLE table_name_2 (played INTEGER,drawn VARCHAR,lost VARCHAR,percentage VARCHAR) | SELECT MAX(played) FROM table_name_2 WHERE lost = 2 AND percentage = "0.00%" AND drawn > 0 |
What are the types and countries of competitions? | CREATE TABLE competition (Competition_type VARCHAR,Country VARCHAR) | SELECT Competition_type, Country FROM competition |
Give me the number of patients with atrial septal defect/mitral valve replacement repair atrial-septal defect/sda who underwent catheter based invasive electrophysiologic testing. | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,do... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "ATRIAL SEPTAL DEFECT\MITRAL VALVE REPLACEMENT;REPAIR ATRIAL-SEPTAL DEFECT/SDA" AND procedures.short_title = "Cath base invasv ep test" |
Who had the fastest lap at the Australian Grand Prix? | CREATE TABLE table_name_36 (fastest_lap VARCHAR,grand_prix VARCHAR) | SELECT fastest_lap FROM table_name_36 WHERE grand_prix = "australian grand prix" |
when was patient 4401's heart rate last measured less than 90.0 since 12/25/2105? | CREATE TABLE d_icd_diagnoses (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 chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,ite... | 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 = 4401)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rat... |
When the home team was geelong, who played as the away team? | CREATE TABLE table_name_80 (away_team VARCHAR,home_team VARCHAR) | SELECT away_team FROM table_name_80 WHERE home_team = "geelong" |
What is the rank for the rowers with the time of 6:24.35? | CREATE TABLE table_64918 ("Rank" real,"Rowers" text,"Country" text,"Time" text,"Notes" text) | SELECT "Rank" FROM table_64918 WHERE "Time" = '6:24.35' |
What was the score for the episode with Matt Smith as Andrew and Jack's guest? | CREATE TABLE table_29141354_7 (scores VARCHAR,andrew_and_jacks_guest VARCHAR) | SELECT scores FROM table_29141354_7 WHERE andrew_and_jacks_guest = "Matt Smith" |
What was the score in the tournament won by Jan Stephenson? | CREATE TABLE table_229059_2 (score VARCHAR,champion VARCHAR) | SELECT score FROM table_229059_2 WHERE champion = "Jan Stephenson" |
what is drug route of drug name ascorbic acid? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE diagnoses (subject_id text,hadm_id tex... | SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Ascorbic Acid" |
how many times did japan place in the top 2 ? | CREATE TABLE table_203_215 (id number,"year" number,"competition" text,"venue" text,"position" text,"event" text,"notes" text) | SELECT COUNT(*) FROM table_203_215 WHERE "position" <= 2 |
Where is Robert Morris University-Illinois held? | CREATE TABLE table_27361255_1 (location VARCHAR,institution VARCHAR) | SELECT location FROM table_27361255_1 WHERE institution = "Robert Morris University-Illinois" |
What was the final result for Les Aspin? | CREATE TABLE table_1341577_50 (result VARCHAR,incumbent VARCHAR) | SELECT result FROM table_1341577_50 WHERE incumbent = "Les Aspin" |
Show the average and maximum damage for all storms with max speed higher than 1000. | CREATE TABLE storm (damage_millions_USD INTEGER,max_speed INTEGER) | SELECT AVG(damage_millions_USD), MAX(damage_millions_USD) FROM storm WHERE max_speed > 1000 |
Top 50 Stack Overflow Users Of Nepal. | CREATE TABLE CloseReasonTypes (Id number,Name text,Description text)CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,Clo... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC), Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%nepal%' OR UPPER(Location) LIKE '%NP' ORDER BY Reputation DESC LIMIT 50 |
What are the different card type codes, and how many different customers hold each type? | CREATE TABLE accounts (account_id number,customer_id number,account_name text,other_account_details text)CREATE TABLE financial_transactions (transaction_id number,previous_transaction_id number,account_id number,card_id number,transaction_type text,transaction_date time,transaction_amount number,transaction_comment te... | SELECT card_type_code, COUNT(DISTINCT customer_id) FROM customers_cards GROUP BY card_type_code |
What is the high run total associated with a high score of 385 and under 407 innings? | CREATE TABLE table_71854 ("Matches" real,"Innings" real,"Not Out" real,"High Score" text,"Runs" real,"Average" real) | SELECT MAX("Runs") FROM table_71854 WHERE "High Score" = '385' AND "Innings" < '407' |
Where is john daly of united states from? | CREATE TABLE table_name_77 (place VARCHAR,country VARCHAR,player VARCHAR) | SELECT place FROM table_name_77 WHERE country = "united states" AND player = "john daly" |
how many patients whose drug route is po? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "PO" |
What is the highest rank for gene littler with under 3 wins and under $962,133? | CREATE TABLE table_56198 ("Rank" real,"Player" text,"Country" text,"Earnings($)" real,"Wins" real) | SELECT MAX("Rank") FROM table_56198 WHERE "Earnings( $ )" < '962,133' AND "Player" = 'gene littler' AND "Wins" < '3' |
how much of a difference has patient 010-6010 in anion gap second measured on the first hospital visit compared to the first value measured on the first hospital visit? | CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE lab (labid number,patientunitstayid number,labna... | SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '010-6010' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospit... |
What is Event, when Round is '1', when Location is 'New Town, North Dakota , United States' and when Time is '4:12'? | CREATE TABLE table_43633 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Event" FROM table_43633 WHERE "Round" = '1' AND "Location" = 'new town, north dakota , united states' AND "Time" = '4:12' |
How many distinct types of accounts are there? | CREATE TABLE bank (branch_id number,bname text,no_of_customers number,city text,state text)CREATE TABLE loan (loan_id text,loan_type text,cust_id text,branch_id text,amount number)CREATE TABLE customer (cust_id text,cust_name text,acc_type text,acc_bal number,no_of_loans number,credit_score number,branch_id number,stat... | SELECT COUNT(DISTINCT acc_type) FROM customer |
Where did the artist All Mixed Up place? | CREATE TABLE table_12082 ("Draw" real,"Artist" text,"Song" text,"Points" real,"Place" real) | SELECT MIN("Place") FROM table_12082 WHERE "Artist" = 'all mixed up' |
What was the attendance for the home team of Walsall? | CREATE TABLE table_name_48 (attendance VARCHAR,home_team VARCHAR) | SELECT attendance FROM table_name_48 WHERE home_team = "walsall" |
Playing against the Seattle Seahawks in a week after week 1 before 69,149 people what was the result of the game? | CREATE TABLE table_64351 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" text) | SELECT "Result" FROM table_64351 WHERE "Week" > '1' AND "Attendance" = '69,149' AND "Opponent" = 'seattle seahawks' |
Show the number of faculty members for each rank in a bar chart. | CREATE TABLE Faculty_Participates_in (FacID INTEGER,actid INTEGER)CREATE TABLE Activity (actid INTEGER,activity_name varchar(25))CREATE TABLE Participates_in (stuid INTEGER,actid INTEGER)CREATE TABLE Faculty (FacID INTEGER,Lname VARCHAR(15),Fname VARCHAR(15),Rank VARCHAR(15),Sex VARCHAR(1),Phone INTEGER,Room VARCHAR(5)... | SELECT Rank, COUNT(Rank) FROM Faculty GROUP BY Rank |
what's the party with incumbent being herbert covington bonner | CREATE TABLE table_738 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text) | SELECT "Party" FROM table_738 WHERE "Incumbent" = 'Herbert Covington Bonner' |
What are the points for the GP3 series with 2 podiums? | CREATE TABLE table_32250 ("Season" real,"Series" text,"Team" text,"Races" text,"Wins" text,"Poles" text,"Podiums" text,"Points" text,"Final Placing" text) | SELECT "Points" FROM table_32250 WHERE "Series" = 'gp3 series' AND "Podiums" = '2' |
Which Venue has a Result of 5-1, and a Score of 3-0? | CREATE TABLE table_38734 ("Date" text,"Venue" text,"Score" text,"Result" text,"Competition" text) | SELECT "Venue" FROM table_38734 WHERE "Result" = '5-1' AND "Score" = '3-0' |
For each party, use a bar chart to show the number of its delegates, sort bars in asc order. | CREATE TABLE party (Party_ID int,Year real,Party text,Governor text,Lieutenant_Governor text,Comptroller text,Attorney_General text,US_Senate text)CREATE TABLE county (County_Id int,County_name text,Population real,Zip_code text)CREATE TABLE election (Election_ID int,Counties_Represented text,District int,Delegate text... | SELECT T2.Party, COUNT(T2.Party) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T2.Party ORDER BY T2.Party |
what is diagnoses short title and procedure short title of subject name lue white? | CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay ... | SELECT diagnoses.short_title, procedures.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Lue White" |
What are the names of actors, ordered alphabetically? | CREATE TABLE musical (musical_id number,name text,year number,award text,category text,nominee text,result text)CREATE TABLE actor (actor_id number,name text,musical_id number,character text,duration text,age number) | SELECT name FROM actor ORDER BY name |
calculate the total dose of pregestimil ng in patient 17398 on 08/21/2102. | CREATE TABLE outputevents (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,value number)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE d_items (row_id number,i... | SELECT SUM(inputevents_cv.amount) 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 = 17398)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... |
Who was the partner for the jazz piece in the bottom three? | CREATE TABLE table_name_40 (partner VARCHAR,style VARCHAR,results VARCHAR) | SELECT partner FROM table_name_40 WHERE style = "jazz" AND results = "bottom three" |
What unit has gen et sp nov as the novelty? | CREATE TABLE table_name_51 (unit VARCHAR,novelty VARCHAR) | SELECT unit FROM table_name_51 WHERE novelty = "gen et sp nov" |
how many patients whose language is *lit and lab test name is creatine kinase, mb isoenzyme? | 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 lab (subject_id text,hadm_id text,itemid text,charttime te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.language = "*LIT" AND lab.label = "Creatine Kinase, MB Isoenzyme" |
Can you tell me the sum of Draws that has the Against larger than 1106, and the Wins larger than 13? | CREATE TABLE table_name_44 (draws INTEGER,against VARCHAR,wins VARCHAR) | SELECT SUM(draws) FROM table_name_44 WHERE against > 1106 AND wins > 13 |
What is the average Total with a Gold that is larger than 4? | CREATE TABLE table_name_77 (total INTEGER,gold INTEGER) | SELECT AVG(total) FROM table_name_77 WHERE gold > 4 |
how many patients on continuous invasive mechanical ventilation for more than or equal to 96 consecutive hours had medicaid insurance? | 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 text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_flag... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.long_title = "Continuous invasive mechanical ventilation for 96 consecutive hours or more" |
tell me the difference between the total amount of input of patient 15447 on the current icu visit and the total amount of output of the patient? | 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 prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text... | SELECT (SELECT SUM(inputevents_cv.amount) 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 = 15447) AND icustays.outtime IS NULL)) - (SELECT SUM(outputevents.value) FROM outpu... |
What is the number of states that has some colleges whose enrollment is smaller than the average enrollment? | CREATE TABLE college (state VARCHAR,enr INTEGER) | SELECT COUNT(DISTINCT state) FROM college WHERE enr < (SELECT AVG(enr) FROM college) |
What's the platform of Super Mario All-Stars? | CREATE TABLE table_name_89 (platform VARCHAR,title VARCHAR) | SELECT platform FROM table_name_89 WHERE title = "super mario all-stars" |
how many patients whose procedure icd9 code is 3950? | 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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.icd9_code = "3950" |
Who was the lyricist for gopal krishna and co singer of solo? | CREATE TABLE table_347 ("Year" real,"Song name" text,"Film name" text,"Co-singer" text,"Music director" text,"Lyricist" text,"Language" text) | SELECT "Lyricist" FROM table_347 WHERE "Film name" = 'Gopal Krishna' AND "Co-singer" = 'Solo' |
count the number of patients who received a venous cath nec procedure two or more times since 2 years ago? | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid ... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'venous cath nec') AND... |
-- Top users from Gothenburg. | CREATE TABLE ReviewTaskStates (Id number,Name text,Description text)CREATE TABLE ReviewTaskTypes (Id number,Name text,Description text)CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE PostTy... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%gothenburg%' OR UPPER(Location) LIKE '%GOTHENBURG%' OR Location LIKE '%Gothenburg%' AND Reputation >= 1000 ORDER BY Reputation DESC |
Who is the player from Auburn? | CREATE TABLE table_57079 ("Player" text,"Nationality" text,"Position" text,"Years for Jazz" text,"School/Club Team" text) | SELECT "Player" FROM table_57079 WHERE "School/Club Team" = 'auburn' |
What day did Glentoran play at Windsor Park, Belfast? | CREATE TABLE table_name_34 (date VARCHAR,team VARCHAR,venue VARCHAR) | SELECT date FROM table_name_34 WHERE team = "glentoran" AND venue = "windsor park, belfast" |
What is the to par of the player from the United States with a place of t1 and a 76-68=144 score? | CREATE TABLE table_name_50 (to_par VARCHAR,country VARCHAR,place VARCHAR,score VARCHAR) | SELECT to_par FROM table_name_50 WHERE country = "united states" AND place = "t1" AND score = 76 - 68 = 144 |
What is the combined of Crowd when richmond played at home? | CREATE TABLE table_55411 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT COUNT("Crowd") FROM table_55411 WHERE "Home team" = 'richmond' |
what is the name of the drug prescribed for patient 030-52395 in the same hospital visit after they has been diagnosed with gi obstruction / ileus - gastric obstruction until 6 months ago? | CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number... | SELECT t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid =... |
What is the SZDSZ percentage with a Jobbik of 5% and a Fidesz of 68%? | CREATE TABLE table_35708 ("Source" text,"Date" text,"Fidesz" text,"MSZP" text,"SZDSZ" text,"Jobbik" text,"others" text) | SELECT "SZDSZ" FROM table_35708 WHERE "Jobbik" = '5%' AND "Fidesz" = '68%' |
Which teams had the 1st position and entered 1 race? | CREATE TABLE table_40246 ("Season" real,"Series" text,"Team" text,"Races" text,"Wins" text,"Poles" text,"F/Laps" text,"Podiums" text,"Points" text,"Position" text) | SELECT "Team" FROM table_40246 WHERE "Races" = '1' AND "Position" = '1st' |
since 5 years ago, what are the top three most frequent diagnoses patients were given in the same hospital encounter after receiving exc/dest hrt lesion open? | CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE outputevents (row_id 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,g... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_i... |
Questions with a particular tag. | CREATE TABLE PostTypes (Id number,Name text)CREATE TABLE Tags (Id number,TagName text,Count number,ExcerptPostId number,WikiPostId number)CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate... | SELECT p.Id AS "post_link", p.Tags FROM Posts AS p INNER JOIN PostTags AS pt ON p.Id = pt.PostId WHERE p.Id IN (SELECT p.Id 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 PostTypeId = 1 AND TagName = 'mythology') AND p.ClosedDate IS NULL GROUP BY p.Id, p.Tags... |
What is the total number of wins in 2010, when there were more than 14 matches? | CREATE TABLE table_43564 ("Year" text,"Matches" real,"Wins" real,"Losses" real,"No Result" real,"Win %" text) | SELECT COUNT("Wins") FROM table_43564 WHERE "Year" = '2010' AND "Matches" > '14' |
How many data was given the total electricity in GW-h if the renewable electricity w/o hydro (GW-h) is 3601? | CREATE TABLE table_27476 ("Rank" real,"Rank w/o Hydropower" real,"State" text,"% Renewable" text,"% Renewable w/o Hydro" text,"Renewable electricity (GW\u00b7h)" real,"Renewable electricity w/o Hydro (GW\u00b7h)" real,"Total electricity (GW\u00b7h)" real) | SELECT COUNT("Total electricity (GW\u00b7h)") FROM table_27476 WHERE "Renewable electricity w/o Hydro (GW\u00b7h)" = '3601' |
What is the lowest year when the city is casablanca? | CREATE TABLE table_name_80 (year INTEGER,city VARCHAR) | SELECT MIN(year) FROM table_name_80 WHERE city = "casablanca" |
How many points does the club with a try bonus of 10 have? | CREATE TABLE table_14070062_3 (points VARCHAR,try_bonus VARCHAR) | SELECT points FROM table_14070062_3 WHERE try_bonus = "10" |
When Centerfold model is on 3-04? | CREATE TABLE table_40538 ("Date" text,"Cover model" text,"Centerfold model" text,"Interview subject" text,"20 Questions" text) | SELECT "Centerfold model" FROM table_40538 WHERE "Date" = '3-04' |
what title had the longest run time ? | CREATE TABLE table_203_687 (id number,"#" number,"title" text,"time" text,"performer(s)" text,"songwriters" text,"producer(s)" text,"samples and notes" text) | SELECT "title" FROM table_203_687 ORDER BY "time" DESC LIMIT 1 |
history of extracorporeal membrane oxygenation ( ecmo ) cannulation. | CREATE TABLE table_train_72 ("id" int,"extracorporeal_membrane_oxygenation_ecmo_cannulation" bool,"heart_disease" bool,"meningitis_or_encephalitis" bool,"sepsis" bool,"cancer" bool,"prisoners" bool,"NOUSE" float) | SELECT * FROM table_train_72 WHERE extracorporeal_membrane_oxygenation_ecmo_cannulation = 1 |
what is diagnoses short title of subject id 2560? | 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 diagnoses.short_title FROM diagnoses WHERE diagnoses.subject_id = "2560" |
What is the average song rating for each language Plot them as bar chart, and show by the languages in desc. | CREATE TABLE files (f_id number(10),artist_name varchar2(50),file_size varchar2(20),duration varchar2(20),formats varchar2(20))CREATE TABLE song (song_name varchar2(50),artist_name varchar2(50),country varchar2(20),f_id number(10),genre_is varchar2(20),rating number(10),languages varchar2(20),releasedate Date,resolutio... | SELECT languages, AVG(rating) FROM song GROUP BY languages ORDER BY languages DESC |
Where was the FC match with a score of 12 played? | CREATE TABLE table_name_45 (location VARCHAR,fc_matches VARCHAR) | SELECT location FROM table_name_45 WHERE fc_matches = "12" |
For the Cage Combat Fighting Championships: Mayhem, what was the record? | CREATE TABLE table_66333 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Record" FROM table_66333 WHERE "Event" = 'cage combat fighting championships: mayhem' |
what was the first height of patient 9294 this month. | CREATE TABLE d_icd_diagnoses (row_id number,icd9_code text,short_title text,long_title text)CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spe... | SELECT chartevents.valuenum 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 = 9294)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit ht' ... |
What city was a visitor on the date of April 30? | CREATE TABLE table_53231 ("Date" text,"Visitor" text,"Score" text,"Home" text,"Record" text) | SELECT "Visitor" FROM table_53231 WHERE "Date" = 'april 30' |
when did patient 009-12985 the last time had urine catheter output until 2045 days ago? | CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,systemicdiastolic number,systemicmean number,observationtime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dos... | SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-12985')) AND intakeoutput.cellpath LIKE '%output%... |
Which 992 has a 1 2 of 1989 ? | CREATE TABLE table_36305 ("Tournament" text,"1988" text,"1989" text,"1990" text,"1991" text,"1992" text,"1993" text,"1994" text,"1995" text,"1996" text,"1997" text,"1998" text) | SELECT "1992" FROM table_36305 WHERE "1989" = '1–2' |
What are the names of shops in ascending order of open year? | CREATE TABLE stock (shop_id number,device_id number,quantity number)CREATE TABLE device (device_id number,device text,carrier text,package_version text,applications text,software_platform text)CREATE TABLE shop (shop_id number,shop_name text,location text,open_date text,open_year number) | SELECT shop_name FROM shop ORDER BY open_year |
Who was the rider for laps less than 23 with grid greater than 21 that had a time of +1 lap? | CREATE TABLE table_name_71 (rider VARCHAR,time_retired VARCHAR,laps VARCHAR,grid VARCHAR) | SELECT rider FROM table_name_71 WHERE laps < 23 AND grid > 21 AND time_retired = "+1 lap" |
Name the 2010 for 2008 of 1r and tournament of us open | CREATE TABLE table_name_33 (tournament VARCHAR) | SELECT 2010 FROM table_name_33 WHERE 2008 = "1r" AND 2011 = "1r" AND tournament = "us open" |
Who is the player that has scored more than 0 league cup goals, but has than 13 total goals, and 4 league cup appearances total? | CREATE TABLE table_59903 ("Name" text,"Position" text,"League Apps" text,"League Goals" real,"FA Cup Apps" text,"FA Cup Goals" real,"League Cup Apps" text,"League Cup Goals" real,"Total Apps" text,"Total Goals" real) | SELECT "Name" FROM table_59903 WHERE "League Cup Goals" > '0' AND "Total Goals" < '13' AND "League Cup Apps" = '4' |
For those employees whose first name is ending with the letter m, show the frequency of the first name using a bar chart, and rank total number in ascending order. | CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAIL varchar(25),PHONE_NUMBER varchar(20),HIRE_DATE date,JOB_ID varchar(10),SALARY decimal(8,2),COMMISSION_PCT decimal(2,2),MANAGER_ID decimal(6,0),DEPARTMENT_ID decimal(4,0))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0)... | SELECT FIRST_NAME, COUNT(FIRST_NAME) FROM employees WHERE FIRST_NAME LIKE '%m' GROUP BY FIRST_NAME ORDER BY COUNT(FIRST_NAME) |
count the number of patients whose primary disease is abdominal pain and admission year is less than 2173? | 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.diagnosis = "ABDOMINAL PAIN" AND demographic.admityear < "2173" |
What location was f bio maldonado the opponent at? | CREATE TABLE table_51813 ("Res." text,"Record" text,"Opponent" text,"Method" text,"Event" text,"Round" real,"Time" text,"Location" text) | SELECT "Location" FROM table_51813 WHERE "Opponent" = 'fábio maldonado' |
what is 2012-13 when 2011-12 is dnp and event is autumn gold? | CREATE TABLE table_45124 ("Event" text,"2006\u201307" text,"2009\u201310" text,"2010\u201311" text,"2011\u201312" text,"2012\u201313" text) | SELECT "2012\u201313" FROM table_45124 WHERE "2011\u201312" = 'dnp' AND "Event" = 'autumn gold' |
Who had the most points in the game on November 12? | CREATE TABLE table_46393 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text) | SELECT "High points" FROM table_46393 WHERE "Date" = 'november 12' |
What is the Catalog number of the CD Reissue Universal release? | CREATE TABLE table_name_79 (catalog VARCHAR,format VARCHAR,label VARCHAR) | SELECT catalog FROM table_name_79 WHERE format = "cd reissue" AND label = "universal" |
What is the least amount of points? | CREATE TABLE table_27539535_4 (points INTEGER) | SELECT MIN(points) FROM table_27539535_4 |
Show all dates of transactions whose type code is 'SALE', and count them by a bar chart | CREATE TABLE Transactions_Lots (transaction_id INTEGER,lot_id INTEGER)CREATE TABLE Ref_Transaction_Types (transaction_type_code VARCHAR(10),transaction_type_description VARCHAR(80))CREATE TABLE Lots (lot_id INTEGER,investor_id INTEGER,lot_details VARCHAR(255))CREATE TABLE Sales (sales_transaction_id INTEGER,sales_detai... | SELECT date_of_transaction, COUNT(date_of_transaction) FROM Transactions WHERE transaction_type_code = "SALE" |
Which time has eddie miller as opponent? | CREATE TABLE table_name_11 (time VARCHAR,opponent VARCHAR) | SELECT time FROM table_name_11 WHERE opponent = "eddie miller" |
How many laps were done in 2012? | CREATE TABLE table_name_26 (laps INTEGER,year VARCHAR) | SELECT SUM(laps) FROM table_name_26 WHERE year = 2012 |
who directed the most cartoons ? | CREATE TABLE table_201_39 (id number,"no" number,"title" text,"directed by" text,"released" number) | SELECT "directed by" FROM table_201_39 GROUP BY "directed by" ORDER BY COUNT(*) DESC LIMIT 1 |
What was the result when incumbent John R. Tyson was elected? | CREATE TABLE table_1342426_3 (result VARCHAR,incumbent VARCHAR) | SELECT result FROM table_1342426_3 WHERE incumbent = "John R. Tyson" |
On what date was the first match for the competition that ended its last match on December 16, 2007? | CREATE TABLE table_name_81 (first_match VARCHAR,last_match VARCHAR) | SELECT first_match FROM table_name_81 WHERE last_match = "december 16, 2007" |
What was the evening gown score for the one who had a preliminary average of 8.121 (8)? | CREATE TABLE table_20673 ("State" text,"Preliminary Average" text,"Interview" text,"Swimsuit" text,"Evening Gown" text,"Semifinal Average" text) | SELECT "Evening Gown" FROM table_20673 WHERE "Preliminary Average" = '8.121 (8)' |
What is the number Played that has 310 Points for? | CREATE TABLE table_name_77 (played VARCHAR,points_for VARCHAR) | SELECT played FROM table_name_77 WHERE points_for = "310" |
What's the 2007 result when the notional control is noc and the 2003 result is snp? | CREATE TABLE table_57332 ("Council" text,"2003 result" text,"Notional control (based on 2003 results)" text,"2007 result" text,"Details" text) | SELECT "2007 result" FROM table_57332 WHERE "Notional control (based on 2003 results)" = 'noc' AND "2003 result" = 'snp' |
What is the No. 8 of the person with a No. 4 of Noah? | CREATE TABLE table_49618 ("Region (year)" text,"No. 1" text,"No. 2" text,"No. 3" text,"No. 4" text,"No. 5" text,"No. 6" text,"No. 7" text,"No. 8" text,"No. 9" text,"No. 10" text) | SELECT "No. 8" FROM table_49618 WHERE "No. 4" = 'noah' |
What was the name of the song in Amma Cheppindi? | CREATE TABLE table_name_84 (song_title VARCHAR,movie VARCHAR) | SELECT song_title FROM table_name_84 WHERE movie = "amma cheppindi" |
What is the rank for 1961? | CREATE TABLE table_name_33 (rank VARCHAR,year VARCHAR) | SELECT rank FROM table_name_33 WHERE year = "1961" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.