# | RESOURCE_NAME | TOTAL | PERCENT |
---|---|---|---|
1 | PIC_COMPUTE_STANDARD_E2 - 351882892 | 351882892 | 11.97 |
2 | PIC_COMPUTE_VM_STANDARD_E2_MICRO_FREE - 2588400000 | 2588400000 | 88.03 |
#: click on a column heading to sort on it
Name Null? Type
----------------------------------------------------------------------------------- -------- --------------------------------------------------------
lineItem/referenceNo VARCHAR2(4000)
lineItem/tenantId VARCHAR2(4000)
lineItem/intervalUsageStart VARCHAR2(4000)
lineItem/intervalUsageEnd VARCHAR2(4000)
product/service VARCHAR2(4000)
product/resource VARCHAR2(4000)
product/compartmentId VARCHAR2(4000)
product/compartmentName VARCHAR2(4000)
product/region VARCHAR2(4000)
product/availabilityDomain VARCHAR2(4000)
product/resourceId VARCHAR2(4000)
usage/consumedQuantity VARCHAR2(4000)
usage/billedQuantity VARCHAR2(4000)
usage/consumedQuantityUnits VARCHAR2(4000)
usage/consumedQuantityMeasure VARCHAR2(4000)
lineItem/isCorrection VARCHAR2(4000)
lineItem/backreferenceNo VARCHAR2(4000)
tags/Oracle-Tags.CreatedBy VARCHAR2(4000)
tags/Oracle-Tags.CreatedOn VARCHAR2(4000)
tags/orcl-cloud.free-tier-retained VARCHAR2(4000)
tags/backup VARCHAR2(4000)
WITH tot as
(SELECT SUM("usage/consumedQuantity") total_global
FROM OCI360_REPORTS_USAGE
where "product/service" = 'COMPUTE' AND TRIM("usage/consumedQuantityUnits" || ' ' || "usage/consumedQuantityMeasure") = 'MS OCPUS'
)
SELECT "product/resource" || ' - ' || SUM("usage/consumedQuantity") resource_name,
SUM("usage/consumedQuantity") total,
trim(to_char(round(SUM("usage/consumedQuantity")/decode(total_global,0,1,total_global),4)*100,'990D99')) percent
FROM OCI360_REPORTS_USAGE, tot
where "product/service" = 'COMPUTE' AND TRIM("usage/consumedQuantityUnits" || ' ' || "usage/consumedQuantityMeasure") = 'MS OCPUS'
GROUP BY "product/resource",total_global;
2 rows selected.