Step 1: Select rows where 'category' is 'favorite tv actor'.
year |
award |
category |
recipient |
result |
2010 |
green globe film awards |
outstanding actors asians in hollywood |
brenda song |
nominated |
2010 |
2010 kids' choice awards |
favorite tv show |
the suite life on deck |
nominated |
2010 |
2010 kids' choice awards |
favorite tv actor |
cole sprouse |
nominated |
2010 |
2010 kids' choice awards |
favorite tv actor |
dylan sprouse |
won |
2010 |
hollywood teen tv awards |
teen pick show : comedy |
the suite life on deck |
nominated |
2010 |
hollywood teen tv awards |
teen pick actress : comedy |
debby ryan |
nominated |
2010 |
hollywood teen tv awards |
teen pick actor : comedy |
dylan sprouse |
nominated |
2011 |
2011 kids' choice awards |
favorite tv show |
the suite life on deck |
nominated |
2011 |
2011 kids' choice awards |
favorite tv actor |
cole sprouse |
nominated |
2011 |
2011 kids' choice awards |
favorite tv actor |
dylan sprouse |
won |
2011 |
2011 kids' choice awards |
favorite tv sidekick |
brenda song |
nominated |
2011 |
casting society of america |
best casting children 's series |
dana gergely brandi brice |
won |
Step 2: Select rows where 'recipient' is 'dylan sprouse'.
year |
award |
category |
recipient |
result |
2010 |
2010 kids' choice awards |
favorite tv actor |
cole sprouse |
nominated |
2010 |
2010 kids' choice awards |
favorite tv actor |
dylan sprouse |
won |
2011 |
2011 kids' choice awards |
favorite tv actor |
cole sprouse |
nominated |
2011 |
2011 kids' choice awards |
favorite tv actor |
dylan sprouse |
won |
Step 3: Select rows where 'result' is 'won'.
year |
award |
category |
recipient |
result |
2010 |
2010 kids' choice awards |
favorite tv actor |
dylan sprouse |
won |
2011 |
2011 kids' choice awards |
favorite tv actor |
dylan sprouse |
won |
Step 4: Select rows where 'year' is 2010 or 2011.
year |
award |
category |
recipient |
result |
2010 |
2010 kids' choice awards |
favorite tv actor |
dylan sprouse |
won |
2011 |
2011 kids' choice awards |
favorite tv actor |
dylan sprouse |
won |
Step 5: Use a `CASE` statement to return TRUE if the number of rows is equal to 2, otherwise return FALSE.
year |
award |
category |
recipient |
result |
2010 |
2010 kids' choice awards |
favorite tv actor |
dylan sprouse |
won |
2011 |
2011 kids' choice awards |
favorite tv actor |
dylan sprouse |
won |
Prediction: TRUE