instruction
stringlengths
0
1.06k
input
stringlengths
11
5.3k
response
stringlengths
2
4.44k
How many pageants were margaret ann awitan bayot the delegate of?
CREATE TABLE table_22219 ("Year" real,"Delegate" text,"Hometown" text,"Pageant" text,"Result" text,"Other awards" text)
SELECT COUNT("Pageant") FROM table_22219 WHERE "Delegate" = 'Margaret Ann Awitan Bayot'
what are the genders of patient 007-7925?
CREATE TABLE microlab (microlabid number,patientunitstayid number,culturesite text,organism text,culturetakentime time)CREATE TABLE lab (labid number,patientunitstayid number,labname text,labresult number,labresulttime time)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabe...
SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '007-7925'
What day did ARchie Roberts die?
CREATE TABLE table_20878 ("Player" text,"VFL Games" real,"VFL Club(s)" text,"Rank held at time of death" text,"Date of death" text,"Location" text)
SELECT "Date of death" FROM table_20878 WHERE "Player" = 'Archie Roberts'
Which Office has a Representative of scott pelath?
CREATE TABLE table_name_81 (office VARCHAR,representative VARCHAR)
SELECT office FROM table_name_81 WHERE representative = "scott pelath"
what team lost the most points
CREATE TABLE table_name_56 (lost VARCHAR)
SELECT lost FROM table_name_56 WHERE "points" = "points"
What is the name of team with Palmeiras 4-2 portuguesa as the last match?
CREATE TABLE table_35434 ("Team" text,"Outgoing manager" text,"Manner of departure" text,"Date of vacancy" text,"Last match" text,"Replaced by" text)
SELECT "Team" FROM table_35434 WHERE "Last match" = 'palmeiras 4-2 portuguesa'
list the top five most frequent procedures that patients have received in the same hospital encounter after they have been diagnosed with oth/uns inf-cen ven cath since 2103.
CREATE TABLE patients (row_id number,subject_id number,gender text,dob time,dod time)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)C...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_i...
If the stadium name is the Thuwunna Stadium, what is the date?
CREATE TABLE table_25428629_1 (date VARCHAR,stadium VARCHAR)
SELECT date FROM table_25428629_1 WHERE stadium = "Thuwunna stadium"
What is the position when the League is the malaysian super league, and a Year of 2011?
CREATE TABLE table_name_85 (position VARCHAR,league VARCHAR,year VARCHAR)
SELECT position FROM table_name_85 WHERE league = "malaysian super league" AND year = "2011"
who is the only high jumper to have a result of 2.05 ?
CREATE TABLE table_204_173 (id number,"rank" number,"group" text,"name" text,"nationality" text,"2.05" text,"2.15" text,"2.19" text,"2.23" text,"2.26" text,"result" text,"notes" text)
SELECT "name" FROM table_204_173 WHERE "rank" = '2.05'
How many games did team iurbentia bilbao have with rebounds higher than 212?
CREATE TABLE table_8569 ("Rank" real,"Name" text,"Team" text,"Games" real,"Rebounds" real)
SELECT SUM("Games") FROM table_8569 WHERE "Team" = 'iurbentia bilbao' AND "Rebounds" > '212'
what was the last intake given to patient 031-16123.
CREATE TABLE medication (medicationid number,patientunitstayid number,drugname text,dosage text,routeadmin text,drugstarttime time,drugstoptime time)CREATE TABLE vitalperiodic (vitalperiodicid number,patientunitstayid number,temperature number,sao2 number,heartrate number,respiration number,systemicsystolic number,syst...
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-16123')) AND intakeoutput.cellpath LIKE '%intake%' ORDER...
For all employees who have the letters D or S in their first name, show me the trend about salary over hire_date with a line chart, order from low to high by the X-axis.
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 countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE departments (DEPARTMENT_ID decimal(4,0),DEPART...
SELECT HIRE_DATE, SALARY FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY HIRE_DATE
What date had a time of 20:10?
CREATE TABLE table_58228 ("Date" text,"Time" text,"Score" text,"Set 1" text,"Set 2" text,"Set 3" text,"Set 4" text,"Total" text,"Report" text)
SELECT "Date" FROM table_58228 WHERE "Time" = '20:10'
how many days have elapsed since patient 006-2586's first cl flush: coated catheter, pressure/power inj ij r intake on the current intensive care unit visit?
CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweight number,dischargeweight number,hospitaladmittime time,hospitaladmitsource text,unitadmittime time,unitdischargetime tim...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid =...
What is the transfer fee of assoumani, who has a summer transfer window?
CREATE TABLE table_name_70 (transfer_fee VARCHAR,transfer_window VARCHAR,name VARCHAR)
SELECT transfer_fee FROM table_name_70 WHERE transfer_window = "summer" AND name = "assoumani"
What is the lowest game on February 10?
CREATE TABLE table_name_66 (game INTEGER,date VARCHAR)
SELECT MIN(game) FROM table_name_66 WHERE date = "february 10"
If category 1 is 0.05, what is category 3?
CREATE TABLE table_name_77 (category_3 VARCHAR,category_1 VARCHAR)
SELECT category_3 FROM table_name_77 WHERE category_1 = 0.05
How many population figures are given for Glengallen for the year when the region's total is 30554?
CREATE TABLE table_12584173_1 (population__glengallan_ VARCHAR,population__region_total_ VARCHAR)
SELECT COUNT(population__glengallan_) FROM table_12584173_1 WHERE population__region_total_ = 30554
what was the difference in score between the two teams in the last game ?
CREATE TABLE table_204_453 (id number,"#" number,"date" text,"venue" text,"opponents" text,"score" text,"comp" text,"denmark scorers" text)
SELECT ABS("score" - "score") FROM table_204_453 ORDER BY "date" DESC LIMIT 1
Name the number of direction for debrecen
CREATE TABLE table_197286_4 (direction VARCHAR,further_cities VARCHAR)
SELECT COUNT(direction) FROM table_197286_4 WHERE further_cities = "Debrecen"
Give me the comparison about the average of Team_ID over the ACC_Road , and group by attribute ACC_Road by a bar chart, and display by the y-axis in asc.
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 ACC_Road, AVG(Team_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY AVG(Team_ID)
what were the four most common diagnoses for patients who were aged 50s since 1 year ago?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE intakeoutput (intakeoutputid number,patientunitstayid number,cellpath text,celllabel text,cellvaluenumeric number,intakeoutputtime time)CREATE TABLE vitalperiodic (vitalperiodicid number,...
SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 50 AND 59) AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-1 yea...
What is the local location that has senegal as the resident county, and a mission of mali?
CREATE TABLE table_6672 ("Mission" text,"Resident Country" text,"Local Location" text,"Local Mission" text,"Local Position" text)
SELECT "Local Location" FROM table_6672 WHERE "Resident Country" = 'senegal' AND "Mission" = 'mali'
Which License has a System of amiga, and a Name of pocketuae?
CREATE TABLE table_55128 ("Name" text,"Actual version" text,"System" text,"Platform" text,"License" text)
SELECT "License" FROM table_55128 WHERE "System" = 'amiga' AND "Name" = 'pocketuae'
What batting partners played in sydney?
CREATE TABLE table_20972 ("Runs" text,"Wicket" text,"Batting partners" text,"Batting team" text,"Fielding team" text,"Venue" text,"Season" text)
SELECT "Batting partners" FROM table_20972 WHERE "Venue" = 'Sydney'
Find all the songs that do not have a back vocal.
CREATE TABLE performance (songid number,bandmate number,stageposition text)CREATE TABLE songs (songid number,title text)CREATE TABLE instruments (songid number,bandmateid number,instrument text)CREATE TABLE band (id number,firstname text,lastname text)CREATE TABLE albums (aid number,title text,year number,label text,ty...
SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid = t2.songid WHERE type = "back"
Give me the times and numbers of all trains that go to Chennai, ordered by time. Show bar chart.
CREATE TABLE station (id int,network_name text,services text,local_authority text)CREATE TABLE train (id int,train_number int,name text,origin text,destination text,time text,interval text)CREATE TABLE route (train_id int,station_id int)CREATE TABLE weekly_weather (station_id int,day_of_week text,high_temperature int,l...
SELECT time, train_number FROM train WHERE destination = 'Chennai' ORDER BY time
What is the road team of the game with Philadelphia as the home team with a result of 105-102?
CREATE TABLE table_6553 ("Game" text,"Date" text,"Home Team" text,"Result" text,"Road Team" text)
SELECT "Road Team" FROM table_6553 WHERE "Home Team" = 'philadelphia' AND "Result" = '105-102'
What is the issue price of a Year 2000 coin by artist John Mardon of the Included in Steam Buggy mintage.
CREATE TABLE table_52212 ("Year" real,"Theme" text,"Artist" text,"Mintage" text,"Issue Price" text)
SELECT "Issue Price" FROM table_52212 WHERE "Artist" = 'john mardon' AND "Year" = '2000' AND "Mintage" = 'included in steam buggy'
Show me a bar chart for how many bookings does each booking status have? List the booking status code and the number of corresponding bookings.
CREATE TABLE Apartment_Buildings (building_id INTEGER,building_short_name CHAR(15),building_full_name VARCHAR(80),building_description VARCHAR(255),building_address VARCHAR(255),building_manager VARCHAR(50),building_phone VARCHAR(80))CREATE TABLE View_Unit_Status (apt_id INTEGER,apt_booking_id INTEGER,status_date DATET...
SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
provide the number of patients whose death status is 1 and days of hospital stay is greater than 2?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE prescriptions (subject_id text,hadm_id text,icustay_id text,drug_type text,drug text,formulary_drug_cd text,route text,drug_dose text)CREATE TABLE lab (subject_id text,hadm_id text,itemid text,charttime tex...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1" AND demographic.days_stay > "2"
How many bids were there for the .500 win percentage in the Ohio Valley conference?
CREATE TABLE table_name_7 (_number_of_bids INTEGER,win__percentage VARCHAR,conference VARCHAR)
SELECT SUM(_number_of_bids) FROM table_name_7 WHERE win__percentage = ".500" AND conference = "ohio valley"
What area has less than 0.97 mil in population and is on the east?
CREATE TABLE table_43569 ("landsv\u00e6\u00f0i" text,"(English)" text,"Population 2011-01-01" text,"Area (km\u00b2)" text,"Pop./ km\u00b2" real)
SELECT "Area (km\u00b2)" FROM table_43569 WHERE "Pop./ km\u00b2" < '0.97' AND "(English)" = 'east'
What was the venue where the result was 2-1?
CREATE TABLE table_name_33 (venue VARCHAR,result VARCHAR)
SELECT venue FROM table_name_33 WHERE result = "2-1"
which patients had operations on chordae tendineae?
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.short_title = "Chordae tendineae ops"
tag wiki exerpts longer than 300 characters.
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 LENGTH(twe.Body), t.TagName, twe.Body FROM Posts AS twe JOIN Tags AS t ON twe.Id = t.ExcerptPostId WHERE twe.PostTypeId = 4 AND LENGTH(twe.Body) > 300 ORDER BY 1 DESC
What is the average overall value for a round less than 4 associated with the College of Georgia?
CREATE TABLE table_name_32 (overall INTEGER,round VARCHAR,college VARCHAR)
SELECT AVG(overall) FROM table_name_32 WHERE round < 4 AND college = "georgia"
Total upvote downvote ratio vs reputation.
CREATE TABLE VoteTypes (Id number,Name text)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,LastEditD...
SELECT SUM(UpVotes), SUM(DownVotes) FROM Users WHERE Reputation >= 100 AND Reputation < 10000 GROUP BY Reputation / 50 * 50 ORDER BY Reputation / 50 * 50
stats about a user's answers.
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 OwnerUserId, OwnerDisplayName, Id, PostTypeId, AnswerCount, CommentCount, Score, ViewCount, FavoriteCount FROM Posts WHERE OwnerUserId IN (12960) AND PostTypeId = 1
what is the number of patients whose item id is 51466 and lab test abnormal status is delta?
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 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 lab ON demographic.hadm_id = lab.hadm_id WHERE lab.itemid = "51466" AND lab.flag = "delta"
give the minimum age of patients with rash who stayed in the hospital for 14 days.
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 MIN(demographic.age) FROM demographic WHERE demographic.diagnosis = "RASH" AND demographic.days_stay = "14"
What is the Runner-up with the tier was tier ii, and a Winner of gigi fern ndez natalia zvereva 5 7, 6 1, 6 4?
CREATE TABLE table_40290 ("Week of" text,"Tier" text,"Winner" text,"Runner-up" text,"Semi finalists" text)
SELECT "Runner-up" FROM table_40290 WHERE "Tier" = 'tier ii' AND "Winner" = 'gigi fernández natalia zvereva 5–7, 6–1, 6–4'
what is drug type of drug name lidocaine 1%?
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 prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "Lidocaine 1%"
What are the names and average salaries for departments with average salary higher than 42000 Plot them as bar chart, display y axis in descending order.
CREATE TABLE prereq (course_id varchar(8),prereq_id varchar(8))CREATE TABLE time_slot (time_slot_id varchar(4),day varchar(1),start_hr numeric(2),start_min numeric(2),end_hr numeric(2),end_min numeric(2))CREATE TABLE takes (ID varchar(5),course_id varchar(8),sec_id varchar(8),semester varchar(6),year numeric(4,0),grade...
SELECT dept_name, AVG(salary) FROM instructor GROUP BY dept_name ORDER BY AVG(salary) DESC
What is the position of the player from England with 62 goals?
CREATE TABLE table_58181 ("Nationality" text,"Position" text,"Tottenham Hotspur career" text,"Club Apps" text,"Goals" text)
SELECT "Position" FROM table_58181 WHERE "Nationality" = 'england' AND "Goals" = '62'
provide the number of patients whose lab test name is wbc, other fluid?
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 lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "WBC, Other Fluid"
Which Round has a School/Club Team of arizona, and a Pick smaller than 298?
CREATE TABLE table_name_68 (round INTEGER,school_club_team VARCHAR,pick VARCHAR)
SELECT MAX(round) FROM table_name_68 WHERE school_club_team = "arizona" AND pick < 298
which is the only country to not receive a gold medal ?
CREATE TABLE table_204_785 (id number,"rank" number,"nation" text,"gold" number,"silver" number,"bronze" number,"total" number)
SELECT "nation" FROM table_204_785 WHERE "gold" = 0
Name the background colour for the Australian Capital Territory
CREATE TABLE table_15844 ("State/territory" text,"Text/background colour" text,"Format" text,"Current slogan" text,"Current series" text,"Notes" text)
SELECT "Text/background colour" FROM table_15844 WHERE "State/territory" = 'Australian Capital Territory'
For those employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40, draw a scatter chart about the correlation between commission_pct and manager_id .
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 countries (COUNTRY_ID varchar(2),COUNTRY_NAME varchar(40),REGION_ID decimal(10,0))CREATE TABLE employees (EMPLOYEE_ID decimal(6,0),FIRST_NAME varchar(20),LAST_NAME varchar(25),EMAI...
SELECT COMMISSION_PCT, MANAGER_ID FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
What is the highest pennant number with ships in raahe class?
CREATE TABLE table_name_54 (pennant_number INTEGER,ships_in_class VARCHAR)
SELECT MAX(pennant_number) FROM table_name_54 WHERE ships_in_class = "raahe"
Downvote percentages for users within a specific rep range.
CREATE TABLE PendingFlags (Id number,FlagTypeId number,PostId number,CreationDate time,CloseReasonTypeId number,CloseAsOffTopicReasonTypeId number,DuplicateOfQuestionId number,BelongsOnBaseHostAddress text)CREATE TABLE CloseAsOffTopicReasonTypes (Id number,IsUniversal boolean,InputTitle text,MarkdownInputGuidance text,...
SELECT Id AS "user_link", Reputation, UpVotes, DownVotes, ROUND(((CAST((DownVotes * 100) AS FLOAT)) / (CAST((UpVotes + DownVotes) AS FLOAT))), 2) AS PercentDownvotes FROM Users WHERE Reputation >= '##MinReputation##' AND Reputation <= '##MaxReputation##' AND (UpVotes + DownVotes > 0) ORDER BY PercentDownvotes DESC
Show the name and age for all male people who don't have a wedding with a bar chart, and I want to show from low to high by the names.
CREATE TABLE people (People_ID int,Name text,Country text,Is_Male text,Age int)CREATE TABLE church (Church_ID int,Name text,Organized_by text,Open_Date int,Continuation_of text)CREATE TABLE wedding (Church_ID int,Male_ID int,Female_ID int,Year int)
SELECT Name, Age FROM people WHERE Is_Male = 'T' AND NOT People_ID IN (SELECT Male_ID FROM wedding) ORDER BY Name
Who wrote the episode with a production code greater than 1.4 direcyed by rick wallace?
CREATE TABLE table_15748 ("Title" text,"Directed by" text,"Written by" text,"Original air date" text,"Prod. code" real)
SELECT "Written by" FROM table_15748 WHERE "Prod. code" > '1.4' AND "Directed by" = 'rick wallace'
How many Goals have a Result of 0 4?
CREATE TABLE table_name_26 (goals INTEGER,result VARCHAR)
SELECT AVG(goals) FROM table_name_26 WHERE result = "0 – 4"
Who's the Republican ticket with a Communist ticket of elizabeth gurley flynn?
CREATE TABLE table_name_32 (republican_ticket VARCHAR,communist_ticket VARCHAR)
SELECT republican_ticket FROM table_name_32 WHERE communist_ticket = "elizabeth gurley flynn"
What was the gtu winning team when the gto winning team was #48 greenwood racing?
CREATE TABLE table_13657883_2 (gtu_winning_team VARCHAR,gto_winning_team VARCHAR)
SELECT gtu_winning_team FROM table_13657883_2 WHERE gto_winning_team = "#48 Greenwood Racing"
Name the winner for adriano baffi and integiro classification of j n svorada for stage of 13
CREATE TABLE table_name_89 (winner VARCHAR,stage VARCHAR,points_classification VARCHAR,intergiro_classification VARCHAR)
SELECT winner FROM table_name_89 WHERE points_classification = "adriano baffi" AND intergiro_classification = "ján svorada" AND stage = "13"
What is Mark Joseph Kong's pick?
CREATE TABLE table_name_15 (pick INTEGER,player VARCHAR)
SELECT AVG(pick) FROM table_name_15 WHERE player = "mark joseph kong"
What are the number of the dates in which the mean sea level pressure was between 303 and 31?, display date in asc order.
CREATE TABLE trip (id INTEGER,duration INTEGER,start_date TEXT,start_station_name TEXT,start_station_id INTEGER,end_date TEXT,end_station_name TEXT,end_station_id INTEGER,bike_id INTEGER,subscription_type TEXT,zip_code INTEGER)CREATE TABLE station (id INTEGER,name TEXT,lat NUMERIC,long NUMERIC,dock_count INTEGER,city T...
SELECT date, COUNT(date) FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 GROUP BY date ORDER BY date
Title starts and end with a slash.
CREATE TABLE PostHistoryTypes (Id number,Name text)CREATE TABLE PostHistory (Id number,PostHistoryTypeId number,PostId number,RevisionGUID other,CreationDate time,UserId number,UserDisplayName text,Comment text,Text text,ContentLicense text)CREATE TABLE PostTags (PostId number,TagId number)CREATE TABLE PostNoticeTypes ...
SELECT Id, Title, Score FROM Posts WHERE Title LIKE '/%/'
When 75849 is the production in 2010 (1,000 ton) what is the production in 2011 (1,000 ton)?
CREATE TABLE table_31109 ("Rank 2011" real,"Country" text,"Production in 2011 (1,000 ton)" real,"Share 2011" text,"Rank 2010" real,"Production in 2010 (1,000 ton)" real)
SELECT "Production in 2011 (1,000 ton)" FROM table_31109 WHERE "Production in 2010 (1,000 ton)" = '75849'
Who scored the most rebounds in the game against Chicago?
CREATE TABLE table_15869204_9 (high_rebounds VARCHAR,team VARCHAR)
SELECT high_rebounds FROM table_15869204_9 WHERE team = "Chicago"
Name the captain for emile heskey
CREATE TABLE table_1301373_7 (captain VARCHAR,international_marquee VARCHAR)
SELECT captain FROM table_1301373_7 WHERE international_marquee = "Emile Heskey"
What is Zamri Hassan's lowest Malaysia Cup when there were an FA Cup of 0?
CREATE TABLE table_name_74 (malaysia_cup INTEGER,player VARCHAR,fa_cup VARCHAR)
SELECT MIN(malaysia_cup) FROM table_name_74 WHERE player = "zamri hassan" AND fa_cup < 0
What was the lowest Crowd during the Away Team Score of 10.11 (71)?
CREATE TABLE table_77767 ("Home team" text,"Home team score" text,"Away team" text,"Away team score" text,"Venue" text,"Crowd" real,"Date" text)
SELECT MIN("Crowd") FROM table_77767 WHERE "Away team score" = '10.11 (71)'
Find the number of departments in each school.
CREATE TABLE department (school_code VARCHAR,dept_name VARCHAR)
SELECT COUNT(DISTINCT dept_name), school_code FROM department GROUP BY school_code
Name the most rank
CREATE TABLE table_24954 ("Rank" real,"Athlete" text,"Nation" text,"Olympics" text,"Gold" real,"Silver" real,"Bronze" real,"Total(min. 2 medals)" real)
SELECT MAX("Rank") FROM table_24954
Who was the player from the United States, with a total larger than 145?
CREATE TABLE table_13576 ("Player" text,"Country" text,"Year(s) won" text,"Total" real,"To par" real)
SELECT "Player" FROM table_13576 WHERE "Country" = 'united states' AND "Total" > '145'
Which premier team played the 1951 NSWRFL Grand Final?
CREATE TABLE table_50118 ("Points" real,"Score" text,"Premiers" text,"Runners Up" text,"Details" text)
SELECT "Premiers" FROM table_50118 WHERE "Details" = '1951 nswrfl grand final'
Who one in the Tampa Bay Buccaneers?
CREATE TABLE table_32558 ("Week" text,"Date" text,"Location" text,"Opponent" text,"Result" text)
SELECT "Result" FROM table_32558 WHERE "Opponent" = 'tampa bay buccaneers'
What is the college when the over is larger than 15 in round 7?
CREATE TABLE table_67830 ("Round" real,"Overall" real,"Player" text,"Position" text,"College" text)
SELECT "College" FROM table_67830 WHERE "Overall" > '15' AND "Round" = '7'
Show the number of accounts for different statement details in a bar chart.
CREATE TABLE Ref_Budget_Codes (Budget_Type_Code CHAR(15),Budget_Type_Description VARCHAR(255))CREATE TABLE Statements (Statement_ID INTEGER,Statement_Details VARCHAR(255))CREATE TABLE Accounts (Account_ID INTEGER,Statement_ID INTEGER,Account_Details VARCHAR(255))CREATE TABLE Documents_with_Expenses (Document_ID INTEGER...
SELECT Statement_Details, COUNT(Statement_Details) FROM Accounts AS T1 JOIN Statements AS T2 ON T1.Statement_ID = T2.Statement_ID GROUP BY Statement_Details
WHo is the Winner of andre agassi Finalist?
CREATE TABLE table_name_97 (winner VARCHAR,finalist VARCHAR)
SELECT winner FROM table_name_97 WHERE finalist = "andre agassi"
What are the points for ktm-vmc equipment?
CREATE TABLE table_72800 ("Position" real,"Driver / Passenger" text,"Equipment" text,"Bike No" real,"Points" real)
SELECT "Points" FROM table_72800 WHERE "Equipment" = 'KTM-VMC'
What is Score, when Player is 'Vijay Singh'?
CREATE TABLE table_name_81 (score VARCHAR,player VARCHAR)
SELECT score FROM table_name_81 WHERE player = "vijay singh"
What was the round that had 32 winners from previous round?
CREATE TABLE table_30235 ("Round" text,"Clubs remaining" real,"Clubs involved" real,"Winners from previous round" text,"New entries this round" text,"Leagues entering at this round" text)
SELECT "Round" FROM table_30235 WHERE "Winners from previous round" = '32'
What is the Nation with a Record that is 7.39?
CREATE TABLE table_name_37 (nation VARCHAR,record VARCHAR)
SELECT nation FROM table_name_37 WHERE record = "7.39"
Reputation per day average from highest to lowest.
CREATE TABLE ReviewTaskResultTypes (Id number,Name text,Description text)CREATE TABLE SuggestedEditVotes (Id number,SuggestedEditId number,UserId number,VoteTypeId number,CreationDate time,TargetUserId number,TargetRepChange number)CREATE TABLE FlagTypes (Id number,Name text,Description text)CREATE TABLE Users (Id numb...
SELECT Id, DisplayName, DATEDIFF(dd, CreationDate, GETDATE()), Reputation FROM Users WHERE Id = 186134
Find the number of male students (with sex M) from each city in a bar chart, could you show in desc by the Y-axis please?
CREATE TABLE Dorm_amenity (amenid INTEGER,amenity_name VARCHAR(25))CREATE TABLE Student (StuID INTEGER,LName VARCHAR(12),Fname VARCHAR(12),Age INTEGER,Sex VARCHAR(1),Major INTEGER,Advisor INTEGER,city_code VARCHAR(3))CREATE TABLE Dorm (dormid INTEGER,dorm_name VARCHAR(20),student_capacity INTEGER,gender VARCHAR(1))CREA...
SELECT city_code, COUNT(*) FROM Student WHERE Sex = 'M' GROUP BY city_code ORDER BY COUNT(*) DESC
Find the the date of enrollment of the 'Spanish' course, and count them by a bar chart
CREATE TABLE Subjects (subject_id INTEGER,subject_name VARCHAR(120))CREATE TABLE Students (student_id INTEGER,date_of_registration DATETIME,date_of_latest_logon DATETIME,login_name VARCHAR(40),password VARCHAR(10),personal_name VARCHAR(40),middle_name VARCHAR(40),family_name VARCHAR(40))CREATE TABLE Course_Authors_and_...
SELECT date_of_enrolment, COUNT(date_of_enrolment) FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "Spanish"
pulse was the first album what was the second ?
CREATE TABLE table_203_512 (id number,"release date" text,"album" text,"catalog number" text,"chart position" number,"notes" text)
SELECT "album" FROM table_203_512 WHERE id = 2
Show me a bar chart for what are the different ids and names of the stations that have had more than 12 bikes available?, show by the x-axis from low to high.
CREATE TABLE status (station_id INTEGER,bikes_available INTEGER,docks_available INTEGER,time TEXT)CREATE TABLE trip (id INTEGER,duration INTEGER,start_date TEXT,start_station_name TEXT,start_station_id INTEGER,end_date TEXT,end_station_name TEXT,end_station_id INTEGER,bike_id INTEGER,subscription_type TEXT,zip_code INT...
SELECT name, id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12 ORDER BY name
Name the yankton yanktonai for wi h a
CREATE TABLE table_19786 ("English gloss" text,"Santee-Sisseton" text,"Yankton-Yanktonai" text,"Northern Lakota" text,"Southern Lakota" text)
SELECT "Yankton-Yanktonai" FROM table_19786 WHERE "Southern Lakota" = 'wičháša'
What is the first name of the staff who did not give any lesson?
CREATE TABLE Staff (first_name VARCHAR)CREATE TABLE Lessons (staff_id VARCHAR)
SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id
Which country uses pound sterling with a value higher than 1.33 USD?
CREATE TABLE table_name_66 (country VARCHAR,value_in_usd VARCHAR,currency VARCHAR)
SELECT country FROM table_name_66 WHERE value_in_usd > 1.33 AND currency = "pound sterling"
what is teh ihsaa class/football/soccer when the location is alexandria?
CREATE TABLE table_name_43 (ihsaa_class___football___soccer VARCHAR,location VARCHAR)
SELECT ihsaa_class___football___soccer FROM table_name_43 WHERE location = "alexandria"
What country does Glory Alozie play for?
CREATE TABLE table_name_15 (country VARCHAR,name VARCHAR)
SELECT country FROM table_name_15 WHERE name = "glory alozie"
Which player was chosen in round 17?
CREATE TABLE table_10360823_1 (player_name VARCHAR,round VARCHAR)
SELECT player_name FROM table_10360823_1 WHERE round = 17
What is the title of series #1?
CREATE TABLE table_19295 ("Series #" real,"Title" text,"Story by" text,"Teleplay by" text,"Directed by" text,"Original air date" text)
SELECT "Title" FROM table_19295 WHERE "Series #" = '1'
Who was the opponent at the competition held at Jeonju?
CREATE TABLE table_name_20 (opponent VARCHAR,venue VARCHAR)
SELECT opponent FROM table_name_20 WHERE venue = "jeonju"
count the number of patients whose age is less than 89 and item id is 50889?
CREATE TABLE diagnoses (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE procedures (subject_id text,hadm_id text,icd9_code text,short_title text,long_title text)CREATE TABLE demographic (subject_id text,hadm_id text,name text,marital_status text,age text,dob text,gender text,la...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "89" AND lab.itemid = "50889"
have diagnosed patient 030-34260 with s/p knee surgery - replacement during their first hospital encounter?
CREATE TABLE diagnosis (diagnosisid number,patientunitstayid number,diagnosisname text,diagnosistime time,icd9code text)CREATE TABLE patient (uniquepid text,patienthealthsystemstayid number,patientunitstayid number,gender text,age text,ethnicity text,hospitalid number,wardid number,admissionheight number,admissionweigh...
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 = '030-34260' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.ho...
What years did the player with the jersey number bigger than 20 play?
CREATE TABLE table_name_5 (years VARCHAR,jersey_number_s_ INTEGER)
SELECT years FROM table_name_5 WHERE jersey_number_s_ > 20
an early flight on wednesday morning from BALTIMORE to NEWARK
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_number int,from_airport varchar,meal_code text,stops int,time_elapsed int,to_airport varchar)CREATE TABLE dual_carrier (ma...
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, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'NEWARK' AND date_day.day_number = 23 AND date_day.month_number = 4 AND d...
Can you draw the trend of the number of actual delivery date over the actual delivery date?, and order X-axis in descending order.
CREATE TABLE Bookings_Services (Order_ID INTEGER,Product_ID INTEGER)CREATE TABLE Customer_Orders (Order_ID INTEGER,Customer_ID INTEGER,Store_ID INTEGER,Order_Date DATETIME,Planned_Delivery_Date DATETIME,Actual_Delivery_Date DATETIME,Other_Order_Details VARCHAR(255))CREATE TABLE Performers (Performer_ID INTEGER,Address_...
SELECT Actual_Delivery_Date, COUNT(Actual_Delivery_Date) FROM Bookings ORDER BY Actual_Delivery_Date DESC
Which courses for the PreMajor requirement are there in Mechanical Behavior of Materials ?
CREATE TABLE requirement (requirement_id int,requirement varchar,college varchar)CREATE TABLE ta (campus_job_id int,student_id int,location varchar)CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE gsi (course_offering_id int,student_id int)CREATE TABLE...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Mechanical Behavior of Materials%' OR course.description LIKE '%Mechanical Behavior of Materials...
Are ULCS classes available next Winter ?
CREATE TABLE program_requirement (program_id int,category varchar,min_credit int,additional_req varchar)CREATE TABLE semester (semester_id int,semester varchar,year int)CREATE TABLE area (course_id int,area varchar)CREATE TABLE offering_instructor (offering_instructor_id int,offering_id int,instructor_id int)CREATE TAB...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_cour...
What is the latest in March when the record of 35 16 6 3?
CREATE TABLE table_37876 ("Game" real,"March" real,"Opponent" text,"Score" text,"Record" text,"Points" real)
SELECT MAX("March") FROM table_37876 WHERE "Record" = '35–16–6–3'