SELECT column_name, aggregate_function(column_name) FROM TABLE_NAME WHERE column_name operator VALUE GROUP BY column_name HAVING aggregate_function(column_name) operator VALUE IN SELECT column_name(s) FROM TABLE_NAME WHERE column_name IN (value1,value2,..)