luulinh90s's picture
update
72d281f
raw
history blame
3.8 kB
<html><head>
<style>
body { font-family: Arial, sans-serif; margin: 20px; }
h1 { text-align: center; }
.cot-title { color: blue; }
.pos-title { color: green; }
h2 { color: black; text-align: left; }
h3 { color: black; text-align: left; }
h4 { color: darkslategray; }
table { width: 100%; border-collapse: collapse; margin: 20px 0; }
table, th, td { border: 1px solid #ddd; padding: 8px; }
th { background-color: #f2f2f2; }
tr:nth-child(even) { background-color: #f9f9f9; }
.highlight { background-color: #ffffcc; }
.true { color: green; }
.false { color: red; }
.highlighted-cell { background-color: yellow; cursor: pointer; }
.step-title { background-color: #f1f1f1; color: #444; padding: 10px; margin: 10px 0; font-size: 18px; border-left: 4px solid #888; }
.step { display: block; }
.sql-command { background-color: #f0f0f0; padding: 10px; border-left: 4px solid #4CAF50; font-family: monospace; white-space: pre-wrap; }
</style>
</head><body>
<hr>
<h3><span>Statement:</span> seasons 2001 - 02 , 2002 - 03 and 2003 - 04 were in the limited format</h3>
<h3>Input Table: tsuyoshi fujita</h3>
<div class="step">
<table>
<tr><td>season</td><td>event_type</td><td>location</td><td>format</td><td>date</td><td>rank</td></tr><tr><td>1997 - 98</td><td>nationals</td><td>tokyo</td><td>special</td><td>1998-07-04</td><td>4</td></tr><tr><td>1998 - 99</td><td>grand prix</td><td>kyoto</td><td>limited</td><td>1999-01-16</td><td>4</td></tr><tr><td>1998 - 99</td><td>apac region championship</td><td>singapore</td><td>special</td><td>1999-03-27</td><td>3</td></tr><tr><td>1999 - 00</td><td>grand prix</td><td>taipei</td><td>extended</td><td>2000-02-12</td><td>2</td></tr><tr><td>2000 - 01</td><td>grand prix</td><td>kyoto</td><td>extended</td><td>2000-11-12</td><td>1</td></tr><tr><td>2000 - 01</td><td>grand prix</td><td>hiroshima</td><td>limited</td><td>2001-01-27</td><td>6</td></tr><tr><td>2000 - 01</td><td>pro tour</td><td>tokyo</td><td>block constructed</td><td>2001-03-16</td><td>2</td></tr><tr><td>2001 - 02</td><td>grand prix</td><td>hong kong</td><td>limited</td><td>2001-11-17</td><td>3</td></tr><tr><td>2001 - 02</td><td>masters</td><td>san diego</td><td>standard</td><td>2002-01-11</td><td>7</td></tr><tr><td>2001 - 02</td><td>grand prix</td><td>fukuoka</td><td>limited</td><td>2002-02-16</td><td>6</td></tr><tr><td>2001 - 02</td><td>grand prix</td><td>nagoya</td><td>team limited</td><td>2002-05-11</td><td>4</td></tr><tr><td>2002 - 03</td><td>grand prix</td><td>utsunomiya</td><td>limited</td><td>2002-10-12</td><td>3</td></tr><tr><td>2002 - 03</td><td>grand prix</td><td>hiroshima</td><td>extended</td><td>2003-01-25</td><td>7</td></tr><tr><td>2002 - 03</td><td>grand prix</td><td>bangkok</td><td>standard</td><td>2003-07-12</td><td>1</td></tr><tr><td>2003 - 04</td><td>nationals</td><td>osaka</td><td>special</td><td>2004-06-11</td><td>1</td></tr><tr><td>2003 - 04</td><td>grand prix</td><td>kuala lumpur</td><td>standard</td><td>2004-07-24</td><td>4</td></tr><tr><td>2005</td><td>grand prix</td><td>seattle</td><td>extended</td><td>2005-03-05</td><td>7</td></tr><tr><td>2005</td><td>invitational</td><td>los angeles</td><td>special</td><td>2005-05-17</td><td>2</td></tr><tr><td>2005</td><td>pro tour</td><td>london</td><td>booster draft</td><td>2005-07-08</td><td>2</td></tr><tr><td>2005</td><td>pro tour</td><td>los angeles</td><td>extended</td><td>2005-10-28</td><td>5</td></tr><tr><td>2011</td><td>pro tour</td><td>nagoya</td><td>block constructed and booster draft</td><td>2011-06-10</td><td>5</td></tr>
</table>
</div>
<h3>SQL Command:</h3>
<div class="sql-command">SELECT
CASE
WHEN (SELECT COUNT(*) FROM table_sql WHERE format = 'limited' AND season IN ('2001 - 02', '2002 - 03', '2003 - 04')) = 3
THEN 'TRUE'
ELSE 'FALSE'
END;</div>
</body></html>