Nghiên cứu về Chi phí

Để tối ưu hóa được hiệu quả, sẽ rất tốt nếu ta có thể xem xét những chi phí hàng đầu theo nhiều danh mục khác nhau như dịch vụ, mô tả và tag.

  1. Hiển thị Top10 Account ID tốn chi phí nhất
SELECT "line_item_usage_account_id",
	round(sum("line_item_unblended_cost"), 2) as cost
FROM "costmaster"."monthly_report"
GROUP BY "line_item_usage_account_id"
ORDER BY cost desc
LIMIT 10;

Cost

  1. Kết quả truy vấn trả về

Cost

  1. Hiển thị Top10 Dịch vụ tốn chi phí nhất
SELECT "line_item_product_code",
	round(sum("line_item_unblended_cost"), 2) as cost
FROM "costmaster"."monthly_report"
GROUP BY "line_item_product_code"
ORDER BY cost desc
LIMIT 10;

Cost

  1. Kết quả truy vấn trả về

Cost

  1. Hiển thị Top10 Dịch vụ và Mô tả chi tiết có chi phí tốn kém nhất
SELECT "line_item_product_code",
	"line_item_line_item_description",
	round(sum("line_item_unblended_cost"), 2) as cost
FROM "costmaster"."monthly_report"
WHERE "line_item_product_code" like '%AmazonEC2%'
GROUP BY "line_item_product_code",
	"line_item_line_item_description"
ORDER BY cost desc
LIMIT 10;

Cost

  1. Kết quả truy vấn trả về

Cost

  1. Hiển thị Top10 tình huống sử dụng EC2 kiểu On Demand tốn nhiều chi phí nhất
SELECT "line_item_product_code",
	"line_item_line_item_description",
	round(sum("line_item_unblended_cost"), 2) as cost
FROM "costmaster"."monthly_report"
WHERE "line_item_product_code" like '%AmazonEC2%'
	and "line_item_usage_type" like '%BoxUsage%'
GROUP BY "line_item_product_code",
	"line_item_line_item_description"
ORDER BY cost desc
LIMIT 10;

Cost

  1. Kết quả truy vấn trả về

Cost