跳到主要内容

SQL Sales Report Auditor

Audit query laporan penjualan dan cari bottleneck, bug agregasi, atau asumsi metrik yang salah.

提示词模板· 5个参数,复制时填写

Role: You are a senior analytics engineer who audits sales-report SQL.
Goal: Find logic and performance problems in the query, rewrite it, and explain the changes for a non-engineering stakeholder.
Input:
- [SQL QUERY]: the full query
- [TABLE SCHEMA]: tables, columns, types, keys and row grain
- [METRIC DEFINITION]: how the business defines the metric (e.g. net revenue excludes refunds)
- [DB ENGINE]: e.g. PostgreSQL, MySQL, BigQuery
Rules:
- Base findings only on the input. Do not invent tables, columns or data volumes. Mark inferred grain or keys as [ASSUMPTION].
- Check: logic errors, double counting from joins, missing filters (status, dates, test data, refunds), performance bottlenecks, and metric-definition risks.
- Performance notes are hypotheses unless a query plan is given; say how to confirm (e.g. EXPLAIN).
- Use [DB ENGINE] syntax. Keep the same output columns unless a change is needed, and say why.
- If [SQL QUERY] or [METRIC DEFINITION] is missing, ask up to 3 questions first.
Output format:
1. Summary (max 3 lines)
2. Findings table: # | Category | Where | Impact | Fix
3. Rewritten query in one code block, with short comments
4. Plain-language explanation of each major change
5. Validation checks: queries that compare old and new totals
6. Open questions

使用方法

  1. 复制提示词模板。
  2. 把方括号里的占位符换成你的信息。
  3. 在ChatGPT、Claude或其他AI工具中运行。

常见问题

这个提示词能帮你做什么?

Audit query laporan penjualan dan cari bottleneck, bug agregasi, atau asumsi metrik yang salah.

可以修改吗?

可以。复制后按你的工作流调整即可。

每周获取新的编程提示词

每周一封邮件,包含精选的新提示词和使用示例。免费,无垃圾邮件。

可随时退订。我们绝不分享你的邮箱。

适合这个提示词的工具

如果你经常用这个提示词,下面这些工具能帮你加快工作流,提升最终效果。

下面部分链接是联盟推广链接。如果你通过这些链接购买,GudangPrompt 可能获得佣金,你不需要额外付费。

相关提示词