3 ms·
Loading the data into the duckdb cli [0] and doing the first query: create table current as select * from '202211.csv'; select * from current; ┌───
by kristianp 4y ago
Loading the data into the duckdb cli [0] and doing the first query:
create table current as select * from '202211.csv';
select * from current;
┌────────────────────────────────────┬─────────┐
│ origin │ rank │
│ varchar │ int32 │
├────────────────────────────────────┼─────────┤
│ https://hochi.news │ 1000 │
│ https://www.xnxx.xxx │ 1000 │
│ https://www.wordreference.com │ 1000 │
│ https://finance.naver.com │ 1000 │
│ https://www.macys.com │ 1000 │
│ https://www.xv-videos1.com │ 1000 │
│ https://fr.xhamster.com │ 1000 │
│ https://poki.com │ 1000 │
│ https://salonboard.com │ 1000 │
│ https://clgt.one │ 1000 │
select tld, count(*)
from (select reverse(substr(reverse(origin),1, position('.' in reverse(origin))-1)) tld
from current)
group by tld
order by count(*) desc;
┌───────────┬──────────────┐
│ tld │ count_star() │
│ varchar │ int64 │
├───────────┼──────────────┤
│ com │ 406052 │
│ net │ 36675 │
│ br │ 35741 │
│ org │ 30359 │
│ jp │ 29194 │
│ ru │ 27812 │
│ in │ 21690 │
│ de │ 20182 │
│ it │ 17914 │
│ pl │ 15840 │
│ · │ · │
│ · │ · │
│ · │ · │
│ za:5002 │ 1 │
│ lk:8090 │ 1 │
│ org:1445 │ 1 │
│ co:14443 │ 1 │
│ ar:3016 │ 1 │
│ net:8001 │ 1 │
│ care:9624 │ 1 │
│ au:8443 │ 1 │
│ com:333 │ 1 │
│ edu:9016 │ 1 │
├───────────┴──────────────┤
│ 2076 rows (20 shown) │
└──────────────────────────┘
[0] https://duckdb.org/docs/installation/ https://duckdb.org/docs/installation/
- Llamamoe 4y agoAre the bottom entries domain:port? I feel like the table would be more interesting excluding those.