sql
stringlengths 9
2.37k
| table
stringclasses 9
values | query
stringlengths 51
503
|
|---|---|---|
SELECT MIN(crowd) FROM table_name_23 WHERE home_team = "geelong"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
When the Home team of geelong played what was their lowest Crowd number?It is not neccessary to use all the tables.
|
SELECT College FROM table WHERE Overall < 344 AND Name = jerry hackenbruck
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What college did jerry hackenbruck come from who had an overall pick less than 344?.It is not neccessary to use all the tables.
|
SELECT AVG(s_no) FROM table_name_10 WHERE opponent = "sri lanka"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
what is the number of people in sri lankaIt is not neccessary to use all the tables.
|
SELECT City FROM table WHERE # of Titles < 17 AND Last > 2005 AND Sport = boys basketball
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What city is the school that had less than 17 titles in boys basketball with the last title being after 2005?.It is not neccessary to use all the tables.
|
SELECT Type FROM table WHERE Nickname = Tigers
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the type of the school whose students' nickname is tigers?.It is not neccessary to use all the tables.
|
SELECT 1 AS st__m_ FROM table_14407512_4 WHERE nationality = "FIN"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What was the length of the jumper representing FIN in meters?It is not neccessary to use all the tables.
|
SELECT Date FROM table WHERE Venue = mcg
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What date did VFL play MCG?.It is not neccessary to use all the tables.
|
SELECT SUM Snatch FROM table WHERE Total (kg) < 257
|
CREATE TABLE INST, Here is a database schema( table schema);
|
How much Snatch has a Total (kg) smaller than 257?.It is not neccessary to use all the tables.
|
SELECT MAX("Founded") FROM table_23271 WHERE "Location" = 'Springfield, Massachusetts'
|
CREATE TABLE INST, Here is a database schema( table schema);
|
When was the school in Springfield, Massachusetts founded?It is not neccessary to use all the tables.
|
SELECT Engine FROM table WHERE Entrant = garvey team lotus
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What engine does Garvey Team Lotus use?.It is not neccessary to use all the tables.
|
SELECT Winning driver FROM table WHERE Winning car = march - honda 86j AND Winning team = team nova
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who was the winning driver driving the winning car March - Honda 86j, with the winning team Team Nova?.It is not neccessary to use all the tables.
|
SELECT Original airdate FROM table WHERE Written by = Howard Ostroff
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Name the airdate for the episode written by howard ostroff.It is not neccessary to use all the tables.
|
SELECT MIN(touchdowns) FROM table_name_88 WHERE player = "total" AND field_goals > 0
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the smallest amount of touchdowns when there is a total player and a number of field goals of more than 0?It is not neccessary to use all the tables.
|
SELECT subject FROM table_name_35 WHERE year = "2007"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who was the subject for the year of 2007?It is not neccessary to use all the tables.
|
SELECT Artist 2 FROM table WHERE Artist 1 = Sparfunk & D-Code
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who is the artist 2 on the setlist where the artist 1 is Sparfunk & D-Code?.It is not neccessary to use all the tables.
|
SELECT AVG(year) FROM table_name_92 WHERE result = "nominated" AND film_series = "thirst" AND award = "best actress" AND group = "baeksang arts awards"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the average year in which Kim was nominated for Thirst as Best Actress at the Baeksang Arts Awards?It is not neccessary to use all the tables.
|
SELECT Largest ethnic group (2002) FROM table WHERE Cyrillic Name = Брестач
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the largest ethnic group (2002) when cyrillic name is брестач?.It is not neccessary to use all the tables.
|
SELECT MAX Series # FROM table WHERE Directed by = Laura Innes AND Season # < 7.0
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the maximum series number what is smaller than season 7.0 and directed by Laura Innes?.It is not neccessary to use all the tables.
|
SELECT missing FROM table_name_89 WHERE killed = "0 off 0 men" AND wounded = "0 off 0 men" AND unit = "royal waggon train"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
How many of the Royal Waggon Train Unit were Missing while having a Killed of 0 off 0 men and a Wounded of 0 off 0 men?It is not neccessary to use all the tables.
|
SELECT Wins FROM table WHERE Class = 500cc AND Year < 1975
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Which Wins have a Class of 500cc, and a Year smaller than 1975?.It is not neccessary to use all the tables.
|
SELECT MIN(dynamo) FROM table_name_12 WHERE spartak > 9 AND competition = "totals" AND draw > 24
|
CREATE TABLE INST, Here is a database schema( table schema);
|
what is the least dynamo when spartak is more than 9 competition is totals and draw is more than 24?It is not neccessary to use all the tables.
|
SELECT builder FROM table_name_49 WHERE ship = "zeehond"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
The Zeehond was built by whom?It is not neccessary to use all the tables.
|
SELECT COUNT(*) FROM matches WHERE YEAR = 2013 OR YEAR = 2016
|
CREATE TABLE INST, Here is a database schema( table schema);
|
List the number of all matches who played in years of 2013 or 2016.It is not neccessary to use all the tables.
|
SELECT MIN Goals Scored FROM table WHERE Place > 8 AND Lost < 8
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Name the least goals scored with place more than 8 and lost less than 8.It is not neccessary to use all the tables.
|
SELECT MIN Top-5 FROM table WHERE Cuts made = 10 AND Events > 10
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Which Top-5 is the lowest one that has Cuts made of 10, and Events larger than 10?.It is not neccessary to use all the tables.
|
SELECT Home team score FROM table WHERE Away team = north melbourne
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the home team score that played the away team of north melbourne?.It is not neccessary to use all the tables.
|
SELECT Location FROM table WHERE Home team = japan
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What was the location of the home game for Japan?.It is not neccessary to use all the tables.
|
SELECT Week 1 FROM table WHERE Week 2 = piia jarkko
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who was the week 1 nomination when the week 2 nomination was Piia Jarkko?.It is not neccessary to use all the tables.
|
SELECT MIN("Races") FROM table_23225 WHERE "Position" = '14th'
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What was the number of races in the season in which the team placed on the 14th position?It is not neccessary to use all the tables.
|
SELECT COUNT Top 10 FROM table WHERE Winnings = $80,490
|
CREATE TABLE INST, Here is a database schema( table schema);
|
How many top 10s did he have the year he won $80,490?.It is not neccessary to use all the tables.
|
SELECT Name FROM table WHERE Qual 1 = 1:26.056
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What was the Name of the person with a Qual 1 of 1:26.056?.It is not neccessary to use all the tables.
|
SELECT SUM(height__m_) FROM table_name_22 WHERE height__ft_ < 380.6
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the total height in meters for the building that has a less than 380.6 feet height?It is not neccessary to use all the tables.
|
SELECT AVG(year) FROM table_name_37 WHERE engine = "cosworth v8"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What year did the Cosworth v8 engine participate in?It is not neccessary to use all the tables.
|
SELECT Years in Orlando FROM table WHERE Player = Chris Corchiani
|
CREATE TABLE INST, Here is a database schema( table schema);
|
During what years did Chris Corchiani play in Orlando?.It is not neccessary to use all the tables.
|
SELECT No. in series FROM table WHERE Title = "Never the Bride"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What number episode in the series was titled "Never the Bride"?.It is not neccessary to use all the tables.
|
SELECT Overall FROM table WHERE Pick = 17
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the Overall number for pick 17?.It is not neccessary to use all the tables.
|
SELECT notes FROM table_name_74 WHERE country = "zimbabwe"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What are the notes for Zimbabwe?It is not neccessary to use all the tables.
|
SELECT COUNT Winner FROM table WHERE Stage = 5
|
CREATE TABLE INST, Here is a database schema( table schema);
|
How many winners were there for stage 5?.It is not neccessary to use all the tables.
|
SELECT Event FROM table WHERE Record = 4-0
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Which event led to a 4-0 record?.It is not neccessary to use all the tables.
|
SELECT COUNT(nation) FROM table_19312274_3 WHERE name = "FMS International"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
How many nations do the FMS international team represent?It is not neccessary to use all the tables.
|
SELECT Unemployment Rate FROM table WHERE County = Wayne
|
CREATE TABLE INST, Here is a database schema( table schema);
|
what is the unemployment rate for wayne county?.It is not neccessary to use all the tables.
|
SELECT player FROM table_name_84 WHERE long > 8 AND yards = "73"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who has greater than 8 Long and a 73 Yards?It is not neccessary to use all the tables.
|
SELECT COUNT Crowd FROM table WHERE Home team = carlton
|
CREATE TABLE INST, Here is a database schema( table schema);
|
How large was the crowd at Carlton's home game?.It is not neccessary to use all the tables.
|
SELECT player FROM table_2897457_2 WHERE college_junior_club_team = "Cornell University (NCAA)"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What player came from Cornell University (NCAA)?It is not neccessary to use all the tables.
|
SELECT Written by FROM table WHERE Directed by = David Straiton
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who wrote the episodes directed by David Straiton?.It is not neccessary to use all the tables.
|
SELECT MAX(runs_conceded) FROM table_15700367_4
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Name the most runs concededIt is not neccessary to use all the tables.
|
SELECT record FROM table_name_56 WHERE visitor = "st. louis"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the record when St. Louis is the visitor?It is not neccessary to use all the tables.
|
SELECT "year" FROM table_203_339 WHERE "led" = (SELECT MIN("led") FROM table_203_339)
|
CREATE TABLE INST, Here is a database schema( table schema);
|
in which years did he lead the race the least ?It is not neccessary to use all the tables.
|
SELECT COUNT Long FROM table WHERE Loss = 0 AND Gain < 17 AND Avg/G > 0 AND Name = dubose, e.
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the total number of long Dubose, E., who had 0 losses, a gain less than 17, and an avg/g bigger than 0, had?.It is not neccessary to use all the tables.
|
SELECT vacator FROM table_2417330_4 WHERE district = "Kentucky 2nd"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Name the vacator for kentucky 2ndIt is not neccessary to use all the tables.
|
SELECT team FROM table_name_95 WHERE replaced_by = "mark mcghee"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
I want the team for replaced by mark mcgheeIt is not neccessary to use all the tables.
|
SELECT artist FROM table_name_32 WHERE week = "top 6"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Which Artist is listed as having Top 6 in WeekIt is not neccessary to use all the tables.
|
SELECT constructor FROM table_name_71 WHERE driver = "shinji nakano"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Which constructor had Shinji Nakano as a driver?It is not neccessary to use all the tables.
|
SELECT D 42 O FROM table WHERE R 53 + = r 8
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the value of D 42 O that has an R 53 + value of r 8?.It is not neccessary to use all the tables.
|
SELECT Home team FROM table WHERE Away team score = 8.7 (55)
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who was the home team when the away team scored 8.7 (55)?.It is not neccessary to use all the tables.
|
SELECT Bullet FROM table WHERE Shoulder = 12.5 (.491)
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What bullet does the gun with a shoulder measurement of 12.5 (.491)?.It is not neccessary to use all the tables.
|
SELECT COUNT(yards) FROM table_name_6 WHERE player = "james macpherson" AND long < 1
|
CREATE TABLE INST, Here is a database schema( table schema);
|
How many yards have a Player of james macpherson and a Long smaller than 1?It is not neccessary to use all the tables.
|
SELECT COUNT Silver FROM table WHERE Bronze = 2 AND Sport = volleyball
|
CREATE TABLE INST, Here is a database schema( table schema);
|
When volleyball has 2 bronze, what is the total number of silver?.It is not neccessary to use all the tables.
|
SELECT Organized FROM table WHERE Stake President = henry john platt
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the organized section when the stake president was henry john platt?.It is not neccessary to use all the tables.
|
SELECT Term in office FROM table WHERE Party = liberal AND State = sa AND Member = ian mclachlan
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Name the term in office for liberal and state of sa for ian mclachlan.It is not neccessary to use all the tables.
|
SELECT score FROM table_name_9 WHERE player = "bob murphy"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is Score when Player is "Bob Murphy"?It is not neccessary to use all the tables.
|
SELECT COUNT Directed by FROM table WHERE Written by = John Callaghan
|
CREATE TABLE INST, Here is a database schema( table schema);
|
what is the total number of films directy and written by john callaghan?.It is not neccessary to use all the tables.
|
SELECT Position FROM table WHERE Player = Marc Parenteau
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is Marc Parenteau's position? .It is not neccessary to use all the tables.
|
SELECT COUNT("Total") FROM table_79048 WHERE "Year(s) won" = '1986' AND "To par" > '6'
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the total for 1986 with a to par higher than 6?It is not neccessary to use all the tables.
|
SELECT Streak FROM table WHERE Attendance = 33,013
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Which streak had an attendance of 33,013?.It is not neccessary to use all the tables.
|
SELECT MAX(first_elected) FROM table_1341690_18 WHERE candidates = "Otto Passman (D) Unopposed"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What year was Otto Passman (d) unopposed first elected?It is not neccessary to use all the tables.
|
SELECT City of license FROM table WHERE Identifier = cbon-fm-11
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What city of license has cbon-fm-11 as the identifier?.It is not neccessary to use all the tables.
|
SELECT Stepping FROM table WHERE Release Date = june 5, 2007
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the stepping for the processor released June 5, 2007?.It is not neccessary to use all the tables.
|
SELECT demographic.days_stay FROM demographic WHERE demographic.subject_id = "22999"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
for how many days was the patient with patient id 22999 hospitalized?It is not neccessary to use all the tables.
|
SELECT date FROM table_name_21 WHERE tournament = "alcobaça" AND score = "6–3, 2–6, 7–5"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What day was the score for tournament of alcobaça 6–3 2–6 7–5?It is not neccessary to use all the tables.
|
SELECT Elevated FROM table WHERE Order = cardinal-bishop
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What's listed for the Elevated category that has an Order of Cardinal-Bishop?.It is not neccessary to use all the tables.
|
SELECT Schwaben FROM table WHERE Oberbayern A = Wacker Burghausen
|
CREATE TABLE INST, Here is a database schema( table schema);
|
When wacker burghausen is the oberbayern a what is the schwaben?.It is not neccessary to use all the tables.
|
SELECT MIN Matches FROM table WHERE Not Out = 44
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Name the least matches for not out being 44.It is not neccessary to use all the tables.
|
SELECT republican_ticket FROM table_name_63 WHERE workers_ticket = "edward lindgren"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the name on the Republican ticket when the Workers ticket is edward lindgren?It is not neccessary to use all the tables.
|
SELECT model FROM table_17157367_1 WHERE method = "HA"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
what is the model where the method is ha?It is not neccessary to use all the tables.
|
SELECT Champion FROM table WHERE Runner-up = Scott Davis Chris Dunk
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who was the champion in the tournament where Scott Davis Chris Dunk was the runner up?.It is not neccessary to use all the tables.
|
SELECT Loss FROM table WHERE Opponent = rangers AND Attendance > 43,211
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What was the Loss when the opponent was the Rangers and the attendance was greater than 43,211?.It is not neccessary to use all the tables.
|
SELECT opponent FROM table_name_72 WHERE player < 113 AND event = 2011
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who was the opponent in the 2011 event with less than 113 players?It is not neccessary to use all the tables.
|
SELECT DISTINCT paper.paperid FROM paper, venue WHERE venue.venueid = paper.venueid AND venue.venuename = 'NIPS'
|
CREATE TABLE INST, Here is a database schema( table schema);
|
what papers did NIPS publish ?It is not neccessary to use all the tables.
|
SELECT Venue FROM table WHERE Away team score = 16.12 (108)
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Which venue had an away team score of 16.12 (108)?.It is not neccessary to use all the tables.
|
SELECT engine configuration FROM table WHERE engine name = 1.2 mpi
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the engine configuration of the 1.2 mpi engine?.It is not neccessary to use all the tables.
|
SELECT COUNT Wins FROM table WHERE Top-25 = 10 AND Events < 26
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Name the total number of wins with top-25 of 10 and events less than 26.It is not neccessary to use all the tables.
|
SELECT MIN(no) FROM table_28348757_3 WHERE production_code = "XLE02007"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Name the least number for xle02007It is not neccessary to use all the tables.
|
SELECT MAX(bronze) FROM table_name_46 WHERE silver > 1 AND rank > 1
|
CREATE TABLE INST, Here is a database schema( table schema);
|
WHAT COUNTRY HAS THE HIGHEST BRONZE COUNT, MORE THAN 1 SILVER METAL, AND LESS THAN 1ST PLACE?It is not neccessary to use all the tables.
|
SELECT SUM Points 2 FROM table WHERE Drawn = 15 AND Position > 20 AND Goals For < 45
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Which Points 2 has Drawn of 15, a Position larger than 20, and a Goals For smaller than 45?.It is not neccessary to use all the tables.
|
SELECT Series FROM table WHERE Released by = itv studios AND Release Date = august 15, 2012
|
CREATE TABLE INST, Here is a database schema( table schema);
|
WHAT SERIES WAS RELEASED BY ITV STUDIOS AND A RELEASE DATE OF AUGUST 15, 2012?.It is not neccessary to use all the tables.
|
SELECT Opponents FROM table WHERE Surface = clay AND Score = 6–3, 7–6 (11–9)
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who were the opponent in the match on a clay surface that had a score of 6–3, 7–6 (11–9)?.It is not neccessary to use all the tables.
|
SELECT province_region FROM table_name_98 WHERE location = "cagayan de oro city"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Where is the Cagayan de Oro city located?It is not neccessary to use all the tables.
|
SELECT MIN(bronze) FROM table_name_7 WHERE gold > 4
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the smallest number of bronze medals with more than 4 gold medals?It is not neccessary to use all the tables.
|
SELECT COUNT Pick # FROM table WHERE Position = Linebacker
|
CREATE TABLE INST, Here is a database schema( table schema);
|
How many draft picks are there at the linebacker position?.It is not neccessary to use all the tables.
|
SELECT Candidate FROM table WHERE Riding = hochelaga
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who is the Candidate when the Riding is Hochelaga?.It is not neccessary to use all the tables.
|
SELECT AVG Draws FROM table WHERE Central Murray = leitchville gunbower AND Byes < 0
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the average number of draws of the central murray of leitchville gunbower, which has less than 0 byes?.It is not neccessary to use all the tables.
|
SELECT competition FROM table_name_68 WHERE result = "3-1"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Which competition with a result of 3-1?It is not neccessary to use all the tables.
|
SELECT tie_no FROM table_name_52 WHERE home_team = "brighton & hove albion"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
WHAT IS NO TIE FROM brighton & hove albion?It is not neccessary to use all the tables.
|
SELECT Original air date FROM table WHERE Title = "One Rat, One Ranger"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the original air date for "one rat, one ranger"?.It is not neccessary to use all the tables.
|
SELECT record FROM table_name_53 WHERE arena = "arrowhead pond of anaheim" AND loss = "bryzgalov (10–11–1)"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What is the record at Arrowhead Pond of Anaheim when the loss was Bryzgalov (10–11–1)?It is not neccessary to use all the tables.
|
SELECT H.L. Birkett FROM table WHERE W.H. Archer = R. Cochrane
|
CREATE TABLE INST, Here is a database schema( table schema);
|
Who is h.l birkett if w.h. archer is r. cochrane?.It is not neccessary to use all the tables.
|
SELECT 1 AS st_leg FROM table_name_14 WHERE team_2 = "leeds united"
|
CREATE TABLE INST, Here is a database schema( table schema);
|
What was the 1st leg for Team 2 Leeds United?It is not neccessary to use all the tables.
|
SELECT Capital FROM table WHERE Area (km 2 ) = 12,245.9
|
CREATE TABLE INST, Here is a database schema( table schema);
|
what's the capital with area (km 2 ) being 12,245.9.It is not neccessary to use all the tables.
|
SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 8562)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'admit wt' AND d_items.linksto = 'chartevents') AND DATETIME(chartevents.charttime, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-1 month') ORDER BY chartevents.charttime DESC LIMIT 1
|
CREATE TABLE INST, Here is a database schema( table schema);
|
how much did patient 8562 weigh last measured in the previous month?It is not neccessary to use all the tables.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.