将自然语言数据需求转成高质量 SQL,并按方言优化复杂查询性能。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "write-query" 技能: 1. 下载 https://raw.githubusercontent.com/anthropics/knowledge-work-plugins/main/data/skills/write-query/SKILL.md 2. 保存为 ~/.claude/skills/write-query/SKILL.md 3. 装好后重载技能,告诉我可以用了
请用 BigQuery SQL 编写查询:统计过去 90 天每个渠道的订单数、总收入和平均客单价,只包含已支付订单,按收入降序排序,并使用清晰的 CTE 结构。
一条结构清晰的 BigQuery SQL,包含时间过滤、分组聚合、排序及最佳实践写法。
下面这条 Snowflake SQL 查询运行很慢,请重写并说明优化点:涉及 3 张大表 join,按月汇总活跃用户,尽量减少扫描数据量,并考虑分区裁剪和过滤下推。
优化后的 Snowflake SQL,以及针对扫描量、过滤顺序、CTE 与聚合策略的说明。
把这段 Postgres SQL 改写成适用于 Snowflake 的版本,保留原有逻辑,并处理日期函数、字符串拼接和空值处理的方言差异。
一条可在 Snowflake 使用的等价 SQL,并标注关键方言差异与替换原因。
If you see unfamiliar placeholders or need to check which tools are connected, see CONNECTORS.md.
Write a SQL query from a natural language description, optimized for your specific SQL dialect and following best practices.
/write-query <description of what data you need>
Parse the user's description to identify:
If the user's SQL dialect is not already known, ask which they use:
Remember the dialect for future queries in the same session.
If a data warehouse MCP server is connected:
Follow these best practices:
Structure:
daily_signups, active_users, revenue_by_product)Performance:
SELECT * in production queries -- specify only needed columnsEXISTS over IN for subqueries with large result setsReadability:
a, b, c)Dialect-specific optimizations:
sql-queries skill for details)Provide:
If a data warehouse is connected, offer to run the query and analyze the results. If the user wants to run it themselves, the query is ready to copy-paste.
Simple aggregation:
/write-query Count of orders by status for the last 30 days
Complex analysis:
/write-query Cohort retention analysis -- group users by their signup month, then show what percentage are still active (had at least one event) at 1, 3, 6, and 12 months after signup
Performance-critical:
…
帮助开发者在网页中集成 Zoom 虚拟客服聊天,并安全控制会话与用户上下文。
帮助开发者在 Web 视频场景中快速接入 Zoom 预置 React 通话界面。
根据受众与汇报节奏生成清晰的项目进展与干系人更新
在分享分析结论前,检查方法、计算、偏差与结论是否可靠
生成人员规模、流失率、多元化与组织健康等人力分析报告
帮助识别、分类并排序技术债,明确重构与代码健康改进优先级。
帮助你编写、优化并转换多种数据仓库方言的高质量 SQL 查询。
用自然语言查询 SQL 数据库,自动理解结构并生成纠错 SQL 结果
将自然语言转为 SQL 并查询多种数据库,还可做文档问答与语义缓存。
用自然语言查询 SQL 数据库,并自动生成、调试与修正查询语句。
帮助用户跨项目连接 PostgreSQL,检查模式、执行查询并分析性能。
用自然语言查询和管理 Snowflake 数据库,完成 SQL、结构探索与监控。