Việc đánh tag khá phổ biến trong các tổ chức lớn, nó đáp ứng yêu cầu phân bổ chi phí trở lại cho các đơn vị kinh doanh cụ thể. Nó cũng rất quan trọng đối với việc tối ưu hóa trong việc phân bổ chi phí theo khối lượng công việc, đồng thời giúp đo lường hiệu quả công việc.
SELECT "bill_payer_account_id",
"product_product_name",
"line_item_usage_type",
"line_item_line_item_description",
resource_tags_user_cost_center,
round(sum(line_item_unblended_cost), 2) as cost
FROM "costmaster"."monthly_report"
WHERE length("resource_tags_user_cost_center") > 0
GROUP BY "resource_tags_user_cost_center",
"bill_payer_account_id",
"product_product_name",
"line_item_usage_type",
"line_item_line_item_description"
ORDER BY cost desc
LIMIT 20
SELECT "bill_payer_account_id",
"product_product_name",
"line_item_usage_type",
"line_item_line_item_description",
round(sum(line_item_unblended_cost), 2) as cost
FROM "costmaster"."monthly_report"
WHERE length("resource_tags_user_cost_center") = 0
GROUP BY "bill_payer_account_id",
"product_product_name",
"line_item_usage_type",
"line_item_line_item_description"
ORDER BY cost desc
LIMIT 20