luulinh90s's picture
update
8431e47
raw
history blame
11.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> constructed was completed during the same time frame of 1993 at the flowood site and the newsome brothers</h3>
<h3>Input Table: list of superfund sites in mississippi</h3>
<div class="step">
<div class="step">
<div class="step-title">Step 1: Select rows where 'construction_completed' is not '9999-01-01'.</div>
<div class="content" id="step-1">
<table>
<tr>
<td>cerclis_id</td>
<td>name</td>
<td>county</td>
<td>proposed</td>
<td>listed</td>
<td>construction_completed</td>
<td>partially_deleted</td>
<td>deleted</td>
</tr>
<tr>
<td>msd004006995</td>
<td>american creosote works , inc</td>
<td>winston</td>
<td>2001-06-14</td>
<td>2001-09-13</td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">9999-01-01</span></td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>msd008154486</td>
<td>chemfax , inc</td>
<td>harrison</td>
<td>1993-06-23</td>
<td>9999-01-01</td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">9999-01-01</span></td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>msd046497012</td>
<td>davis timber company</td>
<td>lamar</td>
<td>2000-05-11</td>
<td>2000-07-27</td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">9999-01-01</span></td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">msd980710941</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">flowood site</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">rankin</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">1983-09-08</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">1984-09-21</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">1993-09-17</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">-</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">02 / 16 / 1996</span></td>
</tr>
<tr>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">msd980840045</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">newsom brothers / old reichhold chemicals , inc</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">marion</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">1984-10-15</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">1986-06-10</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">1997-08-08</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">-</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">09 / 27 / 2000</span></td>
</tr>
<tr>
<td>msd065490930</td>
<td>picayune wood treating</td>
<td>pearl river</td>
<td>2004-03-08</td>
<td>2004-07-22</td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">9999-01-01</span></td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>msd056029648</td>
<td>potter co</td>
<td>copiah</td>
<td>1993-05-10</td>
<td>9999-01-01</td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">9999-01-01</span></td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>msd086556388</td>
<td>sonford products</td>
<td>rankin</td>
<td>2006-09-27</td>
<td>2007-03-07</td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">9999-01-01</span></td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">msd980601736</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">walcotte chemical co warehouses</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">washington</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">9999-01-01</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">9999-01-01</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">1982-12-30</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">-</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">12 / 30 / 1982</span></td>
</tr>
</table>
</div>
<hr/>
<div class="step">
<div class="step-title">Step 2: Select rows where 'construction_completed' is '1993-09-17' or '1997-08-08'.</div>
<div class="content" id="step-0">
<table>
<tr>
<td>cerclis_id</td>
<td>name</td>
<td>county</td>
<td>proposed</td>
<td>listed</td>
<td>construction_completed</td>
<td>partially_deleted</td>
<td>deleted</td>
</tr>
<tr>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">msd980710941</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">flowood site</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">rankin</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">1983-09-08</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">1984-09-21</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">1993-09-17</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">-</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">02 / 16 / 1996</span></td>
</tr>
<tr>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">msd980840045</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">newsom brothers / old reichhold chemicals , inc</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">marion</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">1984-10-15</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">1986-06-10</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">1997-08-08</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">-</span></td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">09 / 27 / 2000</span></td>
</tr>
<tr>
<td>msd980601736</td>
<td>walcotte chemical co warehouses</td>
<td>washington</td>
<td>9999-01-01</td>
<td>9999-01-01</td>
<td><span class="highlighted-cell" style="background-color:yellow;" title="Used in transformation">1982-12-30</span></td>
<td>-</td>
<td>12 / 30 / 1982</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 class="content" id="step-1">
<table>
<tr>
<td>cerclis_id</td>
<td>name</td>
<td>county</td>
<td>proposed</td>
<td>listed</td>
<td>construction_completed</td>
<td>partially_deleted</td>
<td>deleted</td>
</tr>
<tr>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">msd980710941</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">flowood site</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">rankin</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">1983-09-08</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">1984-09-21</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">1993-09-17</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">-</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">02 / 16 / 1996</span></td>
</tr>
<tr>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">msd980840045</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">newsom brothers / old reichhold chemicals , inc</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">marion</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">1984-10-15</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">1986-06-10</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">1997-08-08</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">-</span></td>
<td><span class="highlighted-cell" style="background-color:#90EE90;" title="Used in transformation">09 / 27 / 2000</span></td>
</tr>
</table>
</div>
</div>
<hr/>
</div>
</div>
<hr/>
</body></html>