sutty-analisis-tls/graph.sql
2023-08-01 17:54:40 -03:00

18 lines
292 B
SQL

with amounts as (
select
tls_version,
count(*) as count
from logs
group by tls_version
),
max as (
select max(count) as value
from amounts
)
select
tls_version,
count,
printf('%.' || (count * 30 / max.value) || 'c', '*') as bar
from amounts, max
order by tls_version;