luulinh90s's picture
add materials
fa53be0
raw
history blame
9.13 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> there is a four way tie for the most laps at 79 with a two way tie for the least amount at 5</h3>
<h3>Input Table: 1971 south african grand prix</h3>
<div class="step">
<div class="step">
<div class="step-title">Step 1: Select rows where 'laps' is 79.</div>
<div id="step-1" class="content">
<table>
<tr>
<td>driver</td>
<td>constructor</td>
<td>laps</td>
<td>time___retired</td>
<td>grid</td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">mario andretti</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">ferrari</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">79</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">1:47:35.5</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">4</span></td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">jackie stewart</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">tyrrell - ford</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">79</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">+ 20.9</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">1</span></td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">clay regazzoni</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">ferrari</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">79</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">+ 31.4</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">3</span></td>
</tr>
<tr>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">reine wisell</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">lotus - ford</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:#90EE90;">79</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">+ 1:09.4</span></td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">14</span></td>
</tr>
<tr>
<td>chris amon</td>
<td>matra</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">78</span></td>
<td>+ 1 lap</td>
<td>2</td>
</tr>
<tr>
<td>denny hulme</td>
<td>mclaren - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">78</span></td>
<td>+ 1 lap</td>
<td>7</td>
</tr>
<tr>
<td>brian redman</td>
<td>surtees - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">78</span></td>
<td>+ 1 lap</td>
<td>17</td>
</tr>
<tr>
<td>jacky ickx</td>
<td>ferrari</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">78</span></td>
<td>+ 1 lap</td>
<td>8</td>
</tr>
<tr>
<td>graham hill</td>
<td>brabham - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">77</span></td>
<td>+ 2 laps</td>
<td>19</td>
</tr>
<tr>
<td>ronnie peterson</td>
<td>march - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">77</span></td>
<td>+ 2 laps</td>
<td>13</td>
</tr>
<tr>
<td>henri pescarolo</td>
<td>march - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">77</span></td>
<td>+ 2 laps</td>
<td>18</td>
</tr>
<tr>
<td>rolf stommelen</td>
<td>surtees - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">77</span></td>
<td>+ 2 laps</td>
<td>15</td>
</tr>
<tr>
<td>andrea de adamich</td>
<td>march - alfa romeo</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">75</span></td>
<td>+ 4 laps</td>
<td>22</td>
</tr>
<tr>
<td>emerson fittipaldi</td>
<td>lotus - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">58</span></td>
<td>engine</td>
<td>5</td>
</tr>
<tr>
<td>john surtees</td>
<td>surtees - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">56</span></td>
<td>gearbox</td>
<td>6</td>
</tr>
<tr>
<td>françois cevert</td>
<td>tyrrell - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">45</span></td>
<td>accident</td>
<td>9</td>
</tr>
<tr>
<td>howden ganley</td>
<td>brm</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">42</span></td>
<td>physical</td>
<td>24</td>
</tr>
<tr>
<td>pedro rodríguez</td>
<td>brm</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">33</span></td>
<td>overheating</td>
<td>10</td>
</tr>
<tr>
<td>dave charlton</td>
<td>brabham - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">31</span></td>
<td>engine</td>
<td>16</td>
</tr>
<tr>
<td>jo siffert</td>
<td>brm</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">31</span></td>
<td>overheating</td>
<td>12</td>
</tr>
<tr>
<td>john love</td>
<td>march - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">30</span></td>
<td>differential</td>
<td>21</td>
</tr>
<tr>
<td>jackie pretorius</td>
<td>brabham - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">22</span></td>
<td>engine</td>
<td>20</td>
</tr>
<tr>
<td>peter gethin</td>
<td>mclaren - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">7</span></td>
<td>fuel leak</td>
<td>11</td>
</tr>
<tr>
<td>jo bonnier</td>
<td>mclaren - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">5</span></td>
<td>suspension</td>
<td>23</td>
</tr>
<tr>
<td>alex soler - roig</td>
<td>march - ford</td>
<td><span class="highlighted-cell" title="Used in transformation" style="background-color:yellow;">5</span></td>
<td>engine</td>
<td>25</td>
</tr>
</table>
</div>
<hr>
<div class="step">
<div class="step-title">Step 2: Select rows where 'laps' is 5.</div>
<div id="step-0" class="content">
<table>
<tr>
<td>driver</td>
<td>constructor</td>
<td>laps</td>
<td>time___retired</td>
<td>grid</td>
</tr>
<tr>
<td>mario andretti</td>
<td>ferrari</td>
<td>79</td>
<td>1:47:35.5</td>
<td>4</td>
</tr>
<tr>
<td>jackie stewart</td>
<td>tyrrell - ford</td>
<td>79</td>
<td>+ 20.9</td>
<td>1</td>
</tr>
<tr>
<td>clay regazzoni</td>
<td>ferrari</td>
<td>79</td>
<td>+ 31.4</td>
<td>3</td>
</tr>
<tr>
<td>reine wisell</td>
<td>lotus - ford</td>
<td>79</td>
<td>+ 1:09.4</td>
<td>14</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 for both conditions is equal to 4 and 2 respectively, otherwise return FALSE.</div>
<div id="step-1" class="content">
<table>
<tr>
<td>driver</td>
<td>constructor</td>
<td>laps</td>
<td>time___retired</td>
<td>grid</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>FALSE</td>
</tr>
</table>
</div>
</div>
<hr>
<h3>Prediction:</span> FALSE</h3>
</body></html>