|
<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> at 459 feet , the schiesinger building is the fourth largest building in johannesburg</h3> |
|
<h3>Input Table: list of tallest buildings in africa</h3> |
|
<div class="step"> |
|
<div class="step"> |
|
<div class="step-title">Step 1: Order the table by 'feet' in descending order.</div> |
|
<div id="step-1" class="content"> |
|
<table> |
|
<tr> |
|
<td>name</td> |
|
<td>city</td> |
|
<td>years_as_tallest</td> |
|
<td>metres</td> |
|
<td>feet</td> |
|
<td>floors</td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">carlton centre</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">johannesburg</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">1973-01-01 - present</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">223.0</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">732</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">50</span></td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">kwadukuza egoli hotel tower 1 , trust bank building</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">johannesburg</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">1970-01-01 - 1973-01-01</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">140.0</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">459</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">31</span></td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">standard bank building</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">johannesburg</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">1968-01-01 - 1970-01-01</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">138.8</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">455</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">34</span></td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">schlesinger building</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">johannesburg</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-01-01</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">110.0</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">361</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">21</span></td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">naspers centre</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">cape town</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-01-01</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">93.0</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">205</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">22</span></td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">mutual heights building</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">cape town</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">1940-01-01 - 1962-01-01</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">91.0</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">298</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">18</span></td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">chamber of mines building</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">johannesburg</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">1936-01-01 - 1940-01-01</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">80.0</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">262</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">18</span></td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">union buildings</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">pretoria</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">1913-01-01 - 1936-01-01</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">60.0</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">196</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">10</span></td> |
|
</tr> |
|
</table> |
|
</div> |
|
<hr> |
|
<div class="step"> |
|
<div class="step-title">Step 2: Select row number 4.</div> |
|
<div id="step-0" class="content"> |
|
<table> |
|
<tr> |
|
<td>name</td> |
|
<td>city</td> |
|
<td>years_as_tallest</td> |
|
<td>metres</td> |
|
<td>feet</td> |
|
<td>floors</td> |
|
</tr> |
|
<tr> |
|
<td>carlton centre</td> |
|
<td>johannesburg</td> |
|
<td>1973-01-01 - present</td> |
|
<td>223.0</td> |
|
<td>732</td> |
|
<td>50</td> |
|
</tr> |
|
<tr> |
|
<td>kwadukuza egoli hotel tower 1 , trust bank building</td> |
|
<td>johannesburg</td> |
|
<td>1970-01-01 - 1973-01-01</td> |
|
<td>140.0</td> |
|
<td>459</td> |
|
<td>31</td> |
|
</tr> |
|
<tr> |
|
<td>standard bank building</td> |
|
<td>johannesburg</td> |
|
<td>1968-01-01 - 1970-01-01</td> |
|
<td>138.8</td> |
|
<td>455</td> |
|
<td>34</td> |
|
</tr> |
|
<tr> |
|
<td>schlesinger building</td> |
|
<td>johannesburg</td> |
|
<td>9999-01-01</td> |
|
<td>110.0</td> |
|
<td>361</td> |
|
<td>21</td> |
|
</tr> |
|
<tr> |
|
<td>mutual heights building</td> |
|
<td>cape town</td> |
|
<td>1940-01-01 - 1962-01-01</td> |
|
<td>91.0</td> |
|
<td>298</td> |
|
<td>18</td> |
|
</tr> |
|
<tr> |
|
<td>chamber of mines building</td> |
|
<td>johannesburg</td> |
|
<td>1936-01-01 - 1940-01-01</td> |
|
<td>80.0</td> |
|
<td>262</td> |
|
<td>18</td> |
|
</tr> |
|
<tr> |
|
<td>naspers centre</td> |
|
<td>cape town</td> |
|
<td>9999-01-01</td> |
|
<td>93.0</td> |
|
<td>205</td> |
|
<td>22</td> |
|
</tr> |
|
<tr> |
|
<td>union buildings</td> |
|
<td>pretoria</td> |
|
<td>1913-01-01 - 1936-01-01</td> |
|
<td>60.0</td> |
|
<td>196</td> |
|
<td>10</td> |
|
</tr> |
|
</table> |
|
</div> |
|
</div> |
|
<hr> |
|
<div class="step"> |
|
<div class="step-title">Step 3: Select rows where 'name' is 'schlesinger building' and 'city' is 'johannesburg'.</div> |
|
<div id="step-1" class="content"> |
|
<table> |
|
<tr> |
|
<td>name</td> |
|
<td>city</td> |
|
<td>years_as_tallest</td> |
|
<td>metres</td> |
|
<td>feet</td> |
|
<td>floors</td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">schlesinger building</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">johannesburg</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">9999-01-01</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">110.0</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">361</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">21</span></td> |
|
</tr> |
|
</table> |
|
</div> |
|
</div> |
|
<hr> |
|
<div class="step"> |
|
<div class="step-title">Step 4: Use a `CASE` statement to return TRUE if the number of rows is equal to 1, otherwise return FALSE.</div> |
|
<div id="step-2" class="content"> |
|
<table> |
|
<tr> |
|
<td>name</td> |
|
<td>city</td> |
|
<td>years_as_tallest</td> |
|
<td>metres</td> |
|
<td>feet</td> |
|
<td>floors</td> |
|
</tr> |
|
<tr> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">schlesinger building</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">johannesburg</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">9999-01-01</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">110.0</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">361</span></td> |
|
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">21</span></td> |
|
</tr> |
|
</table> |
|
</div> |
|
</div> |
|
<hr> |
|
<table> |
|
<tr> |
|
<td>verification_result</td> |
|
</tr> |
|
<tr> |
|
<td>TRUE</td> |
|
</tr> |
|
</table> |
|
</div> |
|
</div> |
|
<hr> |
|
<h3>Prediction:</span> TRUE</h3> |
|
</body></html> |
|
|