File size: 3,739 Bytes
68eb98f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41

<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> 25 - 26 january 2003 was the only game played in 2003</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 COUNT(*) = 1 THEN 'TRUE' 
        ELSE 'FALSE' 
    END 
FROM table_sql 
WHERE date BETWEEN '2003-01-25' AND '2003-01-26';</div>
</body></html>