luulinh90s's picture
update
8873a5c
raw
history blame
10.1 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; }
</style>
</head><body>
<hr>
<h3><span>Statement:</span> during the 2007 - 08 minnesota wild season , the match on february 12 and february 20 both had the same score</h3>
<h3>Input Table: 2007 - 08 minnesota wild season</h3>
<div class="step">
<div class="step">
<div class="step-title">Step 1: Select rows where the 'date' is '01-02-12' or '9999-02-20'.</div>
<div id="step-1" class="content">
<table>
<tr>
<td>date</td>
<td>visitor</td>
<td>score</td>
<td>home</td>
<td>decision</td>
<td>attendance</td>
<td>record</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">01-02-9999</span></td>
<td>minnesota</td>
<td>4 - 1</td>
<td>columbus</td>
<td>backstrom</td>
<td>18529</td>
<td>30 - 19 - 3</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-02-05</span></td>
<td>detroit</td>
<td>3 - 2</td>
<td>minnesota</td>
<td>backstrom</td>
<td>18568</td>
<td>30 - 19 - 4</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">01-02-07</span></td>
<td>dallas</td>
<td>1 - 0</td>
<td>minnesota</td>
<td>backstrom</td>
<td>18568</td>
<td>30 - 20 - 4</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-02-09</span></td>
<td>ny islanders</td>
<td>3 - 4</td>
<td>minnesota</td>
<td>backstrom</td>
<td>18568</td>
<td>31 - 20 - 4</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">01-02-10</span></td>
<td>minnesota</td>
<td>2 - 1</td>
<td>st louis</td>
<td>harding</td>
<td>16477</td>
<td>32 - 20 - 4</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">01-02-12</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">minnesota</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">2 - 4</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">edmonton</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">harding</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">16839</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">32 - 21 - 4</span></td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">01-02-14</span></td>
<td>minnesota</td>
<td>5 - 4</td>
<td>vancouver</td>
<td>backstrom</td>
<td>18630</td>
<td>33 - 21 - 4</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-02-17</span></td>
<td>nashville</td>
<td>4 - 5</td>
<td>minnesota</td>
<td>backstrom</td>
<td>18568</td>
<td>34 - 21 - 4</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-02-19</span></td>
<td>vancouver</td>
<td>3 - 2</td>
<td>minnesota</td>
<td>backstrom</td>
<td>18568</td>
<td>34 - 21 - 5</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">9999-02-20</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">minnesota</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">0 - 3</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">chicago</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">harding</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">17812</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">34 - 22 - 5</span></td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-02-24</span></td>
<td>calgary</td>
<td>2 - 1</td>
<td>minnesota</td>
<td>backstrom</td>
<td>18568</td>
<td>34 - 23 - 5</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-02-26</span></td>
<td>minnesota</td>
<td>1 - 4</td>
<td>washington</td>
<td>backstrom</td>
<td>17391</td>
<td>34 - 24 - 5</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-02-27</span></td>
<td>minnesota</td>
<td>3 - 2</td>
<td>tampa bay</td>
<td>backstrom</td>
<td>17211</td>
<td>35 - 24 - 5</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-02-29</span></td>
<td>minnesota</td>
<td>3 - 2</td>
<td>florida</td>
<td>backstrom</td>
<td>16927</td>
<td>36 - 24 - 5</td>
</tr>
</table>
</div>
<hr>
<div class="step">
<div class="step-title">Step 2: Select rows where the 'score' is '2 - 4' or '0 - 3'.</div>
<div id="step-0" class="content">
<table>
<tr>
<td>date</td>
<td>visitor</td>
<td>score</td>
<td>home</td>
<td>decision</td>
<td>attendance</td>
<td>record</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">01-02-12</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">minnesota</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">2 - 4</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">edmonton</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">harding</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">16839</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">32 - 21 - 4</span></td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-02-20</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">minnesota</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">0 - 3</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">chicago</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">harding</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">17812</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">34 - 22 - 5</span></td>
</tr>
</table>
</div>
</div>
<hr>
<div class="step">
<div class="step-title">Step 3: Use a `CASE` statement to return TRUE if the number of rows is equal to 2, otherwise return FALSE.</div>
<div id="step-1" class="content">
<table>
<tr>
<td>date</td>
<td>visitor</td>
<td>score</td>
<td>home</td>
<td>decision</td>
<td>attendance</td>
<td>record</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">01-02-12</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">minnesota</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">2 - 4</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">edmonton</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">harding</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">16839</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">32 - 21 - 4</span></td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">9999-02-20</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">minnesota</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">0 - 3</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">chicago</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">harding</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">17812</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">34 - 22 - 5</span></td>
</tr>
</table>
</div>
</div>
<hr>
<table>
<tr>
<td>verification_result</td>
</tr>
<tr>
<td>TRUE</td>
</tr>
</table>
</div>
</div>
<hr>
</body></html>