SQL for Analysts: Ask a Database Anything

Write the SQL that answers real business questions, from your first SELECT to joins, aggregation, subqueries, window functions and queries you can hand to a manager with confidence.

Start learning free More Data & Tech courses

Free account required to open the lessons. No card, no fees.

About this course

Every serious company keeps its data in a database, and the analysts who can ask it questions directly, without waiting for someone else to export a spreadsheet, are the ones who get answers first and get promoted. This course teaches SQL the way analysts actually use it. You set up a free database on your own laptop from the course's practice files (the same Mama Ngozi Foods business used across Skillnaija's data courses: sales, products, customers, branches and staff), then learn to select and filter, sort and limit, aggregate with GROUP BY and HAVING, join tables, work with dates and text, build subqueries and common table expressions, use window functions for running totals and rankings, and write clean, readable queries that others can maintain. Along the way you learn how databases are designed, why joins produce wrong totals when keys are misunderstood, how to check your own numbers, and how to turn a manager's vague question into a precise query. Syntax differences between SQLite, MySQL, PostgreSQL and SQL Server are pointed out where they matter, so what you learn transfers to any Nigerian employer's system.

Kemi Adebayo started as an analyst at Mama Ngozi Foods on a Monday. By Wednesday she had asked the accountant for the sales figures three times and received three different Excel files, each exported on a different day, each with a different total for March. On Thursday Mrs Ngozi Okonkwo, the general manager, asked her a simple question in the corridor: 'How many invoices did Agege raise last month, and how many of them are still unpaid?' Kemi had no way to answer it that she trusted. The accountant's software knew. It kept every invoice in a database. Nobody in the office knew how to ask that database anything without going through the accountant. By the end of this course, Kemi can, and so can you.

What you'll learn

Course syllabus — 12 lessons

  1. What a database is, and getting one for free15 min
  2. SELECT, WHERE, ORDER BY, LIMIT: asking your first real questions16 min
  3. Counting and summing: GROUP BY and HAVING16 min
  4. Joining tables: names instead of codes16 min
  5. Dates, text and CASE: shaping the answer16 min
  6. Subqueries: a question inside a question16 min
  7. Common table expressions: queries you can read15 min
  8. Window functions: rankings, running totals and month-over-month16 min
  9. Set operations, data quality and the checks you run before trusting a report16 min
  10. Changing data and building tables, carefully16 min
  11. From a manager's question to a query16 min
  12. SQL at work: dialects, tools and next steps17 min

Your project

Your Management Query Pack

One document (Google Doc with view access, or an uploaded PDF or Word file) with every query as text, its results, and the findings report. A link to a public repository with a .sql file is welcome in addition.

Certificates on Skillnaija are earned, not issued for attendance: you submit this project, it is graded against a rubric, and passing issues a certificate anyone can verify. See the full project brief, rubric and free workbook →

Frequently asked questions

Is SQL for Analysts: Ask a Database Anything free?

Yes. SQL for Analysts: Ask a Database Anything is completely free on Skillnaija. You need a free account to open the lessons, and there is no charge for the course, the project, or the certificate.

How long does SQL for Analysts: Ask a Database Anything take to complete?

6 weeks · ~4 hrs/week. There are 12 lessons, about 3 hours of material in total. You learn at your own pace and your progress is saved.

Do I need any experience to start SQL for Analysts: Ask a Database Anything?

Beginner-friendly. You can start from scratch — no prior experience is assumed.

What will I learn in SQL for Analysts: Ask a Database Anything?

You will build practical skills in Setting up a free local database, SELECT, WHERE, ORDER BY and LIMIT, GROUP BY, HAVING and aggregate functions, INNER, LEFT and self joins, Dates, text and CASE expressions, Subqueries and common table expressions, Window functions: running totals and rankings, Understanding keys, tables and relationships, Checking and reconciling query results, Turning business questions into queries, Writing readable, maintainable SQL, Dialect differences across SQLite, MySQL, PostgreSQL and SQL Server. Every lesson is written for a Nigerian context, with examples drawn from how the work is actually done and paid for here.

Do I get a certificate for SQL for Analysts: Ask a Database Anything?

Yes, but it has to be earned. You complete the course project — Your Management Query Pack and submit it for grading. Passing the project issues a verifiable certificate; finishing the lessons alone does not.

Related Data & Tech courses

Ready to start SQL for Analysts: Ask a Database Anything?

It's free, it's self-paced, and it ends with something you can show an employer.

Start learning free