Postgres slowest queries/throughput/timeConsuming ...etc

Hi Everyone,

Is this query do the job to get [slowest queries list / throughput / TimeConsuming] for postgres in apm

SELECT average(newrelic.timeslice.value, exclusiveTime: true) as ‘Avg Duration’ FROM Metric Where appName = ‘example.com’ WITH METRIC_FORMAT ‘Datastore/statement/Postgres/{q}/{p}’ facet q,p since 1 week ago limit 100

Can you please write down the needed queries to get the lists of transactions.

Best regards