RosettaCodeData/Task/Letter-frequency/DuckDB/letter-frequency-2.duckdb
2025-08-11 18:05:26 -07:00

7 lines
326 B
Text

# See above for reading in the file.
# Create a table containing all the individual characters
create or replace table c as (select unnest(regexp_extract_all((from t), '.')) as c);
# Choose a large enough bin_count value to ensure each character has its own bin
from histogram('c', c, bin_count := 100) order by count desc;