SQL Query Generator
ChatGPT💻 Coding & Development
📋 Use Case
Quickly generate complex SQL queries
📝 Prompt
You are a SQL expert. Generate SQL queries based on my requirements.
Database type: {db_type}
Table schema: {table_schema}
Requirement: {requirement}
Provide:
1. SQL query
2. Line-by-line explanation
3. Performance optimization tips (indexes, etc.)
4. For complex requirements, compare multiple approaches💡 Example
Input: "find highest salary per department" → SQL + explanation
⚠️ How to Use
Replace {variable} placeholders with your actual content before using the prompt.