instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
What is the Panthers' Division Record?
CREATE TABLE table_68043 ("School" text,"Team" text,"Division Record" text,"Overall Record" text,"Season Outcome" text)
SELECT "Division Record" FROM table_68043 WHERE "Team" = 'panthers'
What was the loss for the game on July 1 with an attendance more than 35,621?
CREATE TABLE table_11877 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" real,"Record" text)
SELECT "Loss" FROM table_11877 WHERE "Attendance" > '35,621' AND "Date" = 'july 1'
Show the apartment numbers, start dates, and end dates of all the apartment bookings.
CREATE TABLE Apartment_Bookings (booking_start_date VARCHAR,apt_id VARCHAR)CREATE TABLE Apartments (apt_number VARCHAR,apt_id VARCHAR)
SELECT T2.apt_number, T1.booking_start_date, T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id
Who had the high rebounds at the delta center?
CREATE TABLE table_18979 ("Game" real,"Date" text,"Team" text,"Score" text,"High points" text,"High rebounds" text,"High assists" text,"Location Attendance" text,"Record" text)
SELECT "High rebounds" FROM table_18979 WHERE "Location Attendance" = 'Delta Center'
Who ran in the election where Claude Fuller was the incumbent?
CREATE TABLE table_72423 ("District" text,"Incumbent" text,"Party" text,"First elected" real,"Result" text,"Candidates" text)
SELECT "Candidates" FROM table_72423 WHERE "Incumbent" = 'Claude Fuller'
Detect posts misusing backticks for programming languages.
CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE PostNotices (Id number,PostId number,PostNoticeTypeId number,CreationDate time,DeletionDate time,ExpiryDate time,Body text,OwnerUserId number,DeletionUserId number)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId nu...
SELECT Id AS "post_link" FROM Posts WHERE Posts.Id > '##StartID:int?1##' AND Posts.Id < '##EndID:int?1000000##' AND (Body LIKE '%<code>PHP</code>%' OR Body LIKE '%<code>javascript</code>%' OR Body LIKE '%<code>C#</code>%' OR Body LIKE '%<code>python</code>%' OR Body LIKE '%<code>java</code>%' OR Body LIKE '%<code>C</co...
In Ascot (UK), what was the result?
CREATE TABLE table_14981555_3 (result VARCHAR,venue VARCHAR)
SELECT result FROM table_14981555_3 WHERE venue = "Ascot (UK)"
Who built the 21 grid car that retired due to suspension?
CREATE TABLE table_name_80 (constructor VARCHAR,grid VARCHAR,time_retired VARCHAR)
SELECT constructor FROM table_name_80 WHERE grid > 21 AND time_retired = "suspension"
Which city is the headquarter of the store named 'Blackville' in?
CREATE TABLE store (store_id number,store_name text,type text,area_size number,number_of_product_category number,ranking number)CREATE TABLE district (district_id number,district_name text,headquartered_city text,city_population number,city_area number)CREATE TABLE store_district (store_id number,district_id number)CRE...
SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.store_name = "Blackville"
Percentage of AngularJS question without vote in the 5 days.
CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,R...
SELECT CASE WHEN Votes.Id IS NULL THEN 1 ELSE 0 END AS Unvoted, VoteTypes.Name, Posts.Score, Posts.Title FROM Posts LEFT JOIN Votes ON Posts.Id = Votes.PostId JOIN PostTags ON Posts.Id = PostTags.PostId JOIN Tags ON PostTags.TagId = Tags.Id JOIN VoteTypes ON VoteTypes.Id = Votes.VoteTypeId WHERE Posts.PostTypeId = 1 AN...
SO - Total Posts by Database Server Per Month - DB2.
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 SuggestedEdits (Id ...
SELECT CONCAT(YEAR(P.CreationDate), '-', MONTH(P.CreationDate)) AS YearMonth, 'DB2' AS TagName, COUNT(*) AS PostCount FROM Posts AS P INNER JOIN PostTags AS PT ON (P.Id = PT.PostId) INNER JOIN Tags AS T ON (PT.TagId = T.Id) WHERE T.TagName LIKE 'db2%' GROUP BY YEAR(P.CreationDate), MONTH(P.CreationDate) ORDER BY YEAR(P...
Name the sensor res for model of s9200
CREATE TABLE table_name_74 (sensor_res VARCHAR,_size VARCHAR,model VARCHAR)
SELECT sensor_res, _size FROM table_name_74 WHERE model = "s9200"
What professor teaches computing infrastructure courses ?
CREATE TABLE student_record (student_id int,course_id int,semester int,grade varchar,how varchar,transfer_source varchar,earn_credit varchar,repeat_term varchar,test_id varchar)CREATE TABLE program (program_id int,name varchar,college varchar,introduction varchar)CREATE TABLE program_requirement (program_id int,categor...
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN area ON course_offering.course_id = area.course_id WHERE area.area LIKE '%...
Display a bar chart for the names and the ages of editors, sort Y-axis in ascending order please.
CREATE TABLE editor (Editor_ID int,Name text,Age real)CREATE TABLE journal_committee (Editor_ID int,Journal_ID int,Work_Type text)CREATE TABLE journal (Journal_ID int,Date text,Theme text,Sales int)
SELECT Name, Age FROM editor ORDER BY Age
On which episode did actress Sela Ward make her last appearance?
CREATE TABLE table_16569 ("Character" text,"Portrayed by" text,"First appearance" text,"Last appearance" text,"Duration" text,"Episodes" text)
SELECT "Last appearance" FROM table_16569 WHERE "Portrayed by" = 'Sela Ward'
What is the cardinal direction of Wednesday p.m. in English?
CREATE TABLE table_name_90 (cardinal_direction VARCHAR,english VARCHAR)
SELECT cardinal_direction FROM table_name_90 WHERE english = "wednesday p.m."
What was the loss of the game attended by 14,691?
CREATE TABLE table_71543 ("Date" text,"Opponent" text,"Score" text,"Loss" text,"Attendance" text)
SELECT "Loss" FROM table_71543 WHERE "Attendance" = '14,691'
How many field goals were made by someone playing position of right end?
CREATE TABLE table_1035 ("Player" text,"Position" text,"Starter" text,"Touchdowns" real,"Extra points" real,"Field goals" real,"Points" real)
SELECT COUNT("Field goals") FROM table_1035 WHERE "Position" = 'Right end'
What week was September 24, 2000 on?
CREATE TABLE table_name_55 (week INTEGER,date VARCHAR)
SELECT SUM(week) FROM table_name_55 WHERE date = "september 24, 2000"
Which language does the film AIRPORT POLLOCK use? List the language name.
CREATE TABLE customer (customer_id number,store_id number,first_name text,last_name text,email text,address_id number,active boolean,create_date time,last_update time)CREATE TABLE store (store_id number,manager_staff_id number,address_id number,last_update time)CREATE TABLE payment (payment_id number,customer_id number...
SELECT T2.name FROM film AS T1 JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'AIRPORT POLLOCK'
provide the number of patients whose ethnicity is hispanic or latino and item id is 51132?
CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marita...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.ethnicity = "HISPANIC OR LATINO" AND lab.itemid = "51132"
what song was a hit in 1995 after i live my life for you ?
CREATE TABLE table_203_723 (id number,"year" number,"song" text,"us hot 100" number,"us msr" number,"us a.c." number,"can" number,"uk singles" number,"album" text)
SELECT "song" FROM table_203_723 WHERE "year" = 1995 AND id > (SELECT id FROM table_203_723 WHERE "song" = '"i live my life for you"')
Find the number of rooms with king bed for each decor type.
CREATE TABLE rooms (roomid text,roomname text,beds number,bedtype text,maxoccupancy number,baseprice number,decor text)CREATE TABLE reservations (code number,room text,checkin text,checkout text,rate number,lastname text,firstname text,adults number,kids number)
SELECT decor, COUNT(*) FROM rooms WHERE bedtype = "King" GROUP BY decor
Name the team for kirk hinrich , derrick rose , john salmons (6)
CREATE TABLE table_22669044_9 (team VARCHAR,high_assists VARCHAR)
SELECT team FROM table_22669044_9 WHERE high_assists = "Kirk Hinrich , Derrick Rose , John Salmons (6)"
People who has both iOS and Android badges.
CREATE TABLE Votes (Id number,PostId number,VoteTypeId number,UserId number,CreationDate time,BountyAmount number)CREATE TABLE PostLinks (Id number,CreationDate time,PostId number,RelatedPostId number,LinkTypeId number)CREATE TABLE TagSynonyms (Id number,SourceTagName text,TargetTagName text,CreationDate time,OwnerUser...
SELECT Users.Id FROM Users, Badges WHERE Badges.UserId = Users.Id AND (Badges.Name = 'android')
List the names of all courses ordered by their titles and credits.
CREATE TABLE course (title VARCHAR,credits VARCHAR)
SELECT title FROM course ORDER BY title, credits
count the number of patients who were diagnosed with fracture of ilium-closed but did not come back to hospital within 2 months until 2103.
CREATE TABLE labevents (row_id number,subject_id number,hadm_id number,itemid number,charttime time,valuenum number,valueuom text)CREATE TABLE d_labitems (row_id number,itemid number,label text)CREATE TABLE prescriptions (row_id number,subject_id number,hadm_id number,startdate time,enddate time,drug text,dose_val_rx t...
SELECT (SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'fracture o...
give me the number of patients whose days of hospital stay is greater than 13 and drug name is tizanidine?
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "13" AND prescriptions.drug = "Tizanidine"
What are the notes for the shirt that said Pavv before 2005?
CREATE TABLE table_33722 ("Year" real,"Kit Supplier" text,"Sponsor" text,"Shirt Printing" text,"Notes" text)
SELECT "Notes" FROM table_33722 WHERE "Shirt Printing" = 'pavv' AND "Year" < '2005'
What was the adult rate when the 16-17 year old rate was 3.40?
CREATE TABLE table_54907 ("From" text,"Adult Rate" text,"Development Rate" text,"16-17 Year Olds Rate" text,"Apprentice Rate" text)
SELECT "Adult Rate" FROM table_54907 WHERE "16-17 Year Olds Rate" = '£3.40'
count the number of patients whose age is less than 43 and diagnoses short title is prob-head/neck/trunk nos?
CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime text,flag text,value_unit text,label text,fluid text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.age < "43" AND diagnoses.short_title = "Prob-head/neck/trunk NOS"
What is the right ascension of Pegasus with a 7343 NGC?
CREATE TABLE table_name_57 (right_ascension___j2000__ VARCHAR,constellation VARCHAR,ngc_number VARCHAR)
SELECT right_ascension___j2000__ FROM table_name_57 WHERE constellation = "pegasus" AND ngc_number = "7343"
What is the record of the game with a score of 101 92?
CREATE TABLE table_name_29 (record VARCHAR,score VARCHAR)
SELECT record FROM table_name_29 WHERE score = "101–92"
How many parties do we have?
CREATE TABLE party_events (event_id number,event_name text,party_id number,member_in_charge_id number)CREATE TABLE party (party_id number,minister text,took_office text,left_office text,region_id number,party_name text)CREATE TABLE region (region_id number,region_name text,date text,label text,format text,catalogue tex...
SELECT COUNT(DISTINCT party_name) FROM party
among patients tested for ascites, how many of them had dysthymic disorder?
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 = "Dysthymic disorder" AND lab.fluid = "Ascites"
Name the highest goals for youth system and ita
CREATE TABLE table_name_7 (goals INTEGER,nat VARCHAR,transfer_fee VARCHAR)
SELECT MAX(goals) FROM table_name_7 WHERE nat = "ita" AND transfer_fee = "youth system"
Which course has km (mi) as a type?
CREATE TABLE table_name_15 (course VARCHAR,type VARCHAR)
SELECT course FROM table_name_15 WHERE type = "km (mi)"
What Site has Attendance of 53,000, and a Date of october 21, 1967?
CREATE TABLE table_name_83 (site VARCHAR,attendance VARCHAR,date VARCHAR)
SELECT site FROM table_name_83 WHERE attendance = "53,000" AND date = "october 21, 1967"
Name the most tackles for 3.5 sacks
CREATE TABLE table_72678 ("Player" text,"G" real,"Tackles" real,"Solo" real,"Assts" real,"Sacks" text,"Int" real,"Int yards" real,"Int avg." text,"Int TD" real,"Fum. rec" real,"Fum. rec TD" real)
SELECT MAX("Tackles") FROM table_72678 WHERE "Sacks" = '3.5'
Plot a scatter chart, customer id by card_number.
CREATE TABLE Financial_Transactions (transaction_id INTEGER,previous_transaction_id INTEGER,account_id INTEGER,card_id INTEGER,transaction_type VARCHAR(15),transaction_date DATETIME,transaction_amount DOUBLE,transaction_comment VARCHAR(255),other_transaction_details VARCHAR(255))CREATE TABLE Accounts (account_id INTEGE...
SELECT customer_id, card_number FROM Customers_Cards
Who was the opponent at the Steelers game that had a result of l 20 17?
CREATE TABLE table_70994 ("Week" real,"Date" text,"Kickoff (ET)" text,"Opponent" text,"Result" text,"Record" text,"Game Site" text)
SELECT "Opponent" FROM table_70994 WHERE "Result" = 'l 20–17'
What is Date, when Opponents In The Final, is Maria-Fernanda Alves St phanie Dubois?
CREATE TABLE table_name_59 (date VARCHAR,opponents_in_the_final VARCHAR)
SELECT date FROM table_name_59 WHERE opponents_in_the_final = "maria-fernanda alves stéphanie dubois"
Which Week is the highest one that has a Result of w 23-20, and an Attendance smaller than 34,127?
CREATE TABLE table_name_92 (week INTEGER,result VARCHAR,attendance VARCHAR)
SELECT MAX(week) FROM table_name_92 WHERE result = "w 23-20" AND attendance < 34 OFFSET 127
What city is the hidden valley raceway in?
CREATE TABLE table_name_79 (city___state VARCHAR,event_circuit VARCHAR)
SELECT city___state FROM table_name_79 WHERE event_circuit = "hidden valley raceway"
what is the daily average g tube output that patient 006-171217 has had in 01/last year?
CREATE TABLE allergy (allergyid number,patientunitstayid number,drugname text,allergyname text,allergytime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid number,chargetime time,cost number)CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,d...
SELECT AVG(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-171217')) AND intakeoutput.celllabel = 'g tu...
For those employees who do not work in departments with managers that have ids between 100 and 200, give me the comparison about employee_id over the phone_number by a bar chart.
CREATE TABLE locations (LOCATION_ID decimal(4,0),STREET_ADDRESS varchar(40),POSTAL_CODE varchar(12),CITY varchar(30),STATE_PROVINCE varchar(25),COUNTRY_ID varchar(2))CREATE TABLE job_history (EMPLOYEE_ID decimal(6,0),START_DATE date,END_DATE date,JOB_ID varchar(10),DEPARTMENT_ID decimal(4,0))CREATE TABLE jobs (JOB_ID v...
SELECT PHONE_NUMBER, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
what sport has more silver medals : wrestling or rowing
CREATE TABLE table_204_435 (id number,"sport" text,"gold" number,"silver" number,"bronze" number,"total" number)
SELECT "sport" FROM table_204_435 WHERE "sport" IN ('wrestling', 'rowing') ORDER BY "silver" DESC LIMIT 1
is 08-0av heavier than 08-0lx ?
CREATE TABLE table_204_131 (id number,"tops design code" text,"electrical system" text,"max speed" text,"weight" text,"brakes" text,"route availability" number,"notes" text)
SELECT (SELECT "weight" FROM table_204_131 WHERE "tops design code" = '08-0av') > (SELECT "weight" FROM table_204_131 WHERE "tops design code" = '08-0lx')
Stacked bar chart of school_id for with each ACC_Home in each acc road, list in desc by the names.
CREATE TABLE university (School_ID int,School text,Location text,Founded real,Affiliation text,Enrollment real,Nickname text,Primary_conference text)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_Perce...
SELECT ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road DESC
What was the total number of medals received by James Logan High School when it received less than 1 silver medal?
CREATE TABLE table_name_42 (total_medals VARCHAR,ensemble VARCHAR,silver_medals VARCHAR)
SELECT COUNT(total_medals) FROM table_name_42 WHERE ensemble = "james logan high school" AND silver_medals < 1
What is the Burmese term associated with a cardinal direction of west?
CREATE TABLE table_72581 ("Cardinal direction" text,"Burmese" text,"Sanskrit" text,"English" text,"Planet" text,"Sign" text)
SELECT "Burmese" FROM table_72581 WHERE "Cardinal direction" = 'West'
When is it has 15,557 Attendances?
CREATE TABLE table_39269 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Game site" text,"Attendance" text)
SELECT "Date" FROM table_39269 WHERE "Attendance" = '15,557'
give me the number of patients whose insurance is private and diagnoses icd9 code is 45341?
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Private" AND diagnoses.icd9_code = "45341"
Name the city of license with resolution of sd 480i and official website of telemundo.com
CREATE TABLE table_name_34 (city_of_license VARCHAR,resolution VARCHAR,official_website VARCHAR)
SELECT city_of_license FROM table_name_34 WHERE resolution = "sd 480i" AND official_website = "telemundo.com"
what is days of hospital stay and primary disease of subject id 8323?
CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd t...
SELECT demographic.days_stay, demographic.diagnosis FROM demographic WHERE demographic.subject_id = "8323"
What is the average total for teams with more than 1 gold, ranked over 3 and more than 3 bronze?
CREATE TABLE table_name_39 (total INTEGER,bronze VARCHAR,gold VARCHAR,rank VARCHAR)
SELECT AVG(total) FROM table_name_39 WHERE gold > 1 AND rank > 3 AND bronze > 3
How many live births per year are there in the period where the life expectancy for females is 73.3?
CREATE TABLE table_22707 ("Period" text,"Live births per year" text,"Deaths per year" text,"Natural change per year" text,"CBR*" text,"CDR*" text,"NC*" text,"TFR*" text,"IMR*" real,"Life expectancy total" text,"Life expectancy males" text,"Life expectancy females" text)
SELECT "Live births per year" FROM table_22707 WHERE "Life expectancy females" = '73.3'
how many patients whose gender is m and days of hospital stay is greater than 7?
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.gender = "M" AND demographic.days_stay > "7"
Which Draw has a Performer of jenny newman, and Points smaller than 77?
CREATE TABLE table_name_67 (draw INTEGER,performer VARCHAR,points VARCHAR)
SELECT AVG(draw) FROM table_name_67 WHERE performer = "jenny newman" AND points < 77
Which team played as the home team when north melbourne played as away?
CREATE TABLE table_name_75 (home_team VARCHAR,away_team VARCHAR)
SELECT home_team FROM table_name_75 WHERE away_team = "north melbourne"
What was the score for the game with FK Bratstvo as home team?
CREATE TABLE table_name_7 (score VARCHAR,home VARCHAR)
SELECT score FROM table_name_7 WHERE home = "fk bratstvo"
tell me the percentile of hematocrit 35.0 among all patients of the same age as patient 99791 on their first hospital visit?
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 patients (row_id number,subject_id number,gender text,dob time...
SELECT DISTINCT t1.c1 FROM (SELECT labevents.valuenum, PERCENT_RANK() OVER (ORDER BY labevents.valuenum) AS c1 FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'hematocrit') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.ag...
What shows for set 2 when Set 1 is 29 27?
CREATE TABLE table_name_61 (set_2 VARCHAR,set_1 VARCHAR)
SELECT set_2 FROM table_name_61 WHERE set_1 = "29–27"
What team draft a player from Canada that was picked #43 and plays right wing?
CREATE TABLE table_67167 ("Pick #" text,"Player" text,"Position" text,"Nationality" text,"NHL team" text,"College/junior/club team" text)
SELECT "NHL team" FROM table_67167 WHERE "Nationality" = 'canada' AND "Position" = 'right wing' AND "Pick #" = '43'
Show me distance by name in a histogram, and order names from low to high order please.
CREATE TABLE flight (flno number(4,0),origin varchar2(20),destination varchar2(20),distance number(6,0),departure_date date,arrival_date date,price number(7,2),aid number(9,0))CREATE TABLE employee (eid number(9,0),name varchar2(30),salary number(10,2))CREATE TABLE certificate (eid number(9,0),aid number(9,0))CREATE TA...
SELECT name, distance FROM aircraft ORDER BY name
what was the first time that patient 1249 had the maximum arterial bp [systolic] until 07/05/2105?
CREATE TABLE diagnoses_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)CREATE TABLE microbiologyevents (row_id number,subject_id number,hadm_id number,charttime time,spec_type_desc text,org_name text)CREATE TABLE chartevents (row_id number,subject_id number,hadm_id number,icustay_id nu...
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 = 1249)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ...
What was the association for Indonesian Idol after 2005 with a Nominated Result?
CREATE TABLE table_name_39 (association VARCHAR,result VARCHAR,nominee VARCHAR,year VARCHAR)
SELECT association FROM table_name_39 WHERE nominee = "indonesian idol" AND year > 2005 AND result = "nominated"
What is the largest crowd size at a match against the Chicago Cardinals after Week 10 of the season?
CREATE TABLE table_74716 ("Week" real,"Date" text,"Opponent" text,"Result" text,"Attendance" real)
SELECT MAX("Attendance") FROM table_74716 WHERE "Opponent" = 'chicago cardinals' AND "Week" > '10'
What is the highest number of laps for chris amon?
CREATE TABLE table_name_51 (laps INTEGER,driver VARCHAR)
SELECT MAX(laps) FROM table_name_51 WHERE driver = "chris amon"
The sun of total that has a tour of 7 and a Giro smaller than 3 is 12.
CREATE TABLE table_name_51 (total INTEGER,tour VARCHAR,giro VARCHAR)
SELECT SUM(total) FROM table_name_51 WHERE tour = 7 AND giro < 3
Which Notes has Authors of zhou clarke zhang?
CREATE TABLE table_41411 ("Name" text,"Status" text,"Authors" text,"Location" text,"Notes" text)
SELECT "Notes" FROM table_41411 WHERE "Authors" = 'zhou clarke zhang'
Return a histogram on what are the names and budgets of departments with budgets greater than the average?, order by the budget from high to low.
CREATE TABLE advisor (s_ID varchar(5),i_ID varchar(5))CREATE TABLE instructor (ID varchar(5),name varchar(20),dept_name varchar(20),salary numeric(8,2))CREATE TABLE teaches (ID varchar(5),course_id varchar(8),sec_id varchar(8),semester varchar(6),year numeric(4,0))CREATE TABLE course (course_id varchar(8),title varchar...
SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department) ORDER BY budget DESC
name the most series number for season 22
CREATE TABLE table_25800134_18 (series__number INTEGER,season__number VARCHAR)
SELECT MAX(series__number) FROM table_25800134_18 WHERE season__number = 22
how many times has the zofran been ordered for patient 006-66039 since 179 months ago?
CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE treatment (treatmentid number,patientunitstayid number,treatmentname text,treatmenttime time)CREATE TABLE cost (costid number,uniquepid text,patienthealthsystemstayid number,eventtype text,eventid numbe...
SELECT COUNT(*) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-66039')) AND medication.drugname = 'zofran' AND DATETIME(medication.drugst...
Who was the opponent for the game taht was before week 5 on October 10, 1954?
CREATE TABLE table_name_87 (opponent VARCHAR,week VARCHAR,date VARCHAR)
SELECT opponent FROM table_name_87 WHERE week < 5 AND date = "october 10, 1954"
How many starts were there when the winnings are $690,321?
CREATE TABLE table_1875157_2 (starts INTEGER,winnings VARCHAR)
SELECT MIN(starts) FROM table_1875157_2 WHERE winnings = "$690,321"
Which coding's variant id is abd'1a 3?
CREATE TABLE table_41747 ("Variant id" text,"5\u2019UTR splice" text,"Coding" text,"3\u2019UTR sequence" text,"GenBank id" text)
SELECT "Coding" FROM table_41747 WHERE "Variant id" = 'abd''1a 3'
How many girl students who are younger than 25?
CREATE TABLE has_amenity (dormid number,amenid number)CREATE TABLE dorm (dormid number,dorm_name text,student_capacity number,gender text)CREATE TABLE lives_in (stuid number,dormid number,room_number number)CREATE TABLE student (stuid number,lname text,fname text,age number,sex text,major number,advisor number,city_cod...
SELECT COUNT(*) FROM student WHERE sex = 'F' AND age < 25
give me the number of patients whose gender is f and drug code is azit500i?
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.gender = "F" AND prescriptions.formulary_drug_cd = "AZIT500I"
What is the lowest year that have wins greater than 0?
CREATE TABLE table_name_24 (year INTEGER,wins INTEGER)
SELECT MIN(year) FROM table_name_24 WHERE wins > 0
how did patient 027-4674 get admitted to the hospital for the first time until 1 year ago?
CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,syst...
SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '027-4674' AND DATETIME(patient.hospitaladmittime) <= DATETIME(CURRENT_TIME(), '-1 year') ORDER BY patient.hospitaladmittime LIMIT 1
What is the total number of goals when there are 3 draws, more than 18 losses, and played is smaller than 38?
CREATE TABLE table_47400 ("Position" real,"Club" text,"Played" real,"Points" real,"Wins" real,"Draws" real,"Losses" real,"Goals for" real,"Goals against" real,"Goal Difference" real)
SELECT COUNT("Goals for") FROM table_47400 WHERE "Draws" = '3' AND "Losses" > '18' AND "Played" < '38'
Which Name has an Intra-molecular structure of no, and a Link of webserver, and a Comparative of no?
CREATE TABLE table_36082 ("Name" text,"Species Specific" text,"Intra-molecular structure" text,"Comparative" text,"Link" text)
SELECT "Name" FROM table_36082 WHERE "Intra-molecular structure" = 'no' AND "Link" = 'webserver' AND "Comparative" = 'no'
Name the lowest Draw which has a Performer of kaliopi and a Televotes larger than 3834?
CREATE TABLE table_name_18 (draw INTEGER,performer VARCHAR,televotes VARCHAR)
SELECT MIN(draw) FROM table_name_18 WHERE performer = "kaliopi" AND televotes > 3834
Name the team number 1 for san lorenzo
CREATE TABLE table_23812628_1 (team__number1 VARCHAR,team__number2 VARCHAR)
SELECT team__number1 FROM table_23812628_1 WHERE team__number2 = "San Lorenzo"
What is the FCC info for the city of Tribune, Kansas?
CREATE TABLE table_35120 ("Call sign" text,"Frequency MHz" real,"City of license" text,"ERP W" real,"Class" text,"FCC info" text)
SELECT "FCC info" FROM table_35120 WHERE "City of license" = 'tribune, kansas'
What was the score from the game played on June 22?
CREATE TABLE table_name_84 (score VARCHAR,date VARCHAR)
SELECT score FROM table_name_84 WHERE date = "june 22"
Give me a histogram for what are the ids and names of the architects who built at least 3 bridges ?, sort by the names in ascending.
CREATE TABLE bridge (architect_id int,id int,name text,location text,length_meters real,length_feet real)CREATE TABLE architect (id text,name text,nationality text,gender text)CREATE TABLE mill (architect_id int,id int,location text,name text,type text,built_year int,notes text)
SELECT T1.name, T1.id FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id ORDER BY T1.name
fast blood glucose ( fbg ) >= 7 mmol / l, and hemoglobin a1c ( hgba1c ) >= 7 %
CREATE TABLE table_dev_17 ("id" int,"gender" string,"white_blood_cell_count_wbc" int,"hemoglobin_a1c_hba1c" float,"cd4_count" int,"dyslipidemia" bool,"renal_disease" bool,"fasting_blood_glucose_fbg" float,"creatinine_clearance_cl" float,"platelet_count" float,"high_density_lipoprotein_cholesterol_hdl_c" int,"smoking" b...
SELECT * FROM table_dev_17 WHERE fasting_blood_glucose_fbg >= 7 AND hemoglobin_a1c_hba1c >= 7
who was the winner in 2003?
CREATE TABLE table_name_53 (winner VARCHAR,year VARCHAR)
SELECT winner FROM table_name_53 WHERE year = "2003"
list the nation which participated in the 2008 worlds qualification tournament and hans spitzauer was one of the sailors .
CREATE TABLE table_203_586 (id number,"#" number,"nation" text,"qualification tournament" text,"place in qt" number,"sailor" text)
SELECT "nation" FROM table_203_586 WHERE "qualification tournament" = '2008 worlds' AND "sailor" = 'hans spitzauer'
what is the total dosage of levothyroxine sodium that patient 5887 has been prescribed in 11/this year?
CREATE TABLE procedures_icd (row_id number,subject_id number,hadm_id number,icd9_code text,charttime time)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 ...
SELECT SUM(prescriptions.dose_val_rx) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 5887) AND prescriptions.drug = 'levothyroxine sodium' AND DATETIME(prescriptions.startdate, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 ye...
Which Format has a Catalog smaller than 61298?
CREATE TABLE table_name_11 (format VARCHAR,catalog INTEGER)
SELECT format FROM table_name_11 WHERE catalog < 61298
What is the average points with less than 30 played?
CREATE TABLE table_7859 ("Position" real,"Club" text,"Played" real,"Points" real,"Wins" real,"Draws" real,"Losses" real,"Goals for" real,"Goals against" real,"Goal Difference" real)
SELECT AVG("Points") FROM table_7859 WHERE "Played" < '30'
What is the value for 2011 corresponding to a 2007 value of 1r?
CREATE TABLE table_name_32 (Id VARCHAR)
SELECT 2011 FROM table_name_32 WHERE 2007 = "1r"
How many 1st prizes have a Date of aug 17?
CREATE TABLE table_6174 ("Date" text,"Tournament" text,"Location" text,"Winner" text,"Score" text,"1st prize ($)" real)
SELECT COUNT("1st prize ( $ )") FROM table_6174 WHERE "Date" = 'aug 17'
Draw a pie chart for what are the first names and ids for customers who have two or more accounts?
CREATE TABLE Accounts (account_id INTEGER,customer_id INTEGER,date_account_opened DATETIME,account_name VARCHAR(50),other_account_details VARCHAR(255))CREATE TABLE Product_Categories (production_type_code VARCHAR(15),product_type_description VARCHAR(80),vat_rating DECIMAL(19,4))CREATE TABLE Financial_Transactions (tran...
SELECT T2.customer_first_name, T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id
What is the theme of the Year 2002 which was created by Artist Dan Fell?
CREATE TABLE table_52213 ("Year" real,"Theme" text,"Artist" text,"Mintage" text,"Issue Price" text)
SELECT "Theme" FROM table_52213 WHERE "Year" = '2002' AND "Artist" = 'dan fell'
Deleted user's answers (w. scores & attributed questions).
CREATE TABLE PostNoticeTypes (Id number,ClassId number,Name text,Body text,IsHidden boolean,Predefined boolean,PostNoticeDurationId number)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,MarkdownPostOwnerGuidance text,MarkdownPrivilegedUserGuidance text,...
SELECT a.Id AS link, q.Title AS title, q.Body AS question, q.OwnerUserId AS asker, q.OwnerDisplayName AS asker_name, a.Body AS answer, q.Tags AS tags, a.Score AS score FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId AND a.PostTypeId = 2 AND q.PostTypeId = 1 WHERE a.CommunityOwnedDate IS NULL AND a.OwnerDispl...
i wish to book a flight from PITTSBURGH to ATLANTA COACH discount fare
CREATE TABLE flight_leg (flight_id int,leg_number int,leg_flight int)CREATE TABLE compartment_class (compartment varchar,class_type varchar)CREATE TABLE class_of_service (booking_class varchar,rank int,class_description text)CREATE TABLE fare (fare_id int,from_airport varchar,to_airport varchar,fare_basis_code text,far...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis AS FARE_BASIS_0, fare_basis AS FARE_BASIS_1, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND F...