The below query gives the top 50 queries; please modify it according to your needs; (courtesy Akos Levoi)
select top 50
, MaxAMPCPUTime * (hashamp () + 1) CPUImpact
, CAST (100 - ((AmpCPUTime / (hashamp () + 1)) * 100 / NULLIFZERO (MaxAMPCPUTime)) AS INTEGER) "CPUSkew%"
, MaxAMPIO * (hashamp () + 1) IOImpact
, CAST (100 - ((TotalIOCount / (hashamp () + 1)) * 100 / NULLIFZERO (MaxAMPIO) ) AS INTEGER) "IOSkew%"
, AMPCPUTime * 1000 / nullifzero (TotalIOCount) LHR
, TotalIOCount / nullifzero (AMPCPUTime * 1000) RHL
, Substr(QueryText,1,2000) QueryText
/* For archived DBQL
dbql_arch.dbqlogtbl_hst where logdate=1131201
/* For online DBQL*/
cast(cast(starttime as char(10)) as date) = '2013-12-18' (date)
order by CPUImpact desc