Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
0
3.27k
PROMPT: What SQL query corresponds to the following purpose: This query will provide daily unblended and usage information for Amazon Athena. The output will include detailed information about the resource id. The cost will be summed and in descending order.?
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,
line_item_usage_type,
line_item_resource_id,
product_region,
line_item_product_code,
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 line_item_product_code = 'AmazonAthena'
AND line_item_line_item_type IN ('DiscountedUsage', 'Usage', 'SavingsPlanCoveredUsage')
GROUP BY
bill_payer_account_id,
line_item_usage_account_id,
line_item_usage_start_date,
line_item_usage_type,
line_item_resource_id,
product_region,
line_item_product_code
ORDER BY
sum_line_item_unblended_cost DESC
LIMIT 20;
PROMPT: What SQL query corresponds to the following purpose: This query will provide daily unblended and usage information per linked account for AWS Glue. The output will include detailed information about the resource id (Glue Crawler) and API operation. The cost will be summed and in descending order.?
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,
line_item_operation,
CASE
WHEN LOWER(line_item_operation) = 'jobrun' THEN SPLIT_PART(line_item_resource_id, 'job/', 2)
WHEN LOWER(line_item_operation) = 'crawlerrun' THEN SPLIT_PART(line_item_resource_id, 'crawler/', 2)
ELSE 'N/A'
END AS case_line_item_resource_id,
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 = ('AWS Glue')
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'),
line_item_operation,
line_item_resource_id
ORDER BY
day_line_item_usage_start_date,
sum_line_item_usage_amount,
sum_line_item_unblended_cost;
PROMPT: What SQL query corresponds to the following purpose: This query will provide daily unblended and usage information per linked account for each Kinesis product (Amazon Kinesis, Amazon Kinesis Firehose, and Amazon Kinesis Analytics). The output will include detailed information about the resource id (Stream, Delivery Stream, etc…) and API operation. The cost will be summed and in descending order.?
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,
SPLIT_PART(line_item_resource_id,':',6) AS split_line_item_resource_id,
product_product_name,
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 line_item_product_code LIKE '%Kinesis%'
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'),
line_item_resource_id,
product_product_name
ORDER BY
day_line_item_usage_start_date,
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 Elasticsearch. The output will include detailed information about the resource id (ES Domain), usage type, and API operation. The usage amount and cost will be summed and the cost will be in descending order. This query includes RI and SP true up which will show any upfront fees to the account that purchased the pricing model.?
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,
SPLIT_PART(line_item_resource_id,':',6) AS split_line_item_resource_id,
product_product_family,
product_instance_family,
product_instance_type,
pricing_term,
product_storage_media,
product_transfer_type,
SUM(CASE
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
4