fix: push selection down

Included test sql query to show improvement.

Worked-with: Michelle Hansey <michelle.hansey@gmail.com>