|
<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> |
|
<h1 class="pos-title">Plan-of-SQLs (Ours)</h1> |
|
<hr> |
|
<h3><span>Statement:</span> when the indianapolis colts were the visiting team at giants stadium , the final score was 26 - 21</h3> |
|
<h3>Ground-truth:</span> TRUE</h3> |
|
<h3>Input Table: nbc sunday night football results (2006 - present)</h3> |
|
<div class="step"> |
|
<div class="step"> |
|
<div class="step-title">Step 1: Select rows where 'visiting_team' is 'indianapolis colts'.</div> |
|
<div id="step-1" class="content"> |
|
<table> |
|
<tr> |
|
<td>date</td> |
|
<td>visiting_team</td> |
|
<td>final_score</td> |
|
<td>host_team</td> |
|
<td>stadium</td> |
|
</tr> |
|
<tr> |
|
<td>9999-09-07</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">miami dolphins</span></td> |
|
<td>17 - 28</td> |
|
<td>pittsburgh steelers</td> |
|
<td>heinz field</td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-09-10</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">indianapolis colts</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">26 - 21</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">new york giants</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">giants stadium</span></td> |
|
</tr> |
|
<tr> |
|
<td>9999-09-17</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">washington redskins</span></td> |
|
<td>10 - 27</td> |
|
<td>dallas cowboys</td> |
|
<td>texas stadium</td> |
|
</tr> |
|
<tr> |
|
<td>9999-09-24</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">denver broncos</span></td> |
|
<td>17 - 7</td> |
|
<td>new england patriots</td> |
|
<td>gillette stadium</td> |
|
</tr> |
|
<tr> |
|
<td>9999-10-01</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">seattle seahawks</span></td> |
|
<td>6 - 37</td> |
|
<td>chicago bears</td> |
|
<td>soldier field</td> |
|
</tr> |
|
<tr> |
|
<td>9999-10-08</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">pittsburgh steelers</span></td> |
|
<td>13 - 23</td> |
|
<td>san diego chargers</td> |
|
<td>qualcomm stadium</td> |
|
</tr> |
|
<tr> |
|
<td>9999-10-15</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">oakland raiders</span></td> |
|
<td>3 - 13</td> |
|
<td>denver broncos</td> |
|
<td>invesco field at mile high</td> |
|
</tr> |
|
<tr> |
|
<td>9999-10-29</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">dallas cowboys</span></td> |
|
<td>35 - 14</td> |
|
<td>carolina panthers</td> |
|
<td>bank of america stadium</td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-11-05</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">indianapolis colts</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">27 - 20</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">new england patriots</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">gillette stadium</span></td> |
|
</tr> |
|
<tr> |
|
<td>9999-11-12</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">chicago bears</span></td> |
|
<td>38 - 20</td> |
|
<td>new york giants</td> |
|
<td>giants stadium</td> |
|
</tr> |
|
<tr> |
|
<td>9999-11-19</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">san diego chargers</span></td> |
|
<td>35 - 27</td> |
|
<td>denver broncos</td> |
|
<td>invesco field at mile high</td> |
|
</tr> |
|
<tr> |
|
<td>9999-11-26</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">philadelphia eagles</span></td> |
|
<td>21 - 45</td> |
|
<td>indianapolis colts</td> |
|
<td>rca dome</td> |
|
</tr> |
|
<tr> |
|
<td>9999-12-03</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">seattle seahawks</span></td> |
|
<td>23 - 20</td> |
|
<td>denver broncos</td> |
|
<td>invesco field at mile high</td> |
|
</tr> |
|
<tr> |
|
<td>9999-12-10</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">new orleans saints</span></td> |
|
<td>42 - 17</td> |
|
<td>dallas cowboys</td> |
|
<td>texas stadium</td> |
|
</tr> |
|
<tr> |
|
<td>9999-12-17</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">kansas city chiefs</span></td> |
|
<td>9 - 20</td> |
|
<td>san diego chargers</td> |
|
<td>qualcomm stadium</td> |
|
</tr> |
|
<tr> |
|
<td>9999-12-25</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">philadelphia eagles</span></td> |
|
<td>23 - 7</td> |
|
<td>dallas cowboys</td> |
|
<td>texas stadium</td> |
|
</tr> |
|
<tr> |
|
<td>9999-12-31</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">green bay packers</span></td> |
|
<td>26 - 7</td> |
|
<td>chicago bears</td> |
|
<td>soldier field</td> |
|
</tr> |
|
<tr> |
|
<td>0001-01-06</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">kansas city chiefs</span></td> |
|
<td>8 - 23</td> |
|
<td>indianapolis colts</td> |
|
<td>rca dome</td> |
|
</tr> |
|
<tr> |
|
<td>0001-01-06</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">dallas cowboys</span></td> |
|
<td>20 - 21</td> |
|
<td>seattle seahawks</td> |
|
<td>qwest field</td> |
|
</tr> |
|
</table> |
|
</div> |
|
<hr> |
|
<div class="step"> |
|
<div class="step-title">Step 2: Select rows where 'host_team' is 'new york giants'.</div> |
|
<div id="step-0" class="content"> |
|
<table> |
|
<tr> |
|
<td>date</td> |
|
<td>visiting_team</td> |
|
<td>final_score</td> |
|
<td>host_team</td> |
|
<td>stadium</td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-09-10</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">indianapolis colts</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">26 - 21</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">new york giants</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">giants stadium</span></td> |
|
</tr> |
|
<tr> |
|
<td>9999-11-05</td> |
|
<td>indianapolis colts</td> |
|
<td>27 - 20</td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">new england patriots</span></td> |
|
<td>gillette stadium</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 1, otherwise return FALSE.</div> |
|
<div id="step-1" class="content"> |
|
<table> |
|
<tr> |
|
<td>date</td> |
|
<td>visiting_team</td> |
|
<td>final_score</td> |
|
<td>host_team</td> |
|
<td>stadium</td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">9999-09-10</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">indianapolis colts</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">26 - 21</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">new york giants</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">giants stadium</span></td> |
|
</tr> |
|
</table> |
|
</div> |
|
</div> |
|
<hr> |
|
<div class="step"> |
|
<div class="step-title">Final output table:</div> |
|
<div id="step-2" class="content"> |
|
<table> |
|
<tr> |
|
<td>verification_result</td> |
|
</tr> |
|
<tr> |
|
<td>TRUE</td> |
|
</tr> |
|
</table> |
|
</div> |
|
</div> |
|
<hr> |
|
<div class="step"><h3><span class="true">Prediction: TRUE </span></h3> |
|
<h3>Ground-truth:</span> TRUE</h3></div> |
|
</body></html> |
|
|