0xqq opened a new issue, #47340:
URL: https://github.com/apache/doris/issues/47340

   ### Search before asking
   
   - [x] I had searched in the 
[issues](https://github.com/apache/doris/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Version
   
   doris3.0.3
   
   ### What's Wrong?
   
   CREATE TABLE sales_data
   (
   product_id INT,
   sale_price DECIMAL(10, 2)
   ) DUPLICATE KEY(product_id)
   DISTRIBUTED BY HASH(product_id) BUCKETS AUTO
   PROPERTIES (
   "replication_allocation" = "tag.location.default: 1"
   );
   
   -- 插入示例数据
   INSERT INTO sales_data VALUES
   (1, 10.00),
   (1, 15.00),
   (1, 20.00),
   (1, 25.00),
   (1, 30.00),
   (1, 35.00),
   (1, 40.00),
   (1, 45.00),
   (1, 50.00),
   (1, 100.00);
   
   -- 计算不同百分位的销售价格
   SELECT
   percentile(sale_price, 0.5) as median_price, -- 中位数
   percentile(sale_price, 0.75) as p75_price, -- 75分位数
   percentile(sale_price, 0.90) as p90_price, -- 90分位数
   percentile(sale_price, 0.95) as p95_price, -- 95分位数
   percentile(null, 0.99) as p99_null -- null的99分位数
   FROM sales_data;
   
   --错误信息
   SQL 错误 [1105] [HY000]: errCode = 2, detailMessage = 
(xx.xx.xx.xx)[INTERNAL_ERROR]Agg Function percentile_array(double, array) is 
not implemented
   
   ### What You Expected?
   
   支持double类型的字段求中位数。
   
   ### How to Reproduce?
   
   _No response_
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [x] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to