sql
stringlengths
9
2.37k
table
stringclasses
9 values
query
stringlengths
51
503
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'thoracentesis')) AS t1 JOIN (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'mediastinoscopy')) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.charttime AND DATETIME(t1.charttime, 'start of month') = DATETIME(t2.charttime, 'start of month')
CREATE TABLE INST, Here is a database schema( table schema);
count the number of patients who have received an mediastinoscopy procedure in the same month after getting a thoracentesis procedure.It is not neccessary to use all the tables.
SELECT opponent_in_the_final FROM table_name_69 WHERE surface = "hard" AND score = "walkover"
CREATE TABLE INST, Here is a database schema( table schema);
For the tournament played on a hard surface and ending with a score of Walkover who was the Finals opponent?It is not neccessary to use all the tables.
SELECT AVG Goals FROM table WHERE Apps < 1
CREATE TABLE INST, Here is a database schema( table schema);
Which Goals have Apps smaller than 1?.It is not neccessary to use all the tables.
SELECT * FROM table_test_8 WHERE hypotension = 1 OR systolic_blood_pressure_sbp < 90
CREATE TABLE INST, Here is a database schema( table schema);
the subject has uncontrolled hypotension ( sbp < 90 mmhg ) .It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Surface = carpet (i) AND Outcome = winner AND Championship = rotterdam, netherlands
CREATE TABLE INST, Here is a database schema( table schema);
what is the score when the surface is carpet (i) outcome is winner and the championship is rotterdam, netherlands?.It is not neccessary to use all the tables.
SELECT tournament FROM table_name_4 WHERE week = "may 5"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Tournament on the Week of May 5?It is not neccessary to use all the tables.
SELECT CALLSIGN FROM table WHERE ICAO = aar
CREATE TABLE INST, Here is a database schema( table schema);
What is the callsign where the ICAO is AAR?.It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Game > 29 AND Record = 24-6
CREATE TABLE INST, Here is a database schema( table schema);
What score has a game greater than 29, with 24-6 as the record?.It is not neccessary to use all the tables.
SELECT almalı__qax_ FROM table_name_81 WHERE malax = "qaxingiloy"
CREATE TABLE INST, Here is a database schema( table schema);
What is the Almali village with the Malax village qaxingiloy?It is not neccessary to use all the tables.
SELECT Successor FROM table WHERE District = New York 11th
CREATE TABLE INST, Here is a database schema( table schema);
Who was the successor in New York 11th district?.It is not neccessary to use all the tables.
SELECT Party FROM table WHERE Incumbent = Tim Holden
CREATE TABLE INST, Here is a database schema( table schema);
Incumbent Tim Holden belonged to what party? .It is not neccessary to use all the tables.
SELECT title FROM table_2828803_1 WHERE directed_by = "Dennis Smith"
CREATE TABLE INST, Here is a database schema( table schema);
What is the name of the episode that was directed by Dennis Smith?It is not neccessary to use all the tables.
SELECT date FROM table_name_78 WHERE away_team = "morecambe"
CREATE TABLE INST, Here is a database schema( table schema);
What date was the away team Morecambe?It is not neccessary to use all the tables.
SELECT "Away" FROM table_41483 WHERE "Home" = 'toronto downtown dingos'
CREATE TABLE INST, Here is a database schema( table schema);
What away has toronto downtown dingos as the home?It is not neccessary to use all the tables.
SELECT SUM("Goals against") FROM table_8677 WHERE "Points" < '13' AND "Wins" < '3' AND "Goals for" < '15'
CREATE TABLE INST, Here is a database schema( table schema);
How many goals against were scored when the points were smaller than 13, the wins were smaller than 3, and the goals for were smaller than 15?It is not neccessary to use all the tables.
SELECT engine FROM table_name_29 WHERE model = "1600" AND years = "1975-84"
CREATE TABLE INST, Here is a database schema( table schema);
What engine with the years of 1975-84 has a model of 1600?It is not neccessary to use all the tables.
SELECT rank FROM table_name_44 WHERE gross = "$35,976,000"
CREATE TABLE INST, Here is a database schema( table schema);
What rank has a gross of $35976000?It is not neccessary to use all the tables.
SELECT Airport FROM table WHERE IATA = tbj
CREATE TABLE INST, Here is a database schema( table schema);
What is the airport when the iata is tbj?.It is not neccessary to use all the tables.
SELECT subdivision_name___ru____bgn_pcgn_ FROM table_290017_1 WHERE code = "BY-HR"
CREATE TABLE INST, Here is a database schema( table schema);
What subdivision names (RU) have a code of by-hr?It is not neccessary to use all the tables.
SELECT MIN Year built FROM table WHERE Last refurbished < 2013
CREATE TABLE INST, Here is a database schema( table schema);
What is the earliest year built for the ship refurbished earlier than 2013?.It is not neccessary to use all the tables.
SELECT AVG Game FROM table WHERE February > 20 AND Record = 41–17–4 AND Points < 86
CREATE TABLE INST, Here is a database schema( table schema);
Which Game is the average one that has a February larger than 20, and a Record of 41–17–4, and Points smaller than 86?.It is not neccessary to use all the tables.
SELECT FCC info FROM table WHERE ERP W > 92 AND Call sign = k264ba
CREATE TABLE INST, Here is a database schema( table schema);
What is FCC info when ERP W is larger than 92 and call sign has k264ba?.It is not neccessary to use all the tables.
SELECT MAX Goal Ratio FROM table WHERE Goals < 0
CREATE TABLE INST, Here is a database schema( table schema);
What is the largest goal ratio with Goals smaller than 0?.It is not neccessary to use all the tables.
SELECT State FROM table WHERE Total electricity (GW·h) = 38380
CREATE TABLE INST, Here is a database schema( table schema);
What was the state with the total electricity generated is 38380 gw-h?.It is not neccessary to use all the tables.
SELECT economics FROM table_145439_1 WHERE education = "92.0"
CREATE TABLE INST, Here is a database schema( table schema);
what's the economics score with education being 92.0It is not neccessary to use all the tables.
SELECT winner_and_score FROM table_name_43 WHERE semifinalists = "goran prpić sergi bruguera"
CREATE TABLE INST, Here is a database schema( table schema);
Who is the winner and score of the tournament with semifinalists goran prpić sergi bruguera?It is not neccessary to use all the tables.
SELECT Method FROM table WHERE Weight Class = welterweight AND Card = preliminary
CREATE TABLE INST, Here is a database schema( table schema);
Which method was used in the welterweight class with a preliminary card?.It is not neccessary to use all the tables.
SELECT score FROM table_name_64 WHERE competition = "2014 fifa world cup qualification (uefa)"
CREATE TABLE INST, Here is a database schema( table schema);
What was the score for the 2014 FIFA World Cup Qualification (UEFA)?It is not neccessary to use all the tables.
SELECT MAX 2007-03 FROM table WHERE 2011-03 < 11.4 AND Unemployment = luxembourg AND 2012-03 > 5
CREATE TABLE INST, Here is a database schema( table schema);
What is the highest 2007-03, when 2011-03 is less than 11.4, when Unemployment is Luxembourg, and when 2012-03 is greater than 5?.It is not neccessary to use all the tables.
SELECT institutional_authority FROM table_11869952_1 WHERE rocket_launch = "Rehbar-II"
CREATE TABLE INST, Here is a database schema( table schema);
Which authority has a rocket launch called rehbar-ii?It is not neccessary to use all the tables.
SELECT SUM Year FROM table WHERE Category = best improved singer (躍進歌手)
CREATE TABLE INST, Here is a database schema( table schema);
What was the total number of years than had best improved singer (躍進歌手)?.It is not neccessary to use all the tables.
SELECT score FROM table_name_16 WHERE visitor = "pacers" AND date = "14 april 2008"
CREATE TABLE INST, Here is a database schema( table schema);
Name the score for pacers visitor on 14 april 2008It is not neccessary to use all the tables.
SELECT location FROM table_name_89 WHERE opponent = "scott junk"
CREATE TABLE INST, Here is a database schema( table schema);
Where is the location where Scott Junk was the opponent?It is not neccessary to use all the tables.
SELECT Finalists FROM table WHERE Club = győri
CREATE TABLE INST, Here is a database schema( table schema);
Who Finalists has a Club of győri?.It is not neccessary to use all the tables.
SELECT replaced_by FROM table_name_68 WHERE date_of_vacancy = "23 february 2009"
CREATE TABLE INST, Here is a database schema( table schema);
What is Replaced By when Date of Vacancy is "23 February 2009"?It is not neccessary to use all the tables.
SELECT incumbent FROM table_1341453_37 WHERE first_elected = 1972
CREATE TABLE INST, Here is a database schema( table schema);
Which incumbent was first elected in 1972?It is not neccessary to use all the tables.
SELECT original_airdate FROM table_19517621_4 WHERE title = "The Transit of Venus"
CREATE TABLE INST, Here is a database schema( table schema);
What was the original air date for the episode Calle The Transit of Venus?It is not neccessary to use all the tables.
SELECT French title FROM table WHERE English title = "Papa Bramble's Secret"
CREATE TABLE INST, Here is a database schema( table schema);
What is the French title for "Papa Bramble's Secret"?.It is not neccessary to use all the tables.
SELECT SUM(crowd) FROM table_name_33 WHERE home_team = "essendon"
CREATE TABLE INST, Here is a database schema( table schema);
What is the sum of Crowd when Essendon was the home team?It is not neccessary to use all the tables.
SELECT points FROM table_13940275_5 WHERE played = "22" AND points_against = "319"
CREATE TABLE INST, Here is a database schema( table schema);
what's the points with played being 22 and points against being 319It is not neccessary to use all the tables.
SELECT Winning score FROM table WHERE Margin of victory = 2 strokes
CREATE TABLE INST, Here is a database schema( table schema);
What was the winning score with a margin victory of 2 strokes?.It is not neccessary to use all the tables.
SELECT MIN Att. FROM table WHERE Date = june 27
CREATE TABLE INST, Here is a database schema( table schema);
What was the attendance on June 27?.It is not neccessary to use all the tables.
SELECT Record FROM table WHERE Score = 122–105
CREATE TABLE INST, Here is a database schema( table schema);
Score of 122–105 had what record?.It is not neccessary to use all the tables.
SELECT status FROM table_name_58 WHERE name = "joon-hyung park 박준형"
CREATE TABLE INST, Here is a database schema( table schema);
What was the status of joon-hyung park 박준형?It is not neccessary to use all the tables.
SELECT bbm FROM table_19662262_6 WHERE strike_rate = "42.2"
CREATE TABLE INST, Here is a database schema( table schema);
What is the BBM when the strike rate is 42.2?It is not neccessary to use all the tables.
SELECT distinguished_service_cross FROM table_2104176_1 WHERE navy_cross = "Coast Guard Commendation Medal"
CREATE TABLE INST, Here is a database schema( table schema);
What is the distinguished service cross when the navy cross is Coast Guard commendation medal?It is not neccessary to use all the tables.
SELECT Capacity FROM table WHERE Team = Berwick Rangers
CREATE TABLE INST, Here is a database schema( table schema);
what's the capacity with team being berwick rangers.It is not neccessary to use all the tables.
SELECT Region FROM table WHERE Date = november 10, 2007 AND Format = cd
CREATE TABLE INST, Here is a database schema( table schema);
What's the region for an item on November 10, 2007 that's a cd?.It is not neccessary to use all the tables.
SELECT AVG Overall FROM table WHERE Pick < 20 AND College = north carolina AND Round < 8
CREATE TABLE INST, Here is a database schema( table schema);
What is the average overall that has a pick less than 20, North Carolina as the college, with a round less than 8?.It is not neccessary to use all the tables.
SELECT "Original air date" FROM table_29319 WHERE "U.S. viewers (million)" = '5.85'
CREATE TABLE INST, Here is a database schema( table schema);
What original air date has 5.85 u.s. viewers (million)?It is not neccessary to use all the tables.
SELECT format_s_ FROM table_name_28 WHERE region = "europe" AND catalog = "webb185"
CREATE TABLE INST, Here is a database schema( table schema);
Which formats have a region of Europe and Catalog value of WEBB185?It is not neccessary to use all the tables.
SELECT year FROM table_name_47 WHERE english_title = "the ocean"
CREATE TABLE INST, Here is a database schema( table schema);
What is the year for the ocean?It is not neccessary to use all the tables.
SELECT Opponents FROM table WHERE Surface = hard AND Outcome = runner-up
CREATE TABLE INST, Here is a database schema( table schema);
Who were the opponents in the match that was played on a hard court and had a runner-up outcome?.It is not neccessary to use all the tables.
SELECT Incumbent FROM table WHERE District = 20th
CREATE TABLE INST, Here is a database schema( table schema);
Who was the incumbent in the 20th district?.It is not neccessary to use all the tables.
SELECT album FROM table_name_94 WHERE year < 2005 AND label = "ministry of sound"
CREATE TABLE INST, Here is a database schema( table schema);
Which Album had a year less than 2005 with a Label by Ministry of Sound?It is not neccessary to use all the tables.
SELECT symbol FROM table WHERE empirical † = 190 AND Calculated = 135
CREATE TABLE INST, Here is a database schema( table schema);
What is the symbol of the element with an empirical t of 190 and a calculated value of 135?.It is not neccessary to use all the tables.
SELECT Winning constructor FROM table WHERE Fastest lap = mark webber AND Grand Prix = malaysian grand prix
CREATE TABLE INST, Here is a database schema( table schema);
Name the winning constructor for when the fastest lap was mark webber at the malaysian grand prix.It is not neccessary to use all the tables.
SELECT Score FROM table WHERE Place = t3
CREATE TABLE INST, Here is a database schema( table schema);
What is the Score of the T3 Place Player?.It is not neccessary to use all the tables.
SELECT COUNT Result FROM table WHERE Conference Record = 4-3
CREATE TABLE INST, Here is a database schema( table schema);
How many different results are there for the season with a 4-3 conference record?.It is not neccessary to use all the tables.
SELECT MIN # s Reservoir and GNIS query Link FROM table WHERE # s Lake and GNIS query Link = 60
CREATE TABLE INST, Here is a database schema( table schema);
Name the minimum number of reservoir for gnis query link where numbers lake gnis query link being 60.It is not neccessary to use all the tables.
SELECT Period in office FROM table WHERE Constituency contested = Aljunied GRC
CREATE TABLE INST, Here is a database schema( table schema);
What period were conscituency contested is aljunied grc?.It is not neccessary to use all the tables.
SELECT COUNT Rank FROM table WHERE Total > 19.42 AND Taijiquan < 9.87
CREATE TABLE INST, Here is a database schema( table schema);
What is the total rank of the athlete with a total larger than 19.42 and a taijiquan less than 9.87?.It is not neccessary to use all the tables.
SELECT opponent FROM table_name_3 WHERE result = "w20-0"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the opponent against which the result was w20-0?It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Team = Triple Eight Race Engineering AND Race Title = Falken Tasmania Challenge
CREATE TABLE INST, Here is a database schema( table schema);
What dates was the falken tasmania challenge race that had triple eight race engineering as the team?.It is not neccessary to use all the tables.
SELECT type FROM table_2562572_25 WHERE cyrillic_name_other_names = "Оџаци"
CREATE TABLE INST, Here is a database schema( table schema);
When оџаци is the cyrillic name other names what is the type?It is not neccessary to use all the tables.
SELECT starter FROM table_14342480_6 WHERE position = "Left end"
CREATE TABLE INST, Here is a database schema( table schema);
Name the starter for position being left endIt is not neccessary to use all the tables.
SELECT MAX("Production code") FROM table_72138 WHERE "US airdate" = '4 April 2008'
CREATE TABLE INST, Here is a database schema( table schema);
The U.S. airdate of 4 april 2008 had a production code of what?It is not neccessary to use all the tables.
SELECT directed___undirected FROM table_name_25 WHERE induced___non_induced = "induced" AND name = "fpf (mavisto)"
CREATE TABLE INST, Here is a database schema( table schema);
What is the directed/undirected of fpf (mavisto) which has an induced/non-induced of induced?It is not neccessary to use all the tables.
SELECT MIN Founded FROM table WHERE Institution = independence community college
CREATE TABLE INST, Here is a database schema( table schema);
What is independence community college's newest campus?.It is not neccessary to use all the tables.
SELECT SUM("Wins") FROM table_37661 WHERE "Win %" < '0.8270000000000001' AND "Name" = 'rick mirer' AND "Ties" < '1'
CREATE TABLE INST, Here is a database schema( table schema);
Which Wins have a Win % smaller than 0.8270000000000001, and a Name of rick mirer, and Ties smaller than 1?It is not neccessary to use all the tables.
SELECT COUNT Air date FROM table WHERE Eliminated = Morgan
CREATE TABLE INST, Here is a database schema( table schema);
How many air dates were there when Morgan was eliminated?.It is not neccessary to use all the tables.
SELECT score FROM table_name_3 WHERE competition = "friendly match" AND date = "24 july 2008"
CREATE TABLE INST, Here is a database schema( table schema);
What is the score of the friendly match competition on 24 July 2008?It is not neccessary to use all the tables.
SELECT Category FROM table WHERE Actor/Actress = al pacino AND Film title used in nomination = glengarry glen ross
CREATE TABLE INST, Here is a database schema( table schema);
What category was al pacino nominated for in the film, glengarry glen ross?.It is not neccessary to use all the tables.
SELECT away_team FROM table_name_28 WHERE attendance = "7,891"
CREATE TABLE INST, Here is a database schema( table schema);
Who was the away team when the attendance was 7891?It is not neccessary to use all the tables.
SELECT Opponent FROM table WHERE Event = pride 31
CREATE TABLE INST, Here is a database schema( table schema);
Who was the match against at the PRIDE 31 event?.It is not neccessary to use all the tables.
SELECT MIN(touchdowns) FROM table_25517718_3 WHERE player = "Boggs"
CREATE TABLE INST, Here is a database schema( table schema);
How many touchdowns does Boggs have?It is not neccessary to use all the tables.
SELECT COUNT Grid FROM table WHERE Time/Retired = +44.831
CREATE TABLE INST, Here is a database schema( table schema);
What's the total grid for someone with a time/retire of +44.831.It is not neccessary to use all the tables.
SELECT SUM(2010) FROM table_name_53 WHERE 2000 = 17 AND 2005 > 16
CREATE TABLE INST, Here is a database schema( table schema);
Name the sum of 2010 for 2000 of 17 and 2005 more than 16It is not neccessary to use all the tables.
SELECT Date FROM table WHERE Opponent in Final = guy forget
CREATE TABLE INST, Here is a database schema( table schema);
What is Date, when Opponent in Final is "Guy Forget"?.It is not neccessary to use all the tables.
SELECT Headquarter, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter DESC
CREATE TABLE INST, Here is a database schema( table schema);
For those records from the products and each product's manufacturer, give me the comparison about the sum of price over the headquarter , and group by attribute headquarter by a bar chart, order in descending by the bars.It is not neccessary to use all the tables.
SELECT Opponent FROM table WHERE Date = may 12
CREATE TABLE INST, Here is a database schema( table schema);
Who was the opponent that played on may 12?.It is not neccessary to use all the tables.
SELECT Work_Type, AVG(t1.Age) FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_ID = t2.journalist_ID GROUP BY t2.Work_Type ORDER BY AVG(t1.Age)
CREATE TABLE INST, Here is a database schema( table schema);
Find the average age of journalists working on different role type, show the result with a bar chart, sort y axis in ascending order.It is not neccessary to use all the tables.
SELECT MIN(year) FROM table_name_99 WHERE rank < 132 AND name = "biodiversity richness"
CREATE TABLE INST, Here is a database schema( table schema);
Can you tell me the lowest Year that has the Rank smaller the 132 and the Name of biodiversity richness?It is not neccessary to use all the tables.
SELECT COUNT(release_date) FROM table_23981741_1 WHERE year = 1988 AND additional_rock_band_3_features = "None"
CREATE TABLE INST, Here is a database schema( table schema);
How many release dates are there for year of 1988 and additional rock band 3 features is none?It is not neccessary to use all the tables.
SELECT date FROM table_name_17 WHERE week < 11 AND attendance = "54,094"
CREATE TABLE INST, Here is a database schema( table schema);
Which Date has a Week smaller than 11 and a Attendance of 54094?It is not neccessary to use all the tables.
SELECT MIN Population FROM table WHERE Median family income = $74,905 AND Number of households < 145,790
CREATE TABLE INST, Here is a database schema( table schema);
Which Population is the lowest one that has a Median family income of $74,905, and a Number of households smaller than 145,790?.It is not neccessary to use all the tables.
SELECT Location FROM table WHERE Date = january 23, 2008
CREATE TABLE INST, Here is a database schema( table schema);
Where was the game played on January 23, 2008?.It is not neccessary to use all the tables.
SELECT Time FROM table WHERE Event = ifl: championship final
CREATE TABLE INST, Here is a database schema( table schema);
What's the time of IFL: Championship Final?.It is not neccessary to use all the tables.
SELECT COUNT Position FROM table WHERE Sales > 1,037,235 AND Song Title = have you ever
CREATE TABLE INST, Here is a database schema( table schema);
What position is the song Have You Ever with more than 1,037,235 in sales?.It is not neccessary to use all the tables.
SELECT sydney FROM table_2923917_4 WHERE distance = "10km"
CREATE TABLE INST, Here is a database schema( table schema);
How many dollars is listed under Sydney when the distance is 10km?It is not neccessary to use all the tables.
SELECT Nationality FROM table WHERE College/junior/club team = University of Michigan (NCAA)
CREATE TABLE INST, Here is a database schema( table schema);
What is the nationality of the player from the University of Michigan (NCAA)?.It is not neccessary to use all the tables.
SELECT lab.labname FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-12085')) AND DATETIME(lab.labresulttime) <= DATETIME(CURRENT_TIME(), '-38 month') ORDER BY lab.labresulttime LIMIT 1
CREATE TABLE INST, Here is a database schema( table schema);
tell me the name of the lab tests that patient 033-12085 first received until 38 months ago?It is not neccessary to use all the tables.
SELECT Total Female FROM table WHERE Qatari Female = 918
CREATE TABLE INST, Here is a database schema( table schema);
If the qatari female is 918, what is the total number of females?.It is not neccessary to use all the tables.
SELECT no FROM table_26745820_1 WHERE distance = "4168km"
CREATE TABLE INST, Here is a database schema( table schema);
what is the no when the distance is 4168km?It is not neccessary to use all the tables.
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'atrial fibrillation' AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-3 year')) AS t1) - (SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'atrial fibrillation' AND DATETIME(diagnosis.diagnosistime) >= DATETIME(CURRENT_TIME(), '-3 year')) AS t2 JOIN patient ON t2.uniquepid = patient.uniquepid WHERE t2.diagnosistime < patient.hospitaladmittime AND DATETIME(patient.hospitaladmittime) >= DATETIME(CURRENT_TIME(), '-3 year') AND DATETIME(t2.diagnosistime, 'start of month') = DATETIME(patient.hospitaladmittime, 'start of month'))
CREATE TABLE INST, Here is a database schema( table schema);
count the number of patients that have been diagnosed with atrial fibrillation but did not return to the hospital during the same month since 3 years ago.It is not neccessary to use all the tables.
SELECT Home team FROM table WHERE Tie no = 2
CREATE TABLE INST, Here is a database schema( table schema);
Who is the home team that tied no 2?.It is not neccessary to use all the tables.
SELECT democrat AS :_tom_harkin FROM table_name_77 WHERE poll_source = "rasmussen reports" AND lead_margin = 14
CREATE TABLE INST, Here is a database schema( table schema);
What was Democrat: Tom Harkin's percentage when the poll source was Rasmussen Reports and the lead margin was 14?It is not neccessary to use all the tables.
SELECT COUNT Episode number FROM table WHERE Audience share (average) = 10%
CREATE TABLE INST, Here is a database schema( table schema);
What episode number has an audience share of 10%?.It is not neccessary to use all the tables.
SELECT 2013 AS _index_of_economic_freedom FROM table_name_22 WHERE country = "slovenia"
CREATE TABLE INST, Here is a database schema( table schema);
What is the 2013 index of economic freedom of Slovenia?It is not neccessary to use all the tables.
SELECT high_rebounds FROM table_name_44 WHERE record = "18-14"
CREATE TABLE INST, Here is a database schema( table schema);
What is the high rebounds with a record that is 18-14?It is not neccessary to use all the tables.