Can an AI SQL Agent build a weighted scoring system from scratch?
Published: September 15, 2025
Try it yourself. I'm sharing RBI data + instructions. Run it on DATS-4 SQL Agent and get a full analysis as multi-page PDF report.
A common analytics task → subjective segmentation and ranking.
The Data
Reserve Bank of India, Monthly ATM/POS/Cards Stats, July 2025.
RBI publishes this as Excel. If you need CSV: use my Excel-to-CSV RBICC converter tool: app.tigzig.com/rbi-cards
The Task
- Create a weighted composite score to rank Indian banks on credit cards.
- Derive ratios and new variables to support the ranking.
How to Run It
1. Go to DATS-4 → app.tigzig.com → Database AI & SQL Apps → DATS-4.
- Click Try Sample → Select dataset → Use Temporary Database. Zero setup.
2. Give the Instructions → Copy the provided prompt.
- The ask: rank banks, design a scoring system, derive new variables, generate charts, and explain the process.
3. Review Analysis → Agent shares full plan, SQL, debugging steps, and reasoning.
4. Iterate → Adjust weights or logic. Rerun to see updated results.
5. Get Report → Ask for PDF output in A4 width (Supports text only for now)
Reality Check
Live work isn't click-click and out pops a PDF. This is the final 5%. In live projects, the 95% is:
- Data Marts & Cleaning → recons, data cleaning, data formats, joining vars
- Agent Setup → agents misfire, over-query, miss variables. Getting reliable behavior is iterative and sometimes frustrating.
- Infra → UI, backends, monitoring, auth, access controls, costing
- Security → The public facing app routes all API calls via my backend. Use it for sandbox testing only. For live deploy: run on your own VPN / harden auth.
Data Size
This example uses a 64-row aggregated file. The reasoning process is the same whether 64 rows or 64M. For larger workloads, see my previous cricket data post, and earlier posts on agents running analytics across multiple tables with millions of records.
DATS-4 is fully functional and Open Source
- Source Code → Docs → Build It (on app site)
- AI SQL Apps → voice-connected, ChatGPT-to-database, rapid deploy options
- SQL Agent Field Guide → 49 pages of practical setup guidance. Download PDF