Definitive Facts
The ChatGPT plugin called Definitive Facts is a powerful tool designed to generate and execute SQL queries against various relational datasets using natural language inputs. It provides access to over 100 datasets related to sports, finance, and other domains. By asking questions, users can receive definitive facts and accurate data on their queries. It is important to note that SQL should not be sent directly to the generate-SQL endpoint, and only the SQL generated by the plugin should be executed.
To use the Definitive Facts plugin, users start by asking a question about the desired information. For example, they could inquire about the average temperature in New York in July or the number of pet owners in the US. The plugin then translates the question into SQL, a language understood by databases, and displays the generated query. After that, the plugin executes the SQL query on the relevant dataset. Users need to be patient as the plugin searches for the answer. Once found, the plugin provides a link to view the result, which is also compatible with Python pandas for further data analysis.
The benefits of the Definitive Facts plugin lie in its ability to extract specific information from large datasets quickly and accurately. With this plugin, users can easily obtain answers to complex questions, conduct research, and analyze data trends. The plugin acts as a personal assistant, helping users navigate through vast amounts of data and retrieve the exact information they need. The generated SQL queries and the JSON format of the execution result enhance the usability of the plugin, making it a valuable tool for data-driven tasks.
Example Prompt 1:
Question: "What is the average GDP growth rate of China in the past decade?"
Plugin Response: The plugin generates an SQL query to retrieve the average GDP growth rate of China for the past decade from the relevant dataset. It executes the query and provides a link to view the result, which can be further analyzed using Python pandas.
Example Prompt 2:
Question: "What is the highest scoring NBA game of all time?"
Plugin Response: The plugin generates an SQL query to find the highest scoring NBA game of all time from the sports dataset. It executes the query and provides the result, letting the user view the details of the game.
Example Prompt 3:
Question: "What is the population of Tokyo?"
Plugin Response: The plugin generates an SQL query to fetch the population of Tokyo from the relevant dataset. It executes the query and provides the result, allowing the user to know the current population of Tokyo.
Example Prompt 4:
Question: "How many Oscar-winning movies were directed by Steven Spielberg?"
Plugin Response: The plugin generates an SQL query to count the number of Oscar-winning movies directed by Steven Spielberg from the movie dataset. It executes the query and provides the result, giving the user the exact count of Spielberg's Oscar-winning movies.
Example Prompt 5:
Question: "What is the average salary of software engineers in California?"
Plugin Response: The plugin generates an SQL query to calculate the average salary of software engineers in California from the relevant dataset. It executes the query and provides the result, enabling the user to get an idea of the average salary in that occupation and location.