Top sql queries using literal values - Oracle Database Script. SELECT * FROM (SELECT plan_hash_value, count(distinct(hash_value)), sum(executions), sum(parse_calls) FROM gv$sql GROUP BY plan_hash_value HAVING count(distinct(hash_value)) > 10 ORDER BY 2 DESC) WHERE rownum<21;
SELECT * FROM (SELECT plan_hash_value, count(distinct(hash_value)), sum(executions), sum(parse_calls) FROM gv$sql GROUP BY plan_hash_value HAVING count(distinct(hash_value)) > 10 ORDER BY 2 DESC) WHERE rownum<21;