AI-powered SQL analysis of livable communities
The AI assistant in DataV-Note generates SQL queries from natural language descriptions (a feature known as NL2SQL), reducing coding time and manual effort. This case study demonstrates how to use SQL analysis with AI assistance to analyze residential data in Hangzhou to find livable communities with low populations, pleasant environments, and new buildings.
Usage notes
Each SQL analysis unit has an AI assistant that you can activate with a click. You can enter your requirements in natural language, and the system analyzes your input and provides results. For more information about the features of the AI assistant, see Use the AI assistant.
Prerequisites
You have created a project.
Prepare the data
Click hangzhou-residential-analysis-data.csv to download the sample data to your local machine. You will need to upload this file to DataV-Note to perform query and analysis.
This sample data is fictitious and for demonstration purposes only.
Go to the project edit page
Log in to the DataV-Note Console.
On the tab, hover over the project and click Edit to open its edit page.
Analyze livable residential communities
Upload the CSV file.
On the Datasets tab in the left panel on the project edit page, click the
icon next to File Datasets and follow the on-screen instructions to upload the residential data file.NoteFor more information about importing file data, see Using raw datasets.
Create an SQL analysis unit.
In the File Datasets list on the left, hover over the residential dataset, click the
icon, and select Create SQL Query. The system automatically generates an SQL analysis unit, a query statement, and a query result set from the data table.
Use the AI assistant for analysis.
Click AI Assistant in the upper-right corner of the SQL analysis unit to activate it.
Enter your requirements in natural language. The AI assistant analyzes the dataset based on your input and generates a corresponding SQL statement. It also provides analysis insights and syntax explanations.
Example input: "Help me find villas in Hangzhou with a population of less than 500 that were built after 2020."

On the AI analysis interface, click Insert into New Unit to place the generated SQL statement in a new SQL analysis unit.
Click Run to view the matching residential communities.

Related documents
For more information about AI features, see Use AI to generate an analysis report with one click.
For more information about analysis units such as charts, text, and controls, see Supported analysis unit types.
For more case studies, see Apparel company sales analysis case study.