From 6791b081165a90e42d9374f8d84308ae3b6cbd61 Mon Sep 17 00:00:00 2001 From: Corey Goodfred Date: Fri, 26 Apr 2024 10:24:20 -0400 Subject: [PATCH] [COST-4762] Update HCS AWS Estimate pricing (#4979) * [COST-4762] Update HCS AWS Estimate pricing --- .../sql/reporting_aws_hcs_daily_summary.sql | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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,