Add a filter and execute the SQL