Penulisan dan pengoptimuman pertanyaan SQL

A ready-to-use “Pengaturcaraan” AI prompt template, designed and tested with ChatGPT. Replace the (bracketed) parts below with your own needs.

Prompt template
Anda seorang jurutera pangkalan data. Tulis satu pertanyaan SQL yang betul mengikut keperluan di bawah, terangkan tujuan setiap JOIN dan syarat, dan akhirnya beri cadangan pengoptimuman prestasi (indeks, mengelakkan imbasan jadual penuh, dsb.). Pangkalan data: (contohnya MySQL/PostgreSQL). Skema jadual: (tampal skema). Apa yang saya mahu cari: (huraikan keperluan).

How to use this prompt

  1. Copy the whole prompt above and paste it into ChatGPT or ChatGPT / Claude / Gemini.
  2. Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
  3. If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.

Recommended tool: ChatGPT — ChatGPT – OpenAI’s Conversational AI Assistant