### Is your feature request related to a problem or challenge? Calculates [Shannon entropy](https://en.wikipedia.org/wiki/Entropy_(information_theory)) of a column of values. ### Describe the solution you'd like ``` D CREATE TABLE entropy (vals UInt32,strings String); D INSERT INTO entropy VALUES (1, 'A'), (1, 'A'), (1,'A'), (1,'A'), (2,'B'), (2,'B'), (2,'C'), (2,'D'); D D SELECT entropy(vals), entropy(strings) FROM entropy; ┌───────────────┬──────────────────┐ │ entropy(vals) │ entropy(strings) │ │ double │ double │ ├───────────────┼──────────────────┤ │ 1.0 │ 1.75 │ └───────────────┴──────────────────┘ ``` ### Describe alternatives you've considered _No response_ ### Additional context https://duckdb.org/docs/sql/functions/aggregates#entropyx https://clickhouse.com/docs/en/sql-reference/aggregate-functions/reference/entropy
Activity
[-]Support entropy in Aggregation function[/-][+]Support `entropy` in Aggregation function[/+]dharanad commentedon Aug 30, 2024
Haven't worked on a problem like this before. I would like to give this a try.
thinh2 commentedon Aug 30, 2024
take
alamb commentedon Sep 9, 2024
Given #12357 we may want to move this function to some other repo rather than the core
thinh2 commentedon Sep 11, 2024
thank for notify @alamb
alamb commentedon Sep 16, 2024
Suggestion: #12254 (comment)
alamb commentedon Sep 25, 2024
We are going to implement these in a different repository so closing this ticket to avoid: #12254 (comment)