Langsung ke konten

SQL Sales Report Auditor

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

Template prompt· 5 parameter, isi pas copy

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

Cara pakai

  1. Copy template prompt-nya.
  2. Ganti placeholder dalam kurung siku pakai detail kamu.
  3. Jalankan di ChatGPT, Claude, atau tools AI lainnya.

FAQ

Prompt ini buat bantu apa?

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

Boleh aku edit?

Boleh banget. Copy aja, terus sesuaikan sama workflow kamu.

Dapat prompt Coding baru tiap minggu

Satu email per minggu isinya prompt pilihan yang baru kami kurasi, plus contoh cara pakainya. Gratis, no spam.

Bisa unsubscribe kapan aja. Email kamu nggak bakal kami share.

Tools yang relevan buat prompt ini

Kalau kamu sering pakai prompt ini, tools berikut bisa bantu ngebut workflow dan hasil akhir kamu.

Beberapa link di bawah adalah link afiliasi. Kalau kamu beli lewat link itu, GudangPrompt bisa dapat komisi tanpa biaya tambahan buat kamu.

Prompt terkait