text stringlengths 0 3.27k |
|---|
line_item_usage_account_id, |
DATE_FORMAT(line_item_usage_start_date,'%Y-%m'), |
4 -- refers to case_line_item_usage_type |
ORDER BY |
month_line_item_usage_start_date, |
sum_line_item_unblended_cost DESC; |
PROMPT: What SQL query corresponds to the following purpose: This query will provide monthly unblended and usage information per linked account for all types of Amazon MSK, including OD and Serverless. The output will include detailed information about the usage type and its usage amount. The cost will be summed and in... |
COMPLETION: SELECT |
bill_payer_account_id, |
line_item_usage_account_id, |
line_item_product_code, |
line_item_line_item_description, |
line_item_operation, |
SUM(line_item_unblended_cost) AS sum_line_item_unblended_cost |
FROM |
${table_name} |
WHERE |
${date_filter} |
AND line_item_product_code = 'AmazonMSK' |
AND line_item_line_item_type NOT IN ('Tax','Refund','Credit') |
GROUP BY 1,2,3,4,5 |
ORDER BY |
sum_line_item_unblended_cost DESC; |
PROMPT: What SQL query corresponds to the following purpose: This query will provide daily unblended and amortized cost as well as usage information per linked account for Amazon MQ. The output will include detailed information about the resource id (broker), usage type, and API operation. The usage amount and cost wil... |
COMPLETION: SELECT |
bill_payer_account_id, |
line_item_usage_account_id, |
product_broker_engine, |
line_item_usage_type, |
product_product_family, |
pricing_unit, |
pricing_term, |
SPLIT_PART(line_item_usage_type, ':', 2) AS split_line_item_usage_type, |
SPLIT_PART(line_item_resource_id, ':', 7) AS split_line_item_resource_id, |
DATE_FORMAT((line_item_usage_start_date),'%Y-%m-%d') AS day_line_item_usage_start_date, |
line_item_operation, |
SUM(CAST(line_item_usage_amount AS DOUBLE)) AS sum_line_item_usage_amount, |
SUM(CAST(line_item_unblended_cost AS DECIMAL(16,8))) AS sum_line_item_unblended_cost |
FROM |
${table_name} |
WHERE |
${date_filter} |
AND product_product_name = 'Amazon MQ' |
AND line_item_line_item_type IN ('DiscountedUsage', 'Usage', 'SavingsPlanCoveredUsage') |
GROUP BY |
bill_payer_account_id, |
line_item_usage_account_id, |
product_broker_engine, |
product_product_family, |
pricing_unit, |
pricing_term, |
DATE_FORMAT((line_item_usage_start_date),'%Y-%m-%d'), |
line_item_usage_type, |
line_item_resource_id, |
line_item_operation |
ORDER BY |
day_line_item_usage_start_date, |
sum_line_item_unblended_cost DESC, |
split_line_item_usage_type; |
PROMPT: What SQL query corresponds to the following purpose: This query will provide daily unblended and usage information per linked account for Amazon SES. The output will include detailed information about the product family (Sending Attachments, Data Transfer, etc…) and usage type. The usage amount and cost will be... |
COMPLETION: SELECT |
bill_payer_account_id, |
line_item_usage_account_id, |
DATE_FORMAT((line_item_usage_start_date),'%Y-%m-%d') AS day_line_item_usage_start_date, |
product_product_family, |
CASE |
WHEN line_item_usage_type LIKE '%%DataTransfer-In-Bytes%%' THEN 'Data Transfer GB (IN) ' |
WHEN line_item_usage_type LIKE '%%DataTransfer-Out-Bytes%%' THEN 'Data Transfer GB (Out)' |
WHEN line_item_usage_type LIKE '%%AttachmentsSize-Bytes%%' THEN 'Attachments GB' |
WHEN line_item_usage_type LIKE '%%Recipients' THEN 'Recipients' |
WHEN line_item_usage_type LIKE '%%Recipients-EC2' THEN 'Recipients' |
WHEN line_item_usage_type LIKE '%%Recipients-MailboxSim' THEN 'Recipients (MailboxSimulator)' |
WHEN line_item_usage_type LIKE '%%Message%%' THEN 'Messages' |
WHEN line_item_usage_type LIKE '%%ReceivedChunk%%' THEN 'Received Chunk' |
ELSE 'Others' |
END AS case_line_item_usage_type, |
SUM(CAST(line_item_usage_amount AS DOUBLE)) AS sum_line_item_usage_amount, |
SUM(CAST(line_item_unblended_cost AS DECIMAL(16,8))) AS sum_line_item_unblended_cost |
FROM |
${table_Name} |
WHERE |
${date_filter} |
AND product_product_name = 'Amazon Simple Email Service' |
AND line_item_line_item_type IN ('DiscountedUsage', 'Usage', 'SavingsPlanCoveredUsage') |
GROUP BY |
bill_payer_account_id, |
line_item_usage_account_id, |
DATE_FORMAT((line_item_usage_start_date),'%Y-%m-%d'), |
product_product_family, |
5 --refers to case_line_item_usage_type |
ORDER BY |
day_line_item_usage_start_date, |
sum_line_item_usage_amount, |
sum_line_item_unblended_cost DESC; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.