刚看到了duckdb的介绍,非常强,可以支持任意和嵌套的相关子查询、窗口函数、排序规则、复杂类型(数组、结构、映射). 下面是一个获取你的github账户的repo的所有star的语句.
WITH repo_data AS (
SELECT *
FROM read_json_auto('https://api.github.com/users/karminski/repos')
)
SELECT
SUM(stargazers_count) as total_stars,
COUNT(*) as total_repos
FROM repo_data;
可以直接在live demo中体验:live demo
2