instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What is the name of the player that lost more than 4?
CREATE TABLE table_8529 ("Position" real,"Name" text,"Played" real,"Drawn" real,"Lost" real,"Points" real)
SELECT "Name" FROM table_8529 WHERE "Lost" > '4'
which team won more matches , finland or norway ?
CREATE TABLE table_203_486 (id number,"place" number,"team" text,"matches" number,"won" number,"drawn" number,"lost" number,"difference" text,"points" number)
SELECT "team" FROM table_203_486 WHERE "team" IN ('finland', 'norway') ORDER BY "won" DESC LIMIT 1
college attended of previous pick to bob anderegg
CREATE TABLE table_204_93 (id number,"round" number,"pick" number,"player" text,"position" text,"nationality" text,"team" text,"college" text)
SELECT "college" FROM table_204_93 WHERE "pick" = (SELECT "pick" FROM table_204_93 WHERE "player" = 'bob anderegg') - 1
What club team is Per Gustafsson play for?
CREATE TABLE table_15956 ("Pick" real,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text)
SELECT "College/junior/club team" FROM table_15956 WHERE "Player" = 'Per Gustafsson'
who was the last team to win the world cup ?
CREATE TABLE table_204_543 (id number,"national team" text,"title(s)\nrepresented" text,"first\nworn" number,"number\nof stars" number,"notes" text)
SELECT "national team" FROM table_204_543 WHERE "title(s)\nrepresented" = 'world cup' ORDER BY "first\nworn" DESC LIMIT 1
Questions containing the given tag - only ids.
CREATE TABLE ReviewRejectionReasons (Id number,Name text,Description text,PostTypeId number)CREATE TABLE VoteTypes (Id number,Name text)CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,E...
SELECT q.Id AS "post_link" FROM Posts AS q INNER JOIN PostTags AS pt ON q.Id = pt.PostId INNER JOIN Tags AS t ON t.Id = pt.TagId WHERE t.TagName = '##tagName:string?geometry##' ORDER BY q.CreationDate DESC
Name the episodes when region 1 is september 19, 2006
CREATE TABLE table_14562722_2 (episodes VARCHAR,region_1 VARCHAR)
SELECT episodes FROM table_14562722_2 WHERE region_1 = "September 19, 2006"
Show me a bar chart for what are the nationalities and total ages of journalists?, and list Y-axis in descending order.
CREATE TABLE news_report (journalist_ID int,Event_ID int,Work_Type text)CREATE TABLE event (Event_ID int,Date text,Venue text,Name text,Event_Attendance int)CREATE TABLE journalist (journalist_ID int,Name text,Nationality text,Age text,Years_working int)
SELECT Nationality, SUM(Age) FROM journalist GROUP BY Nationality ORDER BY SUM(Age) DESC
what's the numer of jamaicans granted british citizenship with naturalisation by residence being 927
CREATE TABLE table_11214212_1 (numer_of_jamaicans_granted_british_citizenship VARCHAR,naturalisation_by_residence VARCHAR)
SELECT numer_of_jamaicans_granted_british_citizenship FROM table_11214212_1 WHERE naturalisation_by_residence = 927
Name the junes
CREATE TABLE table_1539201_1 (june VARCHAR)
SELECT june FROM table_1539201_1
In 549 , is there a lab ?
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 int,heavy_assignments int,respected int,participation int,heavy_reading int,tough_grade...
SELECT COUNT(*) > 0 FROM course WHERE department = 'EECS' AND has_lab = 'Y' AND number = 549
List the name for storms and the number of affected regions for each storm with a bar chart, and could you sort bar in descending order?
CREATE TABLE affected_region (Region_id int,Storm_ID int,Number_city_affected real)CREATE TABLE region (Region_id int,Region_code text,Region_name text)CREATE TABLE storm (Storm_ID int,Name text,Dates_active text,Max_speed int,Damage_millions_USD real,Number_Deaths int)
SELECT Name, COUNT(*) FROM storm AS T1 JOIN affected_region AS T2 ON T1.Storm_ID = T2.Storm_ID GROUP BY T1.Storm_ID ORDER BY Name DESC
What percentage of the votes in Copiah did McCain get?
CREATE TABLE table_23940 ("County" text,"Obama%" text,"Obama#" real,"McCain%" text,"McCain#" real)
SELECT "McCain%" FROM table_23940 WHERE "County" = 'Copiah'
Draw a scatter chart about the correlation between Team_ID and School_ID , and group by attribute ACC_Home.
CREATE TABLE basketball_match (Team_ID int,School_ID int,Team_Name text,ACC_Regular_Season text,ACC_Percent text,ACC_Home text,ACC_Road text,All_Games text,All_Games_Percent int,All_Home text,All_Road text,All_Neutral text)CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,En...
SELECT Team_ID, School_ID FROM basketball_match GROUP BY ACC_Home
Tag wikis with internal chat.stackoverflow.com/rooms links.
CREATE TABLE PostsWithDeleted (Id number,PostTypeId number,AcceptedAnswerId number,ParentId number,CreationDate time,DeletionDate time,Score number,ViewCount number,Body text,OwnerUserId number,OwnerDisplayName text,LastEditorUserId number,LastEditorDisplayName text,LastEditDate time,LastActivityDate time,Title text,Ta...
SELECT DISTINCT Tags.Id, Tags.TagName, 'site://tags/' + Tags.TagName + '/info|Url' AS Url, LENGTH(Posts.Body) FROM Tags LEFT JOIN Posts ON Posts.Id = Tags.WikiPostId OR Posts.Id = Tags.ExcerptPostId WHERE (LOWER(Posts.Body) LIKE '%chat.stackoverflow.com/rooms%') ORDER BY Tags.Id
What country does the goaltender come from?
CREATE TABLE table_1213511_6 (nationality VARCHAR,position VARCHAR)
SELECT nationality FROM table_1213511_6 WHERE position = "Goaltender"
has patient 5310 been administered any d10w during the last month?
CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE admissions (row_id number,subject_id number,hadm_id number,admittime time,dischtime time,admission_type text,admission_location text,discharge_location text,insurance text,language text,marital_status text,ethnicity text,age number)CREATE TABL...
SELECT COUNT(*) > 0 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 = 5310)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'd10w' AND...
how many patients whose diagnoses short title is ac posthemorrhag anemia and lab test fluid is joint fluid?
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Ac posthemorrhag anemia" AND lab.fluid = "Joint Fluid"
Show the smallest enrollment of each state using a bar chart, order in ascending by the X-axis.
CREATE TABLE Tryout (pID numeric(5,0),cName varchar(20),pPos varchar(8),decision varchar(3))CREATE TABLE Player (pID numeric(5,0),pName varchar(20),yCard varchar(3),HS numeric(5,0))CREATE TABLE College (cName varchar(20),state varchar(2),enr numeric(5,0))
SELECT state, MIN(enr) FROM College GROUP BY state ORDER BY state
Who were the comedians on episode 1x03?
CREATE TABLE table_23122988_1 (comedians VARCHAR,episode VARCHAR)
SELECT comedians FROM table_23122988_1 WHERE episode = "1x03"
What is the rank of Etihad Tower 5, with less than 62 floors?
CREATE TABLE table_name_90 (rank INTEGER,floors VARCHAR,name VARCHAR)
SELECT MIN(rank) FROM table_name_90 WHERE floors < 62 AND name = "etihad tower 5"
What is the sum of Year, when Opponent is #3 UCONN?
CREATE TABLE table_name_40 (year INTEGER,opponent VARCHAR)
SELECT SUM(year) FROM table_name_40 WHERE opponent = "#3 uconn"
what is the barony and an area of 560?
CREATE TABLE table_31502 ("Townland" text,"Area(acres)" real,"Barony" text,"Civil parish" text,"Poor law union" text)
SELECT "Barony" FROM table_31502 WHERE "Area( acres )" = '560'
How many players are from each country Visualize by bar chart, list bar in asc order.
CREATE TABLE player (Player_ID int,Player text,Years_Played text,Total_WL text,Singles_WL text,Doubles_WL text,Team int)CREATE TABLE team (Team_id int,Name text)CREATE TABLE match_season (Season real,Player text,Position text,Country int,Team int,Draft_Pick_Number int,Draft_Class text,College text)CREATE TABLE country ...
SELECT Country_name, COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id = T2.Country GROUP BY T1.Country_name ORDER BY Country_name
What state has a swimsuit less than 9.277, gown more than 8.944 and preliminary greater than 8.483?
CREATE TABLE table_48904 ("State" text,"Preliminary" real,"Interview" real,"Swimsuit" real,"Evening Gown" real,"Average" real)
SELECT "State" FROM table_48904 WHERE "Swimsuit" < '9.277' AND "Evening Gown" > '8.944' AND "Preliminary" < '8.483'
What is the lowest number of Gold, when the number of Bronze is less than 36, when the Rank is 2, and when Silver is less than 37?
CREATE TABLE table_45291 ("Rank" text,"Nation" text,"Gold" real,"Silver" real,"Bronze" real,"Total" real)
SELECT MIN("Gold") FROM table_45291 WHERE "Bronze" < '36' AND "Rank" = '2' AND "Silver" < '37'
What tournament was played 16 September 2012?
CREATE TABLE table_name_63 (tournament VARCHAR,date VARCHAR)
SELECT tournament FROM table_name_63 WHERE date = "16 september 2012"
What are the number of the dates of the assessment notes?, list y-axis in asc order.
CREATE TABLE Behavior_Incident (incident_id INTEGER,incident_type_code VARCHAR(10),student_id INTEGER,date_incident_start DATETIME,date_incident_end DATETIME,incident_summary VARCHAR(255),recommendations VARCHAR(255),other_details VARCHAR(255))CREATE TABLE Addresses (address_id INTEGER,line_1 VARCHAR(120),line_2 VARCHA...
SELECT date_of_notes, COUNT(date_of_notes) FROM Assessment_Notes ORDER BY COUNT(date_of_notes)
What place did R. Wenzel, who was active after 1934, have?
CREATE TABLE table_57236 ("Place" real,"Name" text,"From" real,"Until" real,"Titles" real,"Seconds" text,"Thirds" text)
SELECT SUM("Place") FROM table_57236 WHERE "Name" = 'r. wenzel' AND "Until" > '1934'
what airline uses the code HP
CREATE TABLE dual_carrier (main_airline varchar,low_flight_number int,high_flight_number int,dual_airline varchar,service_name text)CREATE TABLE days (days_code varchar,day_name varchar)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_...
SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'HP'
What was the manner of departure for the manager of Cercle Brugge?
CREATE TABLE table_29467 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Replaced by" text,"Date of appointment" text)
SELECT "Manner of departure" FROM table_29467 WHERE "Team" = 'Cercle Brugge'
In what Wicket in the City of Eastbourne with a Score of less than 368?
CREATE TABLE table_6060 ("Wicket" text,"Score" real,"Batting partners" text,"Opposition" text,"Venue" text,"City" text,"Year" real)
SELECT "Wicket" FROM table_6060 WHERE "Score" < '368' AND "City" = 'eastbourne'
what is the result when the round is less than 7 and the opponent is melbourne storm?
CREATE TABLE table_name_76 (result VARCHAR,round VARCHAR,opponent VARCHAR)
SELECT result FROM table_name_76 WHERE round < 7 AND opponent = "melbourne storm"
How many managers for club in Turku where kitmaker is Puma?
CREATE TABLE table_25129482_1 (manager VARCHAR,kitmaker VARCHAR,location VARCHAR)
SELECT COUNT(manager) FROM table_25129482_1 WHERE kitmaker = "Puma" AND location = "Turku"
What is the Russian name with lbr as the Latin 3-letter code?
CREATE TABLE table_34574 ("Country name" text,"Russian name" text,"Cyrillic code" text,"Latin 3-letter code" text,"Latin 2-letter code" text,"Numeric code" real)
SELECT "Russian name" FROM table_34574 WHERE "Latin 3-letter code" = 'lbr'
count the number of patients whose days of hospital stay is greater than 1 and diagnoses icd9 code is 4280?
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 diagnoses (subject_id text,hadm_id text,icd9_code text,sho...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "1" AND diagnoses.icd9_code = "4280"
Which Week has Attendance of 51,558?
CREATE TABLE table_name_71 (week INTEGER,attendance VARCHAR)
SELECT MIN(week) FROM table_name_71 WHERE attendance = 51 OFFSET 558
round trip fares NEW YORK to SAN JOSE
CREATE TABLE state (state_code text,state_name text,country_name text)CREATE TABLE flight_fare (flight_id int,fare_id int)CREATE TABLE flight (aircraft_code_sequence text,airline_code varchar,airline_flight text,arrival_time int,connections int,departure_time int,dual_carrier text,flight_days text,flight_id int,flight_...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NEW YORK' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.cit...
what procedure did patient 70709 receive the first time since 1 year ago.
CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx text,dose_unit_rx text,route text)CREATE TABLE d_icd_procedures (row_id number,icd9_code text,short_title text...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT procedures_icd.icd9_code FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 70709) AND DATETIME(procedures_icd.charttime) >= DATETIME(CURRENT_TI...
Which entrant has 49 points and a Mclaren M7A chassis?
CREATE TABLE table_49310 ("Year" real,"Entrant" text,"Chassis" text,"Engine" text,"Tyres" text,"Points" text)
SELECT "Entrant" FROM table_49310 WHERE "Points" = '49' AND "Chassis" = 'mclaren m7a'
what drug was prescribed to patient 013-27480 in the same day after the antibiotics - macrolide procedure when they came to the hospital first time?
CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname...
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '013-27480' AND NOT patient.hospit...
A bar chart for returning the number of the categories of music festivals that have the result 'Awarded', and rank Category in descending order please.
CREATE TABLE artist (Artist_ID int,Artist text,Age int,Famous_Title text,Famous_Release_date text)CREATE TABLE music_festival (ID int,Music_Festival text,Date_of_ceremony text,Category text,Volume int,Result text)CREATE TABLE volume (Volume_ID int,Volume_Issue text,Issue_Date text,Weeks_on_Top real,Song text,Artist_ID ...
SELECT Category, COUNT(Category) FROM music_festival WHERE Result = "Awarded" GROUP BY Category ORDER BY Category DESC
What is the free sotware with the latest stable date version of 1.1?
CREATE TABLE table_name_78 (software VARCHAR,cost___usd__ VARCHAR,latest_stable_date__version_ VARCHAR)
SELECT software FROM table_name_78 WHERE cost___usd__ = "free" AND latest_stable_date__version_ = "1.1"
how many bubbles with category being input
CREATE TABLE table_1507852_5 (bubbles VARCHAR,category VARCHAR)
SELECT COUNT(bubbles) FROM table_1507852_5 WHERE category = "Input"
how many patients are born before 2053 and tested in lab with item id 51383?
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2053" AND lab.itemid = "51383"
A line chart for what are the number of the dates of the assessment notes?, and sort by the x-axis from high to low please.
CREATE TABLE Behavior_Incident (incident_id INTEGER,incident_type_code VARCHAR(10),student_id INTEGER,date_incident_start DATETIME,date_incident_end DATETIME,incident_summary VARCHAR(255),recommendations VARCHAR(255),other_details VARCHAR(255))CREATE TABLE Detention (detention_id INTEGER,detention_type_code VARCHAR(10)...
SELECT date_of_notes, COUNT(date_of_notes) FROM Assessment_Notes ORDER BY date_of_notes DESC
How many years did the team place 2nd in Antwerp, Belgium?
CREATE TABLE table_name_21 (year VARCHAR,venue VARCHAR,result VARCHAR)
SELECT COUNT(year) FROM table_name_21 WHERE venue = "antwerp, belgium" AND result = "2nd"
What is the first year course in the program where geometry is taken in the third year?
CREATE TABLE table_17493 ("Subjects" text,"First Year" text,"Second Year" text,"Third Year" text,"Fourth Year" text)
SELECT "First Year" FROM table_17493 WHERE "Third Year" = 'Geometry'
I 'd like to take a 400 -level course , but do n't want to do a lab , what are my options ?
CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE course (course_id int,name varchar,department varchar,numbe...
SELECT DISTINCT name, number FROM course WHERE department = 'EECS' AND has_lab = 'N' AND number < 400 + 100 AND number >= 400
What is Country, when Lane is 5, and when React is greater than 0.166?
CREATE TABLE table_name_80 (country VARCHAR,lane VARCHAR,react VARCHAR)
SELECT country FROM table_name_80 WHERE lane = 5 AND react > 0.166
What is maximum number of episodes for a show?
CREATE TABLE table_18540104_1 (episodes INTEGER)
SELECT MAX(episodes) FROM table_18540104_1
How many years was the record 3:40.8?
CREATE TABLE table_55176 ("Year" real,"Event" text,"Record" text,"Athlete" text,"Nationality" text)
SELECT COUNT("Year") FROM table_55176 WHERE "Record" = '3:40.8'
Show the number of addrens history for each customer in a bar chart, and display y-axis in desc order.
CREATE TABLE Addresses (address_id INTEGER,line_1_number_building VARCHAR(80),city VARCHAR(50),zip_postcode VARCHAR(20),state_province_county VARCHAR(50),country VARCHAR(50))CREATE TABLE Order_Items (order_item_id INTEGER,order_id INTEGER,product_id INTEGER,order_quantity VARCHAR(80))CREATE TABLE Customer_Orders (order...
SELECT T2.customer_name, COUNT(T2.customer_name) FROM Customer_Address_History AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id JOIN Addresses AS T3 ON T1.address_id = T3.address_id GROUP BY T2.customer_name ORDER BY COUNT(T2.customer_name) DESC
Return the names of products in the category 'Spices'.
CREATE TABLE characteristics (characteristic_id number,characteristic_type_code text,characteristic_data_type text,characteristic_name text,other_characteristic_details text)CREATE TABLE ref_colors (color_code text,color_description text)CREATE TABLE ref_product_categories (product_category_code text,product_category_d...
SELECT product_name FROM products WHERE product_category_code = "Spices"
Low quality answers with high length.
CREATE TABLE ReviewTaskResults (Id number,ReviewTaskId number,ReviewTaskResultTypeId number,CreationDate time,RejectionReasonId number,Comment text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuida...
SELECT Id AS "post_link", OwnerUserId AS "user_name", Score AS "score", LENGTH(Body) AS "length", Score * LENGTH(Body) AS "weighted" FROM Posts WHERE PostTypeId = 2 AND LENGTH(Body) >= 15000 AND Score <= 25 AND CommunityOwnedDate IS NULL ORDER BY 'weighted' DESC LIMIT 1000
what is the sponsor of motorola
CREATE TABLE table_35063 ("Team" text,"Chassis" text,"Engine" text,"Tires" text,"Drivers" text,"Sponsor" text)
SELECT "Team" FROM table_35063 WHERE "Sponsor" = 'motorola'
Voivodeship or city of nowogr dzkie has what capital?
CREATE TABLE table_5456 ("s Car plate (starting 1937)" text,"Voivodeship or city" text,"Capital" text,"Area (1930) in 1,000skm 2" text,"Population (1931) in 1,000s" text)
SELECT "Capital" FROM table_5456 WHERE "Voivodeship or city" = 'nowogródzkie'
What is the lowest year that has all-ireland hurling final as the competition, and 6-08 (24) as the waterford score?
CREATE TABLE table_name_95 (year INTEGER,competition VARCHAR,waterford_score VARCHAR)
SELECT MIN(year) FROM table_name_95 WHERE competition = "all-ireland hurling final" AND waterford_score = "6-08 (24)"
what is the date of birth of Jane Dillard?
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 demographic.dob FROM demographic WHERE demographic.name = "Jane Dillard"
what is the number of patients whose admission type is urgent and admission year is less than 2184?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.admityear < "2184"
While the original 1st us tour cast included nicci claspell, who was in the original tokyo/seoul tour cast?
CREATE TABLE table_3038 ("Character" text,"Original Berkeley Cast" text,"Original Broadway Cast" text,"Original 1st US Tour Cast" text,"Original UK Cast" text,"Original Tokyo / Seoul Tour Cast" text,"Original 3rd US Tour Cast" text)
SELECT "Original Tokyo / Seoul Tour Cast" FROM table_3038 WHERE "Original 1st US Tour Cast" = 'Nicci Claspell'
Which state is University of Tennessee based in?
CREATE TABLE table_name_27 (state VARCHAR,host VARCHAR)
SELECT state FROM table_name_27 WHERE host = "university of tennessee"
Which stadium can hold 63,443 people?
CREATE TABLE table_name_97 (result VARCHAR,attendance VARCHAR)
SELECT result FROM table_name_97 WHERE attendance = "63,443"
What rank was Lassi Karonen?
CREATE TABLE table_65949 ("Rank" real,"Athlete" text,"Country" text,"Time" text,"Notes" text)
SELECT COUNT("Rank") FROM table_65949 WHERE "Athlete" = 'lassi karonen'
What is the lowest pick number of John Scully?
CREATE TABLE table_name_45 (pick__number INTEGER,name VARCHAR)
SELECT MIN(pick__number) FROM table_name_45 WHERE name = "john scully"
How many have a length of 375?
CREATE TABLE table_16654785_2 (average_climb___percentage_ VARCHAR,length__m_ VARCHAR)
SELECT COUNT(average_climb___percentage_) FROM table_16654785_2 WHERE length__m_ = 375
When the crowd was bigger than 26,063, who was the Away team?
CREATE TABLE table_name_74 (away_team VARCHAR,crowd INTEGER)
SELECT away_team FROM table_name_74 WHERE crowd > 26 OFFSET 063
Show all the planned delivery dates and bin by weekday in a bar chart, and list by the Y from low to high.
CREATE TABLE Drama_Workshop_Groups (Workshop_Group_ID INTEGER,Address_ID INTEGER,Currency_Code CHAR(15),Marketing_Region_Code CHAR(15),Store_Name VARCHAR(255),Store_Phone VARCHAR(255),Store_Email_Address VARCHAR(255),Other_Details VARCHAR(255))CREATE TABLE Customers (Customer_ID VARCHAR(100),Address_ID INTEGER,Customer...
SELECT Planned_Delivery_Date, COUNT(Planned_Delivery_Date) FROM Bookings ORDER BY COUNT(Planned_Delivery_Date)
Which city has the IATA SSG?
CREATE TABLE table_80192 ("City" text,"Country" text,"IATA" text,"ICAO" text,"Airport" text)
SELECT "City" FROM table_80192 WHERE "IATA" = 'ssg'
What is the Lowest lost for Team Ypiranga-SP where the games Played is more than 10 and the goals Against is greater than 50?
CREATE TABLE table_name_71 (lost INTEGER,against VARCHAR,played VARCHAR,team VARCHAR)
SELECT MIN(lost) FROM table_name_71 WHERE played > 10 AND team = "ypiranga-sp" AND against > 50
Number of created accounts per week.
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 (TIME_TO_STR(CreationDate, '%y') + (TIME_TO_STR(CreationDate, '%W') - 1) / 52.0) AS YR_WK, COUNT(*) AS c FROM Users GROUP BY (TIME_TO_STR(CreationDate, '%y') + (TIME_TO_STR(CreationDate, '%W') - 1) / 52.0) ORDER BY (TIME_TO_STR(CreationDate, '%y') + (TIME_TO_STR(CreationDate, '%W') - 1) / 52.0)
how many hours has it been since patient 015-23047 has been admitted to the icu?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE medication (medicationid number,patientunitstayid number,drugname te...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '015-23047' AND patient.unitdischargetime IS NULL
since 2103, has patient 006-251537 been given any diagnosis?
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 allergy (allergyid number,patientunitstayid number,drugname text,allergyna...
SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-251537')) AND STRFTIME('%y', diagnosis.diagnosistime) >= '2103'
A bar chart for what are the number of the titles of all movies that have between 3 and 5 stars?, and list X-axis in asc order please.
CREATE TABLE Reviewer (rID int,name text)CREATE TABLE Movie (mID int,title text,year int,director text)CREATE TABLE Rating (rID int,mID int,stars int,ratingDate date)
SELECT title, COUNT(title) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID WHERE T1.stars BETWEEN 3 AND 5 GROUP BY title ORDER BY title
find the gender of subject id 2560.
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 prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text...
SELECT demographic.gender FROM demographic WHERE demographic.subject_id = "2560"
Show the transaction type and the number of transactions Plot them as bar chart, show from low to high by the the total number .
CREATE TABLE Customers (customer_id INTEGER,customer_first_name VARCHAR(20),customer_last_name VARCHAR(20),customer_address VARCHAR(255),customer_phone VARCHAR(255),customer_email VARCHAR(255),other_customer_details VARCHAR(255))CREATE TABLE Financial_Transactions (transaction_id INTEGER,previous_transaction_id INTEGER...
SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type ORDER BY COUNT(*)
A bar chart for what are the number of the names of the workshop groups that have bookings with status code 'stop'?
CREATE TABLE Bookings (Booking_ID INTEGER,Customer_ID INTEGER,Workshop_Group_ID VARCHAR(100),Status_Code CHAR(15),Store_ID INTEGER,Order_Date DATETIME,Planned_Delivery_Date DATETIME,Actual_Delivery_Date DATETIME,Other_Order_Details VARCHAR(255))CREATE TABLE Clients (Client_ID INTEGER,Address_ID INTEGER,Customer_Email_A...
SELECT Store_Name, COUNT(Store_Name) FROM Bookings AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Workshop_Group_ID = T2.Workshop_Group_ID WHERE T1.Status_Code = "stop" GROUP BY Store_Name
For those employees who do not work in departments with managers that have ids between 100 and 200, find email and salary , and visualize them by a bar chart, rank total number in descending 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 countries (COUNTRY_ID varchar(2),COUN...
SELECT EMAIL, SALARY FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY SALARY DESC
when did patient 011-29258 last receive his or her bedside glucose lab test until 52 months ago?
CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim...
SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-29258')) AND lab.labname = 'bedside glucose' AND DATETIME(lab.labresulttime) <=...
Tell me the Ryuji Hijikata for Block A of Ryuji Hijikata
CREATE TABLE table_51598 ("Block A" text,"Kaz Hayashi" text,"Ryuji Hijikata" text,"TAKA Michinoku" text,"\"brother\" YASSHI" text)
SELECT "Ryuji Hijikata" FROM table_51598 WHERE "Block A" = 'ryuji hijikata'
Name the most rr1 pts for 7 ranking
CREATE TABLE table_73297 ("Team name" text,"Races" real,"Won" real,"RR1 Pts." real,"RR2 Pts." real,"RR3 Pts." real,"Total Pts." real,"Ranking" real)
SELECT MAX("RR1 Pts.") FROM table_73297 WHERE "Ranking" = '7'
What chapter is located in Normal, Illinois?
CREATE TABLE table_58038 ("Number" real,"Chapter" text,"Installation Date" text,"Location" text,"Status" text)
SELECT "Chapter" FROM table_58038 WHERE "Location" = 'normal, illinois'
give me the number of patients whose age is less than 49 and admission year is less than 2198?
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.age < "49" AND demographic.admityear < "2198"
What regulations have hudson as the winning constructor?
CREATE TABLE table_41552 ("Year" real,"Circuit" text,"Winning drivers" text,"Winning constructor" text,"Regulations" text,"Report" text)
SELECT "Regulations" FROM table_41552 WHERE "Winning constructor" = 'hudson'
How many values for high assists when the game is 81?
CREATE TABLE table_25779 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT COUNT("High assists") FROM table_25779 WHERE "Game" = '81'
what is the admission location and diagnosis icd9 code of subject id 29961?
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 demographic.admission_location, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "29961"
What is the name of the national final main host when the semi final/heat host shows internal selection in 2011?
CREATE TABLE table_name_83 (national_final_main_host VARCHAR,semi_final_heat_host VARCHAR,year_s_ VARCHAR)
SELECT national_final_main_host FROM table_name_83 WHERE semi_final_heat_host = "internal selection" AND year_s_ = "2011"
What's the most amount of point finishes for v8supercar?
CREATE TABLE table_30421 ("Series" text,"Seasons" real,"Races" real,"Poles" real,"Wins" real,"Podiums (Non-win)" real,"Point Finishes (Non-podium)" real,"Teams" real,"Total Points" real,"Championships" real,"Best Finish (Championship)" text)
SELECT MAX("Point Finishes (Non-podium)") FROM table_30421 WHERE "Series" = 'V8Supercar'
Which Assist/pass has a Score of 1-0, and a Goal of 5?
CREATE TABLE table_name_85 (assist_pass VARCHAR,score VARCHAR,goal VARCHAR)
SELECT assist_pass FROM table_name_85 WHERE score = "1-0" AND goal = "5"
What's the callsign in Tacloban?
CREATE TABLE table_name_22 (callsign VARCHAR,location VARCHAR)
SELECT callsign FROM table_name_22 WHERE location = "tacloban"
how old is the patient named stephanie suchan?
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 text,flag text,value_unit text,label text,fluid text)CREATE TABLE demographic (subject_id text,hadm_id t...
SELECT demographic.age FROM demographic WHERE demographic.name = "Stephanie Suchan"
Which host team played against the New England Patriots?
CREATE TABLE table_15576 ("Date" text,"Visiting Team" text,"Final Score" text,"Host Team" text,"Stadium" text)
SELECT "Host Team" FROM table_15576 WHERE "Visiting Team" = 'new england patriots'
What is First Elected, when District is 'Minnesota 2'?
CREATE TABLE table_58740 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Results" text)
SELECT "First elected" FROM table_58740 WHERE "District" = 'minnesota 2'
JavaScript snippet tags that probably shouldn't be there.
CREATE TABLE Badges (Id number,UserId number,Name text,Date time,Class number,TagBased boolean)CREATE TABLE ReviewTasks (Id number,ReviewTaskTypeId number,CreationDate time,DeletionDate time,ReviewTaskStateId number,PostId number,SuggestedEditId number,CompletedByReviewTaskId number)CREATE TABLE Tags (Id number,TagName...
SELECT Title, Tags, Id AS "post_link", Score, ViewCount FROM Posts WHERE PostTypeId = 1 AND Score = 0 AND NOT Tags LIKE '%javascript%' AND Body LIKE '%begin snippet: js hide: false%'
Name the total number of years for brm straight-4
CREATE TABLE table_name_65 (year VARCHAR,engine VARCHAR)
SELECT COUNT(year) FROM table_name_65 WHERE engine = "brm straight-4"
How many time a week does the class meet for MUSTHTRE 141 ?
CREATE TABLE comment_instructor (instructor_id int,student_id int,score int,comment_text varchar)CREATE TABLE student (student_id int,lastname varchar,firstname varchar,program_id int,declare_major varchar,total_credit int,total_gpa float,entered_as varchar,admit_term int,predicted_graduation_semester int,degree varcha...
SELECT DISTINCT course_offering.friday, course_offering.monday, course_offering.saturday, course_offering.sunday, course_offering.thursday, course_offering.tuesday, course_offering.wednesday FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_i...
Which team plays in Goa, Salcette?
CREATE TABLE table_name_63 (home_venue VARCHAR,state VARCHAR,city VARCHAR)
SELECT home_venue FROM table_name_63 WHERE state = "goa" AND city = "salcette"
Namethe score for july 16
CREATE TABLE table_21312 ("Game" real,"Date" text,"Opponent" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location/Attendance" text,"Record" text)
SELECT "Score" FROM table_21312 WHERE "Date" = 'July 16'
Which state has a Reason for termination of retirement, and an Active service of 1926 1928?
CREATE TABLE table_name_34 (state VARCHAR,reason_for_termination VARCHAR,active_service VARCHAR)
SELECT state FROM table_name_34 WHERE reason_for_termination = "retirement" AND active_service = "1926–1928"
How many distinct claim outcome codes are there?
CREATE TABLE claims_documents (claim_id number,document_type_code text,created_by_staff_id number,created_date number)CREATE TABLE claims_processing (claim_processing_id number,claim_id number,claim_outcome_code text,claim_stage_id number,staff_id number)CREATE TABLE staff (staff_id number,staff_details text)CREATE TAB...
SELECT COUNT(DISTINCT claim_outcome_code) FROM claims_processing