我正在使用 Amazon Athena,有几列以科学计数法形式显示,我需要它以整数或小数形式显示。我尝试从这个答案中得到答案:Convertexponential to number in sql
但是,这不适用于 SQL Presto,而且这个也不起作用,因为我需要它来处理多个数字,而不仅仅是一个:Query to conversionexponential number to float in SQL Server
我似乎无法找到一个简单的答案,而且我是 SQL 初学者,我正在 Amazon Athena 中执行此操作。我想在一列上有一个不同的结果,但返回几个没有不同的结果。这是我的代码:
SELECT DISTINCT line_item_resource_id
FROM table
WHERE product_servicename = 'Amazon Elastic Compute Cloud'
AND line_item_usage_account_id = '544934960'
AND line_item_usage_type LIKE '%BoxUsage%'
AND identity_time_interval = '2020-06-29T00:00:00Z/2020-06-30T00:00:00Z';
Run Code Online (Sandbox Code Playgroud)
我希望 unique 只出现在 line_item_resource_id 上,但返回所有这些:
line_item_resource_id, line_item_usage_start_date,
line_item_usage_end_date, line_item_usage_account_id,
line_item_availability_zone, line_item_product_code, product_instance_type,
pricing_term, product_operating_system, product_servicename,
line_item_line_item_type, line_item_usage_type, line_item_operation,
line_item_usage_amount
Run Code Online (Sandbox Code Playgroud)
此代码仅产生 line_item_resource_id 。如何仅获得该列上的不同值但返回其余部分?