Databases · BASA-02

Practical SQL & Data Investigation for BA/SA

Practical SQL & Data Investigation for BA/SA is a hands-on course in using SQL to query and check data through real business questions, from joins and aggregation to CTEs, window functions, data profiling and root cause investigation. It suits business analysts, system analysts, support and QA teams, and you leave with a data quality report and a reusable query library.

Updated
From 7,110 THB / person 7,900 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration12 hours · 2 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

Many business analysts and system analysts have to wait for the development team or a DBA to pull data every time they need to check a problem case. The cycle is slow, and the data that comes back often does not answer the real question. Yet writing SQL well enough to investigate data is not as hard as it looks, and it is one of the most rewarding skills in analysis work.

This course does not teach SQL in order of syntax. It teaches through real business questions. Learners start from a question such as "why does this month's sales figure not match the report" and build up the SQL to answer it step by step, from filtering, joining and summarising data to CTEs, window functions and data profiling techniques that expose anomalies. Every lab comes with worksheets at two levels for mixed-ability groups, and the NovaRetail case study runs throughout. (2 days, 6 hours per day, 12 hours in total, Beginner to Intermediate level.)

What you’ll gain

  • Write SQL to query data and answer business questions independently
  • Understand every type of join and choose the one that matches the business meaning
  • Summarise and group data with aggregate functions, GROUP BY and HAVING
  • Use subqueries, CTEs and window functions for more advanced analysis
  • Profile data to find duplicates, missing values and anomalies
  • Investigate the root cause of data problems systematically
  • Understand the basics of query performance and write SQL that does not burden production systems
  • Turn query results into basic reports and dashboards

Who this course is for

  • Business analysts and system analysts who need to check data to confirm requirements or analyse problems
  • Support teams and application owners who investigate the cause of cases reported by users
  • MIS and reporting teams, and anyone who pulls data for management reports
  • Testers and QA staff who check system results against the data in the database
  • People who have written some SQL but are not yet confident with joins and aggregation

Prerequisites

  • An understanding of tables, rows and columns at the level of an Excel user
  • An understanding of the business processes you are responsible for, so you can relate them to the data
  • Some exposure to database structures or ERDs (Data Analysis & Modeling for BA/SA (BASA-01) helps a lot but is not required)
  • No prior SQL is needed; a pre-course SQL primer is sent one week ahead (about 2 hours of reading)
  • A laptop with permission to install software, at least 8 GB of RAM and DBeaver Community Edition installed before the course

Curriculum

Course Details

This course is part of the BA/SA series (BASA-00 to BASA-04). It runs for 2 days, 6 hours per day (12 hours in total, 09:00-16:00), as lectures with labs and workshops built on NovaRetail, a fictional retailer whose monthly sales report does not match the figures from its stores. Beginner to Intermediate level, with no prior SQL required. Every lab

has worksheets at two levels with worked answers. Unlike a general SQL fundamentals course, it focuses on checking and investigating data from the data user's point of view. It does not cover administration work such as in-depth index design, server tuning, stored procedures, triggers, backup or replication. Learners take home an SQL cheat sheet and a query library of more than 30 data-checking queries.

Day 1 Querying, Joining and Summarising Data to Answer Business Questions

Section 1: Getting to Know the Database You Work With

  • Relational database structure from the data user's point of view
  • Read ERDs and data dictionaries to plan before writing a query
  • Explore unfamiliar tables in DBeaver: structure, sample data and relationships
  • Safety discipline: work on a read-only replica and always use LIMIT
  • Lab: connect to the NovaRetail database in DBeaver and explore its tables

Section 2: Lab: Everyday Querying Essentials

  • The structure of SELECT and the order in which the database actually runs it
  • Filter data with WHERE, IN, BETWEEN, LIKE and wildcards
  • Handle NULL values, one of the top causes of wrong reports
  • Sort, limit rows and remove duplicates with DISTINCT
  • Text, number and date functions, type conversion, and CASE WHEN for business grouping

Section 3: Joining Tables the Way the Business Means It

  • Primary keys and foreign keys from the point of view of joining data
  • INNER, LEFT, RIGHT and FULL OUTER JOIN with diagrams and business examples
  • A common trap: inflated results from an unintended one-to-many join
  • Self joins for hierarchical data such as org charts or product categories
  • Lab: join several tables and verify the join before using the result

