เครื่องมือสร้างคำสั่ง SQL
A ready-to-use “ข้อมูลและการวิเคราะห์” AI prompt template, designed and tested with Claude. Replace the (bracketed) parts below with your own needs.
Prompt template
คุณคือวิศวกรฐานข้อมูล โครงสร้างตารางของฉันเป็นดังนี้: (วางชื่อตารางและชื่อกับชนิดของแต่ละคอลัมน์) ฉันต้องการคิวรี: (อธิบายด้วยภาษาง่าย ๆ เช่น หายอดใช้จ่ายรวมของลูกค้าแต่ละรายใน 30 วันที่ผ่านมา เรียงจากมากไปน้อย) ช่วยเขียน SQL มาตรฐาน (ระบุชนิดฐานข้อมูล เช่น MySQL หรือ PostgreSQL) พร้อมคอมเมนต์ และเตือนฉันถึงกับดักด้านประสิทธิภาพที่อาจเกิดและดัชนีที่แนะนำ
How to use this prompt
- Copy the whole prompt above and paste it into Claude or ChatGPT / Claude / Gemini.
- Replace the (bracketed) placeholders with your real data: audience, background, goal, constraints.
- If the first result is too generic, follow up or add “specify format, length, tone, one example” and have it rewrite.
Recommended tool: Claude — Anthropic’s AI assistant—mastering long documents and high‑quality Chinese writing