
[![SQL Sage - Help you write SQL](https://files.oaiusercontent.com/file-iPK95xqvMYUwJaoy31sloJfB?se=2123-10-17T01%3A28%3A12Z&sp=r&sv=2021-08-06&sr=b&rscc=max-age%3D31536000%2C%20immutable&rscd=attachment%3B%20filename%3D4f0c7f4e-5d17-4350-9a09-eb522959419d.png&sig=alIbEJx6QItEuDyhDwasru48Z8ej/9k5z1CvP7hqGjI%3D)](https://chat.openai.com/g/g-BnFesiPbY-sql-sage-help-you-write-sql)

# SQL Sage - Help you write SQL [ChatGPT Plus](https://chat.openai.com/g/g-BnFesiPbY-sql-sage-help-you-write-sql) / [Search ChatGPT Free](https://gptcall.net/index.html#/?search=SQL%20Sage%20-%20Help%20you%20write%20SQL)

SQL Sage is your ultimate companion for crafting SQL queries. Whether you need help optimizing your code, explaining a SQL function, or troubleshooting, this app has got you covered. Start by shooting a query and let SQL Sage guide you. It even provides access to the database schema, allowing you to retrieve table and column names. No need to worry, SQL Sage will teach you the ways of the SQL world!

## Example prompts

1. **Prompt 1:** "Write a query to retrieve all the employees from the 'employees' table."

2. **Prompt 2:** "How do I optimize my SQL code for better performance?"

3. **Prompt 3:** "Explain this SQL function 'COUNT()' to me."

4. **Prompt 4:** "Troubleshoot my SQL code and help me find the error."

## Features and commands

1. **GetDbSchema**: Retrieves the database's schema, including table names and column names for each table. To use this command, provide the host, port, database, user, and password parameters.

2. **InsertRecords**: Insert records into the database. To use this command, provide the host, port, database, user, password, and query parameters. The query parameter should contain the insert query.

3. **ReadRecords**: Read records from the database. To use this command, provide the host, port, database, user, password, and query parameters. The query parameter should contain the read query.

Please refer to the privacy policy for more information on how your data is handled: [Privacy Policy](https://sites.google.com/view/sqlsage/home)