Section 4: Summarising Data for Reports

  • Aggregate functions COUNT, SUM, AVG, MIN and MAX, and NULL pitfalls
  • Multi-level GROUP BY and choosing the report grain that fits the question
  • HAVING versus WHERE, and when to use each
  • Reports by period: daily, monthly and year-on-year comparisons
  • Lab: summarise sales and filter the totals with HAVING

Section 5: Workshop Day 1: NovaRetail Business Questions

  • Take 10 business questions from NovaRetail's marketing and accounting teams
  • Write the SQL yourself, choosing the basic or the challenge worksheet
  • Build a monthly sales report by branch and product category
  • Review the worked answers line by line and compare approaches in the group
Day 2 Deeper Analysis and Investigating Data Problems

Section 6: Lab: Subqueries, CTEs and Window Functions

  • Types of subquery, and chained CTEs (WITH) that break a big question into readable steps
  • Use UNION and EXCEPT to compare two sets of data
  • OVER, PARTITION BY and ORDER BY in plain language
  • ROW_NUMBER, RANK and DENSE_RANK to rank rows and find the latest row in each group
  • LAG, LEAD, running totals and moving averages to compare periods and spot trends
  • Use window functions to find duplicates that should exist only once

Section 7: Data Profiling: Know Your Data Before You Trust It

  • Completeness: the share of missing values in each column
  • Uniqueness: duplicates that should not exist, such as member card numbers or product codes
  • Consistency: orphan records that point to data that does not exist
  • Plausibility: negative values, future dates and values outside the allowed range
  • A standard data quality report you can reuse on every project

Section 8: Systematic Root Cause Investigation

  • Form a hypothesis, design a query to test it and summarise the evidence
  • Trace discrepancies in figures between two systems
  • Check the history of data changes through audit log tables
  • Write a one-page investigation summary that management can follow

Section 9: Query Performance and Safety

  • Read EXPLAIN at a basic level: sequential scan versus index scan
  • Query patterns that stop an index from being used, and how to avoid them
  • Good practice when you have to query a production system
  • PDPA: mask personal data before sharing results with others

Section 10: Lab: From Results to a Report You Can Present

  • Export results to Excel or CSV correctly
  • Build questions and a dashboard in Metabase from your own SQL
  • Set up filters and parameters so business users can view the report themselves

Section 11: Master Workshop: NovaRetail Data Investigation

  • Find out why the sales report does not match the store figures
  • Check for duplicates, orphan records and cancelled orders still being counted
  • Produce a data quality report with findings and recommendations, and present it to the group

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

Who is Practical SQL & Data Investigation for BA/SA for, and what background is needed?

Built for Business analysts and system analysts who need to check data to confirm requirements or analyse problems · Support teams and application owners who investigate the cause of cases reported by users · MIS and reporting teams, and anyone who pulls data for management reports Background you should have: An understanding of tables, rows and columns at the level of an Excel user · An understanding of the business processes you are responsible for, so you can relate them to the data Not sure the fit is right? Talk to our team on LINE @itgenius or call 02-570-8449.

How much does Practical SQL & Data Investigation for BA/SA cost and how long does it run?

THB 7,900 (currently THB 7,110 on promotion). The course runs 12 hours. The price excludes 7% VAT (for payment in a company's name). Pay by bank transfer to the company account, confirm it on our payment page, and we can issue the receipt or tax invoice in your company's name.

Do I get a certificate?

Yes. Everyone who completes the course receives a Certificate of Completion from IT Genius Institute. Each certificate carries its own number, and anyone holding that number can verify it online on our certificate page, so you can add it to your portfolio or pass it to HR as evidence of training.

Where does the training take place, and is there an online option?

You can attend onsite at IT Genius Institute or arrange to join online, and we also run it as a private in-house session for your team. Ask about dates and venues on LINE @itgenius or call 02-570-8449.

What if I fall behind or miss a session — can I retake it?

Yes. You may retake the same course free of charge in a later round, under the institute's conditions. Tell our team which course and round you attended, and we will check it and offer you the rounds that still have seats. Ask us on LINE @itgenius or call 02-570-8449.

How do I enrol, or request a quotation for my company?

Enrol online with the registration form on this page. You can register several attendees at once and enter your tax ID and billing address for the tax invoice. Or request a company quotation straight from the quote button. For anything else call 02-570-8449 or reach us on LINE @itgenius.

Related articles

Articles are published in Thai.