implement WHERE, GROUP BY, HAVING