Skip to content

Repository files navigation

Database Query Prompts Collection

This collection contains organized prompts for various database operations and query scenarios. Each prompt is designed to help you get the most effective assistance when working with databases.

Folder Structure

📊 Query Analysis & Debugging

  • analyzing-query-breakdown.md - Break down complex queries to understand their components
  • debugging-syntax-errors.md - Fix syntax errors in SQL queries

⚡ Query Optimization

  • query-optimization-efficiency.md - Improve query performance and efficiency
  • execution-plan-analysis.md - Analyze and interpret query execution plans

✍️ Query Writing

  • writing-query-specific-scenario.md - Create queries for specific business scenarios
  • complex-scenarios-constraints.md - Handle complex requirements with multiple constraints
  • joining-multiple-tables.md - Write efficient multi-table join queries

🗃️ Table Management

  • removing-records.md - Safely delete records from tables
  • altering-table-attributes.md - Modify table structure (add/modify columns)
  • renaming-table-safely.md - Rename tables without breaking dependencies

💾 Data Management

  • creating-table-backup.md - Create comprehensive table backups
  • querying-table-summary.md - Generate table summaries and statistics
  • scheduling-automated-backups.md - Set up automated backup processes
  • archiving-old-data.md - Archive historical data efficiently
  • data-sampling.md - Extract representative data samples

🔍 Data Quality

  • identifying-duplicate-data.md - Find and manage duplicate records

How to Use These Prompts

  1. Choose the right prompt based on your specific need
  2. Replace the variables in curly braces {variable} with your actual values
  3. Customize the prompt if needed for your specific situation
  4. Use with your preferred AI assistant for database help

Variable Replacement Guide

Most prompts use these common variables:

  • {technology} - Your database system (MySQL, PostgreSQL, SQL Server, etc.)
  • {table_name} - Name of the table you're working with
  • {query} - The SQL query in question
  • {constraints} - Any limitations or requirements
  • {objective} - What you want to accomplish

Tips for Best Results

  • Be as specific as possible when replacing variables
  • Include relevant schema information when available
  • Mention any performance or security requirements
  • Provide error messages exactly as they appear
  • Include sample data structure when helpful

Contributing

Feel free to modify these prompts to better suit your specific database environment or use cases.


Created: June 10, 2025

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors