diff --git a/koku/hcs/database/sql/reporting_aws_hcs_daily_summary.sql b/koku/hcs/database/sql/reporting_aws_hcs_daily_summary.sql index ec9b1101e4..07d06f2ea0 100644 --- a/koku/hcs/database/sql/reporting_aws_hcs_daily_summary.sql +++ b/koku/hcs/database/sql/reporting_aws_hcs_daily_summary.sql @@ -23,14 +23,19 @@ SELECT CASE WHEN ( - try_cast(product_vcpu AS INT) <= 4 + try_cast(product_vcpu AS INT) <= 8 AND (lineitem_lineitemdescription LIKE '%Red Hat%' OR lineitem_lineitemdescription LIKE '%RHEL%') - ) THEN 0.06 * lineitem_usageamount + ) THEN 0.0144 * lineitem_usageamount * CAST(product_vcpu AS INT) WHEN ( - try_cast(product_vcpu AS INT) > 4 + try_cast(product_vcpu AS INT) <= 127 AND (lineitem_lineitemdescription LIKE '%Red Hat%' OR lineitem_lineitemdescription LIKE '%RHEL%') - ) THEN 0.13 * lineitem_usageamount + ) THEN 0.0108 * lineitem_usageamount * CAST(product_vcpu AS INT) + WHEN + ( + try_cast(product_vcpu AS INT) > 127 + AND (lineitem_lineitemdescription LIKE '%Red Hat%' OR lineitem_lineitemdescription LIKE '%RHEL%') + ) THEN 0.0096 * lineitem_usageamount * CAST(product_vcpu AS INT) ELSE lineitem_unblendedcost END AS lineitem_unblendedcost, lineitem_blendedrate,