instruction stringlengths 0 1.06k | input stringlengths 11 5.3k | response stringlengths 2 4.44k |
|---|---|---|
If the score is 62-70, what are the high points? | CREATE TABLE table_17118657_10 (high_points VARCHAR,score VARCHAR) | SELECT high_points FROM table_17118657_10 WHERE score = "62-70" |
what is hisor her total semifinal points to qualify for the 12th position ? | CREATE TABLE table_203_439 (id number,"pos." number,"rider" text,"semi-final points" number,"final points" number,"final heats" text,"total points" number) | SELECT "semi-final points" FROM table_203_439 WHERE "pos." = 12 |
how many patients whose age is less than 72 and drug name is sodium citrate 4%? | 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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "72" AND prescriptions.drug = "Sodium CITRATE 4%" |
how many countries took home the gold the same year they hosted fiba ? | CREATE TABLE table_204_360 (id number,"year" number,"host" text,"gold" text,"silver" text,"bronze" text) | SELECT COUNT(*) FROM table_204_360 WHERE "host" = "gold" |
Which school is the player who is headed to Duke from? | CREATE TABLE table_name_68 (school VARCHAR,college VARCHAR) | SELECT school FROM table_name_68 WHERE college = "duke" |
Which country is the player that went to Georgetown from? | CREATE TABLE table_15865 ("Player" text,"No." real,"Nationality" text,"Position" text,"Years in Toronto" text,"School/Club Team" text) | SELECT "Nationality" FROM table_15865 WHERE "School/Club Team" = 'Georgetown' |
Which upper level classes use projects rather than exams for evaluation ? | CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE course_prerequisite (... | SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.has_exams = 'N' AND course.has_projects = 'Y' AND program_course.category LIKE 'ULCS' |
What was the winning score in the mazda senior tournament players championship? | CREATE TABLE table_66972 ("Date" text,"Tournament" text,"Winning score" text,"Margin of victory" text,"Runner(s)-up" text) | SELECT "Winning score" FROM table_66972 WHERE "Tournament" = 'mazda senior tournament players championship' |
how many patients whose gender is f and lab test name is mcv? | CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethni... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.gender = "F" AND lab.label = "MCV" |
When Saginaw's fare is $470.47, what was the fare to Grand Rapids? | CREATE TABLE table_1637981_7 (grand_rapids__grr_ VARCHAR,saginaw__mbs_ VARCHAR) | SELECT grand_rapids__grr_ FROM table_1637981_7 WHERE saginaw__mbs_ = "$470.47" |
when last patient 021-25408 had a procedure since 2105? | CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid nu... | SELECT 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 = '021-25408')) AND STRFTIME('%y', treatment.treatmenttime) >= '2105... |
What line has Junction of Huntly NIMT | CREATE TABLE table_name_7 (line_name VARCHAR,nimt_junction VARCHAR) | SELECT line_name FROM table_name_7 WHERE nimt_junction = "huntly" |
mention the primary disease and diagnosis short title of the subject name betty campbell. | 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 demographic.diagnosis, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Betty Campbell" |
What is Player, when Previous Team (League) is 'Medicine Hat Tigers ( WHL )', and when Year is less than 2002? | CREATE TABLE table_name_90 (player VARCHAR,previous_team__league_ VARCHAR,year VARCHAR) | SELECT player FROM table_name_90 WHERE previous_team__league_ = "medicine hat tigers ( whl )" AND year < 2002 |
What is the Austin record of Kansas State? | CREATE TABLE table_name_21 (at_austin VARCHAR,texas_vs VARCHAR) | SELECT at_austin FROM table_name_21 WHERE texas_vs = "kansas state" |
What is the date of the performance with the highest number of attendees? | CREATE TABLE performance (Date VARCHAR,Attendance VARCHAR) | SELECT Date FROM performance ORDER BY Attendance DESC LIMIT 1 |
what did patient 31854 last have as an intake today? | CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE inputevents_cv (row_id number,subject_id number,hadm_id number,icustay_id number,charttime time,itemid number,amount number)CREATE TABLE admissions (row_id number,subject_id number,... | SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT inputevents_cv.itemid 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 = 31854)) AND DATETIME(inputevents_cv.... |
tell me the first glucose in patient 55247 until 62 months ago? | CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id nu... | SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 55247) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'glucose') AND DATETIME(labevents.charttime) <= DATETIME(CURRENT_TIME(), '-62 mon... |
Can I take the 314 course next term ? | CREATE TABLE program_course (program_id int,course_id int,workload int,category varchar)CREATE TABLE course_tags_count (course_id int,clear_grading int,pop_quiz int,group_projects int,inspirational int,long_lectures int,extra_credit int,few_tests int,good_feedback int,tough_tests int,heavy_papers int,cares_for_students... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 314 AND semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016 |
List of Users in a given location. This query lists all users in a given location sorted by reputation. | CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE ReviewTas... | SELECT * FROM Users WHERE Location LIKE '%##location##%' ORDER BY CreationDate |
Find the parties associated with the delegates from district 1 or 2 Who served as comptrollers of the parties, and count them by a bar chart, and rank the number of comptroller from low to high 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 Comptroller, COUNT(Comptroller) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 OR T1.District = 2 GROUP BY Comptroller ORDER BY COUNT(Comptroller) |
How many times was the episode named 'conference call'? | CREATE TABLE table_16580 ("#" real,"Episode" text,"Rating" text,"Share" real,"Rating/Share (18-49)" text,"Viewers (millions)" text,"Rank (timeslot)" real,"Rank (night)" real,"Rank (week)" text) | SELECT COUNT("#") FROM table_16580 WHERE "Episode" = 'Conference Call' |
Users created each year. | CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,... | SELECT Users.DisplayName, Users.Reputation, Users.Location, Badges.Name FROM Users INNER JOIN Badges ON Users.Id = Badges.UserId WHERE Users.Reputation = (SELECT MAX(Reputation) FROM Users WHERE Location = 'South Africa' AND Badges.Name = 'Enlightened' AND YEAR(Badges.Date) = 2016) |
name the country that had the same number of bronze medals as russia . | CREATE TABLE table_204_703 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number) | SELECT "nation" FROM table_204_703 WHERE "nation" <> 'russia' AND "bronze" = (SELECT "bronze" FROM table_204_703 WHERE "nation" = 'russia') |
how many employees does mundelein high school have ? | CREATE TABLE table_203_737 (id number,"#" number,"employer" text,"# of employees" number) | SELECT "# of employees" FROM table_203_737 WHERE "employer" = 'mundelein high school' |
Name the report for raymond sommer | CREATE TABLE table_31991 ("Name" text,"Circuit" text,"Date" text,"Winning driver" text,"Winning constructor" text,"Report" text) | SELECT "Report" FROM table_31991 WHERE "Winning driver" = 'raymond sommer' |
What teams did the player vadim sharifijanov play for? | CREATE TABLE table_1013129_1 (college_junior_club_team VARCHAR,player VARCHAR) | SELECT college_junior_club_team FROM table_1013129_1 WHERE player = "Vadim Sharifijanov" |
what is admission time and diagnoses short title of subject name josette orr? | CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob... | SELECT demographic.admittime, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.name = "Josette Orr" |
how many patients who stayed in hospital for more than 29 days had nu roue of drug administration? | 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 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 > "29" AND prescriptions.route = "NU" |
How many viewers in millions were there for episode 4 of this season? | CREATE TABLE table_27969432_4 (us_viewers__in_millions_ VARCHAR,no_in_season VARCHAR) | SELECT COUNT(us_viewers__in_millions_) FROM table_27969432_4 WHERE no_in_season = 4 |
What is Team, when Game is 77? | CREATE TABLE table_76739 ("Game" real,"Date" text,"Team" text,"Score" text,"Record" text,"Streak" text) | SELECT "Team" FROM table_76739 WHERE "Game" = '77' |
Showing posts that contain apt-cache in the body. | CREATE TABLE Posts (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Tags text,Ans... | SELECT Id AS "post_link", CreationDate FROM Posts WHERE Body LIKE '%apt-cache%' ORDER BY CreationDate DESC |
When did chang myon ( ) leave office? | CREATE TABLE table_name_96 (left_office VARCHAR,romanized__hangul_ VARCHAR) | SELECT left_office FROM table_name_96 WHERE romanized__hangul_ = "chang myon (장면)" |
Show me about the distribution of Time and ID in a bar chart, could you sort y-axis in desc order? | CREATE TABLE record (ID int,Result text,Swimmer_ID int,Event_ID int)CREATE TABLE stadium (ID int,name text,Capacity int,City text,Country text,Opening_year int)CREATE TABLE event (ID int,Name text,Stadium_ID int,Year text)CREATE TABLE swimmer (ID int,name text,Nationality text,meter_100 real,meter_200 text,meter_300 te... | SELECT Time, ID FROM swimmer ORDER BY ID DESC |
What is the remelting temperature for the alloy that has a Sn/Sb ratio of 9.5/15? | CREATE TABLE table_name_51 (remelting_at__°c_ VARCHAR,sn_sb___percentage_ VARCHAR) | SELECT remelting_at__°c_ FROM table_name_51 WHERE sn_sb___percentage_ = "9.5/15" |
How many hometowns are there when Charis Prep was the previous school? | CREATE TABLE table_29970488_2 (hometown VARCHAR,previous_school VARCHAR) | SELECT COUNT(hometown) FROM table_29970488_2 WHERE previous_school = "Charis Prep" |
What is Position, when Round is less than 5, when Nationality is 'Canada', and when College/Junior/Club Team (League) is 'Saint John Sea Dogs ( QMJHL )'? | CREATE TABLE table_name_30 (position VARCHAR,college_junior_club_team__league_ VARCHAR,round VARCHAR,nationality VARCHAR) | SELECT position FROM table_name_30 WHERE round < 5 AND nationality = "canada" AND college_junior_club_team__league_ = "saint john sea dogs ( qmjhl )" |
What was the away team's score of at the game of telstra stadium? | CREATE TABLE table_20757 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Ground" text,"Crowd" real,"Date" text) | SELECT "Away team score" FROM table_20757 WHERE "Ground" = 'Telstra Stadium' |
how many of the asian patients had unspecified neutropenia? | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "ASIAN" AND diagnoses.long_title = "Neutropenia, unspecified" |
Name the Valley Vista of Anthony Capuano | CREATE TABLE table_183 ("Information" text,"Dysart" text,"Shadow Ridge" text,"Valley Vista" text,"Willow Canyon" text) | SELECT "Valley Vista" FROM table_183 WHERE "Willow Canyon" = 'Anthony Capuano' |
In what Year was the 32nd Ceremony with winner William A. Horning in the Film North by Northwest? | CREATE TABLE table_13677 ("Name" text,"Ceremony" text,"Year" text,"Academy Award" text,"Film" text) | SELECT "Year" FROM table_13677 WHERE "Ceremony" = '32nd' AND "Name" = 'william a. horning' AND "Film" = 'north by northwest' |
What is the highest Money ( $ ), when Score is '69-71-70-74=284'? | CREATE TABLE table_name_65 (money___ INTEGER,score VARCHAR) | SELECT MAX(money___) AS $__ FROM table_name_65 WHERE score = 69 - 71 - 70 - 74 = 284 |
What's the lowest gold with a total of 4 and less than 2 silver for liechtenstein? | CREATE TABLE table_55405 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT MIN("Gold") FROM table_55405 WHERE "Total" = '4' AND "Nation" = 'liechtenstein' AND "Silver" < '2' |
Which best 3-year period has a best 15-year period of smyslov; kasparov, and a Position of 5? | CREATE TABLE table_45644 ("Position" real,"best year" text,"best 2-year period" text,"best 3-year period" text,"best 5-year period" text,"best 10-year period" text,"best 15-year period" text) | SELECT "best 3-year period" FROM table_45644 WHERE "best 15-year period" = 'smyslov; kasparov' AND "Position" = '5' |
what was the first time patient 73913 had been tested for lab tests? | CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE d_items (row_id number,itemid number,label text,linksto text)CREATE TABLE cost (row_id number,subject_id number,hadm_id number,event_type text,event_id number,chargetime time,cost number)CREATE TABLE diagnoses_icd (row_id number,subject_id num... | SELECT labevents.charttime FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 73913) ORDER BY labevents.charttime LIMIT 1 |
what is the number of patients whose ethnicity is white and drug name is metolazone? | 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 = "WHITE" AND prescriptions.drug = "Metolazone" |
What field had results of w 18-12? | CREATE TABLE table_61004 ("Date" text,"Opponent" text,"Home/Away" text,"Field" text,"Result" text) | SELECT "Field" FROM table_61004 WHERE "Result" = 'w 18-12' |
how many seasons were finished in 3rd place ? | CREATE TABLE table_204_79 (id number,"season" text,"tier" number,"division" text,"place" text) | SELECT COUNT("season") FROM table_204_79 WHERE "place" = 3 |
Top 50 users from Bangladesh. | CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE SuggestedEdits (Id number,PostId number,CreationDate time,ApprovalDate time,RejectionDate time,OwnerUserId number,Comment text,Text text,Title text,... | SELECT Id, DisplayName, Reputation, WebsiteUrl, Location FROM Users WHERE Location LIKE '%Bangladesh%' ORDER BY Reputation DESC LIMIT 150 |
what is the rank when the bronze is less than 0? | CREATE TABLE table_56922 ("Rank" real,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT COUNT("Rank") FROM table_56922 WHERE "Bronze" < '0' |
the number of religious groups with a sex ratio of more than 1000 is how many ? | CREATE TABLE table_203_90 (id number,"religious\ngroup" text,"population\n%" text,"growth\n(1991-2001)" text,"sex ratio\n(total)" number,"literacy\n(%)" text,"work participation\n(%)" text,"sex ratio\n(rural)" number,"sex ratio\n(urban)" number,"sex ratio\n(child)" number) | SELECT COUNT("religious\ngroup") FROM table_203_90 WHERE "sex ratio\n(total)" > 1000 |
When was the date successor seated when the vacator was charles e. chamberlain (r)? | CREATE TABLE table_72174 ("District" text,"Vacator" text,"Reason for change" text,"Successor" text,"Date successor seated" text) | SELECT "Date successor seated" FROM table_72174 WHERE "Vacator" = 'Charles E. Chamberlain (R)' |
What player is picked before 2? | CREATE TABLE table_name_94 (player VARCHAR,pick__number INTEGER) | SELECT player FROM table_name_94 WHERE pick__number < 2 |
What date was the attendance 22000? | CREATE TABLE table_2015453_1 (date VARCHAR,attendance VARCHAR) | SELECT date FROM table_2015453_1 WHERE attendance = 22000 |
Name the total number of 1stm when 2nd m is 125.5 | CREATE TABLE table_19320 ("Rank" real,"Name" text,"Nationality" text,"1st (m)" text,"2nd (m)" text,"Points" text,"Overall NT points" text,"Overall WC points (Rank)" text) | SELECT COUNT("1st (m)") FROM table_19320 WHERE "2nd (m)" = '125.5' |
A bar chart shows the distribution of date_address_from and the sum of monthly_rental bin date_address_from by weekday. | CREATE TABLE Ref_Address_Types (address_type_code VARCHAR(15),address_type_description VARCHAR(80))CREATE TABLE Students_in_Detention (student_id INTEGER,detention_id INTEGER,incident_id INTEGER)CREATE TABLE Student_Addresses (student_id INTEGER,address_id INTEGER,date_address_from DATETIME,date_address_to DATETIME,mon... | SELECT date_address_from, SUM(monthly_rental) FROM Student_Addresses ORDER BY monthly_rental DESC |
how many games were not played at araneta coliseum ? | CREATE TABLE table_204_627 (id number,"date" text,"opponent" text,"score" text,"top scorer (total points)" text,"venue (location)" text) | SELECT COUNT(*) FROM table_204_627 WHERE "venue (location)" <> 'araneta coliseum' |
What was the win loss record the lady who appeard in 1969? | CREATE TABLE table_28138 ("Player" text,"Nationality" text,"Finals" real,"Win-Loss" text,"Year(s)" text) | SELECT "Win-Loss" FROM table_28138 WHERE "Year(s)" = '1969' |
in the milwaukee team who made the high points | CREATE TABLE table_30049462_3 (high_points VARCHAR,team VARCHAR) | SELECT high_points FROM table_30049462_3 WHERE team = "Milwaukee" |
Tell me the distribution of the number of trains at each arrival time with a bar chart, could you display in descending by the x axis? | CREATE TABLE railway (Railway_ID int,Railway text,Builder text,Built text,Wheels text,Location text,ObjectNumber text)CREATE TABLE railway_manage (Railway_ID int,Manager_ID int,From_Year text)CREATE TABLE manager (Manager_ID int,Name text,Country text,Working_year_starts text,Age int,Level int)CREATE TABLE train (Train... | SELECT Arrival, COUNT(Arrival) FROM train GROUP BY Arrival ORDER BY Arrival DESC |
Name the date of report for tier 1 ratio being 3.9% | CREATE TABLE table_24963 ("Institution" text,"Date of report" text,"s Risk-weighted asset,\u20ac million" real,"Tier 1 Capital,\u20ac million" real,"Tier 1 ratio" text) | SELECT "Date of report" FROM table_24963 WHERE "Tier 1 ratio" = '3.9%' |
Number of posts for users last seen X months ago. | 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 Months AS "Months since user last seen", Posts AS "Posts at exactly", SUM(Posts) OVER (ORDER BY Months DESC) AS "Posts at or before" FROM (SELECT DATEDIFF(mm, Users.LastAccessDate, GETDATE()) AS "Months", COUNT(*) AS "Posts" FROM Users INNER JOIN Posts ON Posts.OwnerUserId = Users.Id GROUP BY DATEDIFF(mm, Users.... |
what is age and religion of subject id 17519? | CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,language text,religion text,admission_type text,days_stay text,insurance text,ethnicity text,expire_fla... | SELECT demographic.age, demographic.religion FROM demographic WHERE demographic.subject_id = "17519" |
What is Time, when Composer(s) is 'Kyriakos Papadopoulos'? | CREATE TABLE table_60619 ("English translation" text,"Original album" text,"Lyricist(s)" text,"Composer(s)" text,"Time" text) | SELECT "Time" FROM table_60619 WHERE "Composer(s)" = 'kyriakos papadopoulos' |
What is the 1991 when 1997 is 18? | CREATE TABLE table_name_26 (Id VARCHAR) | SELECT 1991 FROM table_name_26 WHERE 1997 = "18" |
What was the score June 22? | CREATE TABLE table_name_82 (loss VARCHAR,date VARCHAR) | SELECT loss FROM table_name_82 WHERE date = "june 22" |
Show the most frequently used carrier of the phones. | CREATE TABLE market (market_id number,district text,num_of_employees number,num_of_shops number,ranking number)CREATE TABLE phone_market (market_id number,phone_id text,num_of_stock number)CREATE TABLE phone (name text,phone_id number,memory_in_g number,carrier text,price number) | SELECT carrier FROM phone GROUP BY carrier ORDER BY COUNT(*) DESC LIMIT 1 |
What episode number in the series is 'guitar'? | CREATE TABLE table_26899 ("No. in series" real,"No. in season" real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" real) | SELECT MIN("No. in series") FROM table_26899 WHERE "Title" = 'Guitar' |
Which school has more than 3 rounds with jason odom? | CREATE TABLE table_name_71 (school VARCHAR,round VARCHAR,player VARCHAR) | SELECT school FROM table_name_71 WHERE round > 3 AND player = "jason odom" |
what is the most recent year for a ligier gitanes blondes | CREATE TABLE table_56372 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Pts." real) | SELECT MAX("Year") FROM table_56372 WHERE "Entrant" = 'ligier gitanes blondes' |
Can you draw the trend of avg(attendance) over the year? and display in ascending order by the year. | CREATE TABLE appearances (year INTEGER,team_id TEXT,league_id TEXT,player_id TEXT,g_all NUMERIC,gs NUMERIC,g_batting INTEGER,g_defense NUMERIC,g_p INTEGER,g_c INTEGER,g_1b INTEGER,g_2b INTEGER,g_3b INTEGER,g_ss INTEGER,g_lf INTEGER,g_cf INTEGER,g_rf INTEGER,g_of INTEGER,g_dh NUMERIC,g_ph NUMERIC,g_pr NUMERIC)CREATE TAB... | SELECT year, AVG(attendance) FROM home_game ORDER BY year |
I want to see trend of how many receipt date by receipt date, and order by the X in desc please. | CREATE TABLE Employees (employee_id INTEGER,role_code CHAR(15),employee_name VARCHAR(255),other_details VARCHAR(255))CREATE TABLE Documents_Mailed (document_id INTEGER,mailed_to_address_id INTEGER,mailing_date DATETIME)CREATE TABLE Draft_Copies (document_id INTEGER,draft_number INTEGER,copy_number INTEGER)CREATE TABLE ... | SELECT receipt_date, COUNT(receipt_date) FROM Documents ORDER BY receipt_date DESC |
What did the tournament with a QF in 1969 get in 1956-1968? | CREATE TABLE table_name_31 (Id VARCHAR) | SELECT 1956 AS _1968 FROM table_name_31 WHERE 1969 = "qf" |
What is the 2012 value with 1r in 2011, 2007 of A, 2010 of 1r, and 2009 of A? | CREATE TABLE table_11461 ("Tournament" text,"2006" text,"2007" text,"2008" text,"2009" text,"2010" text,"2011" text,"2012" text) | SELECT "2012" FROM table_11461 WHERE "2011" = '1r' AND "2007" = 'a' AND "2010" = '1r' AND "2009" = 'a' |
What is the away side score when hawthorn is the home side? | CREATE TABLE table_52116 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text) | SELECT "Away team score" FROM table_52116 WHERE "Home team" = 'hawthorn' |
How many millions of people viewed 'Father's Day'? | CREATE TABLE table_73451 ("No." real,"Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Production code" text,"Viewers (in millions)" text) | SELECT "Viewers (in millions)" FROM table_73451 WHERE "Title" = 'Father''s Day' |
What is the tie with a win of 0? | CREATE TABLE table_name_38 (ties VARCHAR,wins VARCHAR) | SELECT ties FROM table_name_38 WHERE wins = "0" |
Who owns CKSB-8-FM? | CREATE TABLE table_66603 ("Frequency" text,"Call sign" text,"Branding" text,"Format" text,"Owner" text) | SELECT "Owner" FROM table_66603 WHERE "Call sign" = 'cksb-8-fm' |
[draft] Top users by Tag. | CREATE TABLE PostTypes (Id number,Name 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,EmailHash text,AccountId number)CREATE TABLE PostTags (PostId nu... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", u.Id AS "user_link", u.Reputation, COUNT(p.Id) FROM Users AS u INNER JOIN Posts AS p ON p.OwnerUserId = u.Id INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = '##tagname##' GROUP BY u.Reputation, u.Id ORDER... |
What is the date of successors formal installation when the reason for change is resigned december 4, 1819? | CREATE TABLE table_25071 ("State (class)" text,"Vacator" text,"Reason for change" text,"Successor" text,"Date of successors formal installation" text) | SELECT "Date of successors formal installation" FROM table_25071 WHERE "Reason for change" = 'Resigned December 4, 1819' |
What is the latest Year, when the Venue is L bker Golf Resort? | CREATE TABLE table_14572 ("Year" real,"Venue" text,"Winner" text,"Country" text,"Score" text) | SELECT MAX("Year") FROM table_14572 WHERE "Venue" = 'lübker golf resort' |
Who was the successor for the reason for change being 'died January 16, 1944? | CREATE TABLE table_2159537_3 (successor VARCHAR,reason_for_change VARCHAR) | SELECT successor FROM table_2159537_3 WHERE reason_for_change = "Died January 16, 1944" |
what is primary disease and discharge time of subject id 71798? | 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 diagnoses (subject_id text,hadm_id text,icd9_code text,sho... | SELECT demographic.diagnosis, demographic.dischtime FROM demographic WHERE demographic.subject_id = "71798" |
What is Electorate, when Party is 'Country', when State is 'WA', and when Member is 'John Hallett'? | CREATE TABLE table_48202 ("Member" text,"Party" text,"Electorate" text,"State" text,"Term of office" text) | SELECT "Electorate" FROM table_48202 WHERE "Party" = 'country' AND "State" = 'wa' AND "Member" = 'john hallett' |
What is the total when the finish was t44? | CREATE TABLE table_59377 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" real,"Finish" text) | SELECT "Total" FROM table_59377 WHERE "Finish" = 't44' |
how many patients are primarily suffering from brain mass; intracranial hemorrhage and their lab test fluid is urine? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" AND lab.fluid = "Urine" |
Where was the game in which Will Bynum (5) did the high assists played? | CREATE TABLE table_29926 ("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_29926 WHERE "High assists" = 'Will Bynum (5)' |
For all employees who have the letters D or S in their first name, visualize a bar chart about the distribution of hire_date and the average of salary bin hire_date by weekday. | CREATE TABLE countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE regions (REGION_ID decimal(5,0),REGION_NAME varchar(25))CREATE TABLE jobs (JOB_ID varchar(10),JOB_TITLE varchar(35),MIN_SALARY decimal(6,0),MAX_SALARY decimal(6,0))CREATE TABLE locations (LOCATION_ID decimal(4,0)... | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' |
What is the highest Bush#, when Others% is '1.7%', when Others# is less than 75, and when Kerry# is greater than 1,524? | CREATE TABLE table_name_85 (bush_number INTEGER,kerry_number VARCHAR,others_percentage VARCHAR,others_number VARCHAR) | SELECT MAX(bush_number) FROM table_name_85 WHERE others_percentage = "1.7%" AND others_number < 75 AND kerry_number > 1 OFFSET 524 |
How many total silvers does Russia have? | CREATE TABLE table_76372 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real) | SELECT COUNT("Silver") FROM table_76372 WHERE "Nation" = 'russia' |
What team's manager was replaced by Ercan Ertem z? | CREATE TABLE table_27091128_2 (team VARCHAR,replaced_by VARCHAR) | SELECT team FROM table_27091128_2 WHERE replaced_by = "Ercan Ertemçöz" |
If the title is Paradox Lost and the reader is Briggs, Nicholas Nicholas Briggs, what are all of the notes? | CREATE TABLE table_20174050_7 (notes VARCHAR,reader VARCHAR,title VARCHAR) | SELECT notes FROM table_20174050_7 WHERE reader = "Briggs, Nicholas Nicholas Briggs" AND title = "Paradox Lost" |
what is the number of patients whose primary disease is left colon cancer and lab test fluid is urine? | 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "LEFT COLON CANCER" AND lab.fluid = "Urine" |
count the number of patients whose admission year is less than 2197 and lab test fluid is blood? | 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 procedures (subject_id text,hadm_id text,icd9_code text,sho... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2197" AND lab.fluid = "Blood" |
what is the number of patients whose discharge location is disch-tran to psych hosp and diagnoses long title is dehydration? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "DISCH-TRAN TO PSYCH HOSP" AND diagnoses.long_title = "Dehydration" |
Name the men doubles for caroline persyn smids | CREATE TABLE table_14903355_2 (men_doubles VARCHAR,womens_doubles VARCHAR) | SELECT men_doubles FROM table_14903355_2 WHERE womens_doubles = "Caroline Persyn Smids" |
What is the Winning team on january 28, 2006? | CREATE TABLE table_35641 ("Date" text,"Site" text,"Sport" text,"Winning team" text,"Series" text) | SELECT "Winning team" FROM table_35641 WHERE "Date" = 'january 28, 2006' |
What was the region of the release from May 27, 2009? | CREATE TABLE table_80341 ("Region" text,"Date" text,"Label" text,"Format" text,"Catalog" text) | SELECT "Region" FROM table_80341 WHERE "Date" = 'may 27, 2009' |
what is the number of patients whose diagnoses short title is retain plastic fragments? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Retain plastic fragments" |
how many christian scientist patients were aged below 54 years? | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.religion = "CHRISTIAN SCIENTIST" AND demographic.age < "54" |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.