SQL Without Analysts: How ecom.tech Got Local LLMs to Write Queries

The ecom.tech team tackled a perennial business problem: endless queues for analysts over simple data pulls. Instead of hiring more staff, they deployed a system built on local language models that generate SQL queries from a text description. This is not just another chatbot but an attempt to shift routine work onto hardware while keeping data fully confidential. Using local models removes the security questions that inevitably arise when working with cloud giants. As a result, analysts can finally focus on complex research, while managers get their figures in seconds. It is an important step toward real data democratization inside large corporations.

AI-processed from Habr AI; edited by Hamidun News
SQL Without Analysts: How ecom.tech Got Local LLMs to Write Queries
Source: Habr AI. Collage: Hamidun News.
Listen to article

Every time a manager needs sales data for last Thursday, somewhere in the world an analyst sighs. At ecom.tech they decided they had had enough. Instead of burying the analytics department in repetitive tickets, the team built a system in which a local neural network writes the SQL queries. It is a classic story of automation saving people from burnout, and the company from pointless time losses.

Let's be honest: SQL is the Latin of modern business. Everyone knows it exists, but only a handful speak it. It used to take hours, sometimes days, to get from the question "how much did we sell?" to an answer. An analyst had to pull away from deep research and the hunt for insights to write yet another trivial query. That is not just inefficient; it kills professionals' motivation by turning them into living interfaces to databases. The ecom.tech team realized this process was an ideal candidate for optimization with LLMs.

Why local models specifically? It might seem easier to plug in an API from OpenAI or Anthropic and enjoy life. But no sane security department in large retail will allow the database structure, table names and sensitive business metrics to be sent to external servers. So ecom.tech took the harder but correct path of self-hosted solutions. It demands more compute up front, but the legal department sleeps soundly and the data never leaves the company perimeter.

Technically, it looks like an intelligent bridge between human language and the strict syntax of databases. The model receives a description of the data schema and the user's question, and outputs ready-to-run code. Of course, this is not magic, and neural networks sometimes make mistakes. Still, even if the AI produces correct code in most cases, that is already a huge saving of resources. ecom.tech built a system that lets them verify queries and fine-tune the model on the company's specific scenarios. The remaining complex cases, which require a deep understanding of business logic, still belong to humans, but their number has fallen several-fold.

What does this change for the industry as a whole? We are seeing a real trend toward data democratization. If access to figures used to be a privilege of those who can code, the barrier to entry is now dropping to the ability to state your thoughts clearly. This frees analysts from the role of "data fetchers" and returns them to the role of strategists. Now they configure the system and monitor data quality instead of spending 80% of their time writing basic selects.

The bottom line: the analyst as a "translator from human to computer" is gradually fading into the past. The future belongs to those who can build such self-service systems. Will local models be able to fully displace manual SQL within the next couple of years?

Story
ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Unified AI Workspace · Nomad

Test Frontier LLMs & Autonomous Agents in One Workspace

Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.

Try Nomad AI →Launch Nomad Agent
What do you think?
Loading comments…