Step 1: Select rows where 'construction_completed' is not '9999-01-01'.
cerclis_id |
name |
county |
proposed |
listed |
construction_completed |
partially_deleted |
deleted |
msd004006995 |
american creosote works , inc |
winston |
2001-06-14 |
2001-09-13 |
9999-01-01 |
- |
- |
msd008154486 |
chemfax , inc |
harrison |
1993-06-23 |
9999-01-01 |
9999-01-01 |
- |
- |
msd046497012 |
davis timber company |
lamar |
2000-05-11 |
2000-07-27 |
9999-01-01 |
- |
- |
msd980710941 |
flowood site |
rankin |
1983-09-08 |
1984-09-21 |
1993-09-17 |
- |
02 / 16 / 1996 |
msd980840045 |
newsom brothers / old reichhold chemicals , inc |
marion |
1984-10-15 |
1986-06-10 |
1997-08-08 |
- |
09 / 27 / 2000 |
msd065490930 |
picayune wood treating |
pearl river |
2004-03-08 |
2004-07-22 |
9999-01-01 |
- |
- |
msd056029648 |
potter co |
copiah |
1993-05-10 |
9999-01-01 |
9999-01-01 |
- |
- |
msd086556388 |
sonford products |
rankin |
2006-09-27 |
2007-03-07 |
9999-01-01 |
- |
- |
msd980601736 |
walcotte chemical co warehouses |
washington |
9999-01-01 |
9999-01-01 |
1982-12-30 |
- |
12 / 30 / 1982 |
Step 2: Select rows where 'construction_completed' is '1993-09-17' or '1997-08-08'.
cerclis_id |
name |
county |
proposed |
listed |
construction_completed |
partially_deleted |
deleted |
msd980710941 |
flowood site |
rankin |
1983-09-08 |
1984-09-21 |
1993-09-17 |
- |
02 / 16 / 1996 |
msd980840045 |
newsom brothers / old reichhold chemicals , inc |
marion |
1984-10-15 |
1986-06-10 |
1997-08-08 |
- |
09 / 27 / 2000 |
msd980601736 |
walcotte chemical co warehouses |
washington |
9999-01-01 |
9999-01-01 |
1982-12-30 |
- |
12 / 30 / 1982 |
Step 3: Use a `CASE` statement to return TRUE if the number of rows is equal to 2, otherwise return FALSE.
cerclis_id |
name |
county |
proposed |
listed |
construction_completed |
partially_deleted |
deleted |
msd980710941 |
flowood site |
rankin |
1983-09-08 |
1984-09-21 |
1993-09-17 |
- |
02 / 16 / 1996 |
msd980840045 |
newsom brothers / old reichhold chemicals , inc |
marion |
1984-10-15 |
1986-06-10 |
1997-08-08 |
- |
09 / 27 / 2000 |