Skip to content
AI

AI models, data models and the 20% of SQL you will use every day

A plain map of AI model types, the main ways to structure data, the SQL that covers most analysis, and where AI already saves analysts time.

Cover for the article: AI models, data models and the 20% of SQL you will use every day

Analysts are expected to know a little about AI, a fair amount about data and a lot about turning both into decisions. Here is a plain map of the three, without the hype.

Six kinds of AI model

TypeGood atExamples
Machine learningClassifying, predicting, spotting patterns in tables of dataDecision trees, gradient boosting
Deep learningUnstructured data: images, audio, textNeural networks, transformers
Language modelsUnderstanding and producing textChat assistants, summarisers
Generative modelsCreating new text, images or audioText and image generators
Hybrid systemsCombining rules or search with AI for accuracy and contextRetrieval-augmented generation
Computer visionDetecting and recognising things in images and videoObject detection, medical scans

For most business problems the first question is not which model, but whether a rule, a query or a spreadsheet would do. When it would not, the table above narrows the choice.

How data is shaped

Many reporting problems start with how data is modelled, long before anyone writes a query. The main shapes are worth recognising:

  • Relational tables linked by keys: the backbone of most business systems.
  • Dimensional (star schema): a fact table of events, such as sales, surrounded by dimensions such as date, product and customer. This is the usual shape behind Power BI and other dashboards.
  • Entity-relationship models: the design step that sets out entities and how they relate before building tables.
  • Graph models: nodes and connections, suited to networks, recommendations and fraud detection.
  • Data vault: hubs, links and satellites, built to keep full history and audit trails at scale.
  • Hierarchical and object-oriented models: trees and objects, common in configuration files and application code.

The SQL you will actually use

You do not need to master every function. A small set covers most daily work: SELECT and FROM to choose data, WHERE to filter, JOIN to combine tables, GROUP BY with SUM, COUNT and AVG to summarise, and ORDER BY to sort. Add CASE for simple categories and window functions when you need running totals or rankings.

One habit prevents most mistakes: check the number of rows after every join. If a join multiplies rows unexpectedly, every total after it is wrong.

Where AI already helps analysts

AI assistants are already useful for first drafts: emails, meeting notes and executive summaries; procedures such as a month-end close checklist or an expense policy; and first-pass analysis of cost, pricing, cash flow or sensitivity. They are also good at explaining unfamiliar SQL or formulas. Treat every number they produce as a draft to verify against the source.

In KPI reporting, the slow part is rarely the calculation. It is agreeing definitions and cleaning the data, and that still needs a person who understands the business.

Framework

From question to answer

  1. QuestionWrite the business question in one sentence
  2. DataFind the tables and how they join
  3. QuerySELECT, JOIN, filter, group and sort
  4. ModelAdd AI only where rules or SQL are not enough
  5. ExplainOne chart and three sentences a manager can act on

Checklist

Put it to work

0 of 6

Quick quiz

Check what stuck

  1. Which model type is built for images and video?

  2. In a dimensional (star) model, sales amounts usually sit in…

  3. Which SQL clause combines rows from two tables?

Recap cards

Tap a card to check yourself.

Sources and credits

Sarang

Business analyst and co-founder with e-commerce, marketing and operations experience since 2021. I co-founded three e-commerce businesses, including Earra, and I design and build products and websites end to end.

Read my story

Cookie settings

Choose which optional cookies this site may use. Essential ones stay on because the site cannot work without them.

Under UK GDPR you can ask what personal data is held about you, and have it corrected or deleted. Make a privacy request