skills/library/duckdb-sql/SKILL.md
Analytical SQL engine for querying CSV, Parquet, and JSON files directly. No database setup required.
npx skillsauth add malue-ai/dazee-small duckdb-sqlInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
用 SQL 直接查询 CSV、Parquet、JSON 文件,无需导入数据库。适合大数据集分析。
| 工具 | 擅长 | 局限 | |---|---|---| | excel-analyzer | 小数据集、图表、格式化输出 | 大数据集慢 | | duckdb-sql | 大数据集、复杂 SQL、多文件 JOIN | 不做格式化输出 |
import duckdb
con = duckdb.connect()
# 直接查询 CSV
result = con.sql("SELECT * FROM 'data.csv' LIMIT 10").fetchdf()
# 聚合分析
result = con.sql("""
SELECT category, COUNT(*) as count, AVG(price) as avg_price
FROM 'sales.csv'
GROUP BY category
ORDER BY count DESC
""").fetchdf()
# 多文件 JOIN
result = con.sql("""
SELECT o.order_id, c.name, o.total
FROM 'orders.csv' o
JOIN 'customers.csv' c ON o.customer_id = c.id
WHERE o.total > 1000
""").fetchdf()
# 查询 Parquet
result = con.sql("SELECT * FROM 'data.parquet' WHERE year = 2026").fetchdf()
# 通配符查询多文件
result = con.sql("SELECT * FROM 'logs/*.csv'").fetchdf()
# 安装
pip install duckdb
# 交互式
python3 -c "import duckdb; print(duckdb.sql(\"SELECT count(*) FROM 'data.csv'\").fetchone())"
-- 数据概览
SUMMARIZE SELECT * FROM 'data.csv';
-- 去重计数
SELECT COUNT(DISTINCT user_id) FROM 'events.csv';
-- 窗口函数:排名
SELECT *, RANK() OVER (PARTITION BY department ORDER BY salary DESC) as rank
FROM 'employees.csv';
-- 导出结果
COPY (SELECT * FROM 'data.csv' WHERE status = 'active') TO 'output.csv';
development
Local web search (Tavily/Exa, requires API Key). For quick searches. If no Key configured or deep research needed, use cloud_agent instead.
development
Get current weather and forecasts (no API key required).
tools
Send WhatsApp messages to other people or search/sync WhatsApp history via the wacli CLI (not for normal user chats).
tools
Start voice calls via the Moltbot voice-call plugin.