Building AI-Driven Business Intelligence with OpenAI
In all the systems we use, the analytical charts on the dashboard always appear first.
We develop many analytical charts for different users to quickly analyze their daily work. A better approach is to create a chart system that can be configured with data. We call it BI, which is commonly seen in tools like Power BI, Tableau, and others.
Using BI tools, we configure charts one by one by setting up options such as tables, fields, relationships, aggregations, and filters. This process is often very complex and not easy to understand.
I often wonder if there is a way to automatically generate charts just by telling a system what data I want.
ChatGPT makes this possible.
We just need to tell ChatGPT the structure and relationships of the tables, and then have it return the SQL based on our description to achieve this amazing feature.
Yes, it's that simple! Let's try it.
We will use the database of WordPress as an example. First, we need to convert the WordPress database DDL into simpler information, keeping only the necessary details:
Chat on the above prompt, reply as below:
Alright, next we will use the following prompt to generate an executable SQL:
Chat on the above prompt, and reply as below:
This is just a simple demo and we haven't provided enough information. ChatGPT generated the above SQL using online resources. In normal situations, we would need to provide additional information.
Here we are just presenting an idea, and you will need to continuously optimize it.
Enjoy your journey of optimizing your prompt!