logoalt Hacker News

ncruces • yesterday at 11:45 PM • 0 replies • view on HN

I'm in the process of adding a few of these to my Go SQLite driver.

https://pkg.go.dev/github.com/ncruces/go-sqlite3/ext/approx

They work as window functions, and they also support creating roll-up tables, e.g. you have a table storing a sketch of daily active users and can use that to get weekly and monthly active users.

Same for quantiles (e.g. median and tail latencies) and next up top-K (e.g. most popular content, highest spenders, etc).