Analyze with AI agents
No table names, no SQL. Just ask in natural language to explore and analyze the data
With an AI agent such as Claude Code or Codex and the Queria skill installed, you can analyze Queria’s data in natural language. No need to look up table names or write SQL by hand.
This guide walks through an interactive analysis of the question “which towns in Japan are growing in population?”
Prerequisite: the Queria skill is installed. To do the same by connecting to DuckDB directly without the skill, see the connection guide.
Find the data
You have a theme to analyze, but no idea which table to use. Just ask the agent and it searches the catalog for matching tables.
Does Queria have any population data?
The agent searches the catalog metadata and suggests candidates.
The e_stat dataset has a table
a_municipal_population(population and households by municipality). It has columns such as area, area_name, year, item_name, and value.
You don’t need to know table or column names in advance. Say “population” in natural language and the agent runs the right searches and tells you which tables you can use.
Ask your first question
Once you’ve found a table, state what you want to analyze, as-is.
Show me the top 20 municipalities with growing populations
The agent generates and runs the complex SQL automatically and returns the results.
| area_name | pop_2015 | pop_2020 | growth_rate_pct |
|---|---|---|---|
| Chuo City, Tokyo | 141,183 | 169,179 | 19.83 |
| Nagareyama City, Chiba | 174,373 | 199,849 | 14.61 |
| Nishi Ward, Osaka City, Osaka | 92,430 | 105,862 | 14.53 |
| … | … | … | … |
Without writing a single line of SQL, you get results that include growth-rate calculations and year-over-year comparisons.
Dig deeper
Seeing the results makes you want to dig further — that’s the joy of analysis. The agent remembers the recent context, so just keep asking.
Why are the top municipalities growing? Check the net migration data too
Building on the previous results, the agent fetches in- and out-migration data and analyzes the drivers of the population growth.
You can also dig in from another angle.
Compare the age structure too. I want to know if it’s younger people or seniors
Start from one question, look at the results, and stack the next question on top. This interactive flow is the strength of analyzing with AI agents.
Ask for interpretation
Once the numbers are in, it’s time to think about what they mean.
What can we say from this data?
The agent explains patterns and offers hypotheses grounded in the aggregates — for example, “the top ranks are redeveloping central-city wards and commuter towns near major cities, and the influx of families raising children is likely the main driver.”
Rather than just reading the data back, it verbalizes the story behind the numbers, which also makes it a useful first draft for reports and articles.
Tips for analysis
Pointers for analyzing effectively with an agent.
Start with a concrete question: Instead of “analyze the data”, ask something whose answer shape you can imagine — “which municipalities are growing in population?” — and accuracy improves.
Let the results drive the next question: Rather than asking for everything at once, checking results and drilling down step by step produces better analysis.
Give a comparison axis: Saying how to compare — “show the trend by year”, “compare across regions”, “split by gender” — gets you precise aggregations.
State a hypothesis and ask for verification: Attach a hypothesis like “aren’t commuter towns the ones growing?” and the agent builds the queries to test it.
Next steps
- Haven’t installed the skill yet → see the Queria skill for per-agent installation
- Want to turn your analysis into an article → browse published examples in the Showcase
- Want to try queries and charts in the browser → the introduction walks through working with datasets
