Step 1: Select rows where 'party' is 'republican'.
district |
incumbent |
party |
first_elected |
result |
candidates |
illinois 2 |
morgan f murphy |
democratic |
1970-01-01 |
retired democratic hold |
gus savage (d) 88.2% marsha a harris (r) 11.8% |
illinois 6 |
henry hyde |
republican |
1974-01-01 |
re - elected |
henry hyde (r) 67.0% mario reymond reda (d) 33.0% |
illinois 7 |
cardiss collins |
democratic |
1973-01-01 |
re - elected |
cardiss collins (d) 85.1% ruth r hooper (r) 14.9% |
illinois 12 |
phil crane |
republican |
1969-01-01 |
re - elected |
phil crane (r) 74.1% david mccartney (d) 25.9% |
illinois 13 |
robert mcclory |
republican |
1962-01-01 |
re - elected |
robert mcclory (r) 71.7% michael reese (d) 28.3% |
illinois 15 |
tom corcoran |
republican |
1976-01-01 |
re - elected |
tom corcoran (r) 76.7% john p quillin (d) 23.3% |
illinois 19 |
tom railsback |
republican |
1966-01-01 |
re - elected |
tom railsback (r) 73.4% thomas j hand (d) 26.6% |
illinois 20 |
paul findley |
republican |
1960-01-01 |
re - elected |
paul findley (r) 56.0% david robinson (d) 44.0% |
Step 2: Select rows where 'first_elected' is '1960-01-01'.
district |
incumbent |
party |
first_elected |
result |
candidates |
illinois 6 |
henry hyde |
republican |
1974-01-01 |
re - elected |
henry hyde (r) 67.0% mario reymond reda (d) 33.0% |
illinois 12 |
phil crane |
republican |
1969-01-01 |
re - elected |
phil crane (r) 74.1% david mccartney (d) 25.9% |
illinois 13 |
robert mcclory |
republican |
1962-01-01 |
re - elected |
robert mcclory (r) 71.7% michael reese (d) 28.3% |
illinois 15 |
tom corcoran |
republican |
1976-01-01 |
re - elected |
tom corcoran (r) 76.7% john p quillin (d) 23.3% |
illinois 19 |
tom railsback |
republican |
1966-01-01 |
re - elected |
tom railsback (r) 73.4% thomas j hand (d) 26.6% |
illinois 20 |
paul findley |
republican |
1960-01-01 |
re - elected |
paul findley (r) 56.0% david robinson (d) 44.0% |
Step 3: Use a `CASE` statement to return TRUE if the number of rows is equal to 1, otherwise return FALSE.
district |
incumbent |
party |
first_elected |
result |
candidates |
illinois 20 |
paul findley |
republican |
1960-01-01 |
re - elected |
paul findley (r) 56.0% david robinson (d) 44.0% |
Prediction: TRUE