{"id":3711,"date":"2026-10-30T08:16:09","date_gmt":"2026-10-30T05:16:09","guid":{"rendered":"https:\/\/niteducation.com\/resources\/?p=3711"},"modified":"2026-10-30T08:16:12","modified_gmt":"2026-10-30T05:16:12","slug":"what-is-sql-for-data-analysis","status":"publish","type":"post","link":"https:\/\/niteducation.com\/resources\/what-is-sql-for-data-analysis\/","title":{"rendered":"SQL for Data Analysis: What It Is + Beginner Examples"},"content":{"rendered":"\n<!--\n  Newton Institute of Technology \u2014 Resource Article 211\n  WordPress page title supplies the only semantic H1.\n  Master Stylesheet: NIT-Articles-Master-v6.0.css (locked)\n  No inline CSS, no article-specific CSS, no embedded images.\n-->\n<article class=\"nit-article nit-article--pathway-guide nit-article--software\" itemscope itemtype=\"https:\/\/schema.org\/Article\" aria-labelledby=\"nit-article-title\">\n  <meta itemprop=\"datePublished\" content=\"2026-10-29\">\n  <meta itemprop=\"dateModified\" content=\"2026-10-29\">\n  <meta itemprop=\"inLanguage\" content=\"en-KE\">\n  <meta itemprop=\"author\" content=\"Newton Institute of Technology Editorial Team\">\n\n  <div class=\"nit-pg-hero\">\n    <div>\n      <p class=\"nit-pg-kicker\">NIT Data Skills Guide <span>Beginner SQL \u00b7 2026<\/span><\/p>\n      <p class=\"nit-hero__title\" id=\"nit-article-title\" itemprop=\"headline\">What Is SQL for <span>Data Analysis?<\/span><\/p>\n      <p class=\"nit-pg-hero__line\">Question <i>\u2192<\/i> query <i>\u2192<\/i> checked result <i>\u2192<\/i> interpretation<\/p>\n      <p class=\"nit-pg-hero__summary\" itemprop=\"description\">Learn why Data Analysts use SQL, how a database question becomes a query, and how to check whether the answer is safe to trust\u2014using simple school, payment and business examples.<\/p>\n      <div class=\"nit-pg-hero__actions\">\n        <a class=\"nit-pg-button nit-pg-button--gold\" href=\"#first-query\">See your first SQL query<\/a>\n        <a class=\"nit-pg-button nit-pg-button--outline\" href=\"#practice\">Try the beginner challenge<\/a>\n      <\/div>\n    <\/div>\n    <div class=\"nit-pg-hero__art\" aria-label=\"SQL analysis example\">\n      <p>SQL analyst view<\/p>\n      <div class=\"nit-code-window\" role=\"img\" aria-label=\"SQL query that groups sales by product for the Migori branch\">\n      <div class=\"nit-code-window__bar\"><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__file\">analysis.sql<\/span><\/div>\n      <div class=\"nit-code-window__body\"><span class=\"nit-code-line\"><span class=\"nit-code-comment\">&#8212; ask a precise question<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">SELECT<\/span> <span class=\"nit-code-name\">product<\/span>,<\/span><span class=\"nit-code-line\">       <span class=\"nit-code-keyword\">SUM<\/span>(<span class=\"nit-code-name\">amount<\/span>) <span class=\"nit-code-keyword\">AS<\/span> <span class=\"nit-code-name\">sales<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">FROM<\/span> <span class=\"nit-code-name\">transactions<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">WHERE<\/span> <span class=\"nit-code-name\">branch<\/span> = <span class=\"nit-code-string\">&#8216;Migori&#8217;<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">GROUP BY<\/span> <span class=\"nit-code-name\">product<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">ORDER BY<\/span> <span class=\"nit-code-name\">sales<\/span> <span class=\"nit-code-keyword\">DESC<\/span>;<\/span><span class=\"nit-code-line\"><span class=\"nit-code-comment\">&#8212; check result<\/span><\/span><\/div>\n    <\/div>\n    <\/div>\n    <div class=\"nit-pg-hero__meta\" aria-label=\"Article preparation and review\">\n      <p><span>Prepared by<\/span>Newton Institute of Technology Editorial Team<\/p>\n      <p><span>Technical review<\/span>Engineer Simon Barongo<\/p>\n      <p><span>Audience<\/span>School leavers \u00b7 students \u00b7 beginner Data Analysts<\/p>\n      <p><span>Reviewed<\/span>29 October 2026<\/p>\n    <\/div>\n  <\/div>\n\n  <div class=\"nit-article__body\" itemprop=\"articleBody\">\n    <section class=\"nit-pg-answer\" id=\"quick-answer\" aria-labelledby=\"quick-answer-heading\">\n      <div class=\"nit-pg-answer__question\">\n        <span>Quick answer<\/span>\n        <h2 id=\"quick-answer-heading\">What is SQL for data analysis?<\/h2>\n      <\/div>\n      <p><strong>SQL (Structured Query Language) is a language used to work with data stored in relational databases.<\/strong> A Data Analyst uses SQL to retrieve selected records, filter them, combine related tables, calculate summaries and answer defined questions using data. PostgreSQL documents the core query process around table expressions, filtering, grouping and result selection, while Microsoft classifies introductory SQL querying as a beginner Data Analyst skill. <a href=\"#source-1\">[1]<\/a> <a href=\"#source-4\">[4]<\/a><\/p>\n    <\/section>\n\n    <div class=\"nit-pg-intro\">\n      <p class=\"nit-lead\">The database stores the records. SQL gives the analyst a precise way to ask those records a question.<\/p>\n      <p>Imagine a school with 40,000 examination records, a finance office with thousands of payments, or a retailer with several years of transactions. The information may already exist. The analyst&#8217;s task is to retrieve the right part, check it and explain what it means.<\/p>\n    <\/div>\n\n    <nav class=\"nit-pg-nav\" aria-label=\"Article contents\">\n      <p>In this guide<\/p>\n      <div>\n        <a href=\"#mental-model\">How SQL fits analysis<\/a>\n        <a href=\"#first-query\">First query<\/a>\n        <a href=\"#tools\">Core SQL tools<\/a>\n        <a href=\"#examples\">Worked examples<\/a>\n        <a href=\"#trust\">Check your result<\/a>\n        <a href=\"#kenya\">Kenya relevance<\/a>\n        <a href=\"#learning-path\">What to learn first<\/a>\n        <a href=\"#faq\">FAQs<\/a>\n      <\/div>\n    <\/nav>\n\n    <section class=\"nit-pg-section\" id=\"mental-model\" aria-labelledby=\"mental-model-heading\">\n      <p class=\"nit-pg-eyebrow\">Start with the thinking<\/p>\n      <h2 id=\"mental-model-heading\">A Data Analyst starts with a question\u2014not a SQL command<\/h2>\n      <p>Suppose someone asks: <strong>\u201cWhat was the average Mathematics score for Form 4?\u201d<\/strong> Before touching SQL, identify what the answer requires: the subject, the class level and the score field. Then translate that logic into a query.<\/p>\n      <div class=\"nit-pg-progress\" aria-label=\"SQL analysis workflow\">\n        <div><span>01 \u00b7 Question<\/span><strong>What do we need to know?<\/strong><\/div>\n        <i aria-hidden=\"true\">\u2192<\/i>\n        <div><span>02 \u00b7 Query<\/span><strong>Which records and calculation?<\/strong><\/div>\n        <i aria-hidden=\"true\">\u2192<\/i>\n        <div><span>03 \u00b7 Meaning<\/span><strong>Does the result support the conclusion?<\/strong><\/div>\n      <\/div>\n      <div class=\"nit-callout nit-callout--success\">\n        <p class=\"nit-callout__title\">Beginner rule<\/p>\n        <p>Do not memorise SQL as a list of keywords. Learn to connect each command to a question the data needs to answer.<\/p>\n      <\/div>\n    <\/section>\n\n    <section class=\"nit-pg-section\" aria-labelledby=\"database-heading\">\n      <p class=\"nit-pg-eyebrow\">Database foundations<\/p>\n      <h2 id=\"database-heading\">SQL, a database and a table are not the same thing<\/h2>\n      <div class=\"nit-concept-grid\">\n        <article class=\"nit-concept-card\">\n          <h3>Database<\/h3>\n          <p>An organised collection of information managed by a database system. A school database might contain students, courses, results, attendance and payments.<\/p>\n        <\/article>\n        <article class=\"nit-concept-card\">\n          <h3>Table<\/h3>\n          <p>A structured set of related records inside the database. Rows represent records; columns represent fields such as student name, course or score.<\/p>\n        <\/article>\n        <article class=\"nit-concept-card\">\n          <h3>SQL<\/h3>\n          <p>The language used to ask relational database systems for information and perform other supported database operations.<\/p>\n        <\/article>\n      <\/div>\n      <p>Microsoft&#8217;s introductory material teaches relational databases, SQL, the <code>SELECT<\/code> statement, data types and NULL handling as connected foundations. <a href=\"#source-4\">[4]<\/a><\/p>\n    <\/section>\n\n    <section class=\"nit-pg-section\" id=\"first-query\" aria-labelledby=\"first-query-heading\">\n      <p class=\"nit-pg-eyebrow\">Your first query<\/p>\n      <h2 id=\"first-query-heading\">Read a basic SQL query almost like a sentence<\/h2>\n      <p>Suppose a <code>students<\/code> table contains student names and courses. You want only Data Science students.<\/p>\n      <div class=\"nit-code-window\" role=\"img\" aria-label=\"Basic SQL query selecting Data Science students\">\n      <div class=\"nit-code-window__bar\"><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__file\">students.sql<\/span><\/div>\n      <div class=\"nit-code-window__body\"><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">SELECT<\/span> <span class=\"nit-code-name\">student_name<\/span>, <span class=\"nit-code-name\">course<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">FROM<\/span> <span class=\"nit-code-name\">students<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">WHERE<\/span> <span class=\"nit-code-name\">course<\/span> = <span class=\"nit-code-string\">&#8216;Data Science&#8217;<\/span>;<\/span><\/div>\n    <\/div>\n      <div class=\"nit-pg-reasons\" aria-label=\"Meaning of the query lines\">\n        <div><span>01<\/span><h3>SELECT<\/h3><p>Choose the columns you want returned: <code>student_name<\/code> and <code>course<\/code>.<\/p><\/div>\n        <div><span>02<\/span><h3>FROM<\/h3><p>Tell the database which table contains those columns: <code>students<\/code>.<\/p><\/div>\n        <div><span>03<\/span><h3>WHERE<\/h3><p>Keep only rows where the course is exactly <code>Data Science<\/code>.<\/p><\/div>\n        <div><span>04<\/span><h3>Result<\/h3><p>The output contains only records that satisfy the condition. The query has converted a human question into a database request.<\/p><\/div>\n      <\/div>\n    <\/section>\n\n    <section class=\"nit-pg-section\" id=\"tools\" aria-labelledby=\"tools-heading\">\n      <p class=\"nit-pg-eyebrow\">Core SQL tools<\/p>\n      <h2 id=\"tools-heading\">The SQL features a beginner Data Analyst should recognise<\/h2>\n      <p>You do not need the whole SQL language before you can perform useful analysis. Start with a small set of features and understand the job each one performs.<\/p>\n      <div class=\"nit-pg-table-wrap\" role=\"region\" aria-label=\"Beginner SQL features table\" tabindex=\"0\">\n        <table class=\"nit-pg-table\">\n          <thead><tr><th><span>SQL feature<\/span><\/th><th><span>Analytical purpose<\/span><\/th><th><span>Simple question<\/span><\/th><\/tr><\/thead>\n          <tbody>\n            <tr><th scope=\"row\"><code>SELECT<\/code><\/th><td>Choose information to return.<\/td><td>Which columns do I need?<\/td><\/tr>\n            <tr><th scope=\"row\"><code>WHERE<\/code><\/th><td>Filter individual rows.<\/td><td>Which records belong in the analysis?<\/td><\/tr>\n            <tr><th scope=\"row\"><code>ORDER BY<\/code><\/th><td>Sort the result.<\/td><td>Which value is highest or lowest?<\/td><\/tr>\n            <tr><th scope=\"row\"><code>COUNT()<\/code><\/th><td>Count records or non-NULL values.<\/td><td>How many orders were recorded?<\/td><\/tr>\n            <tr><th scope=\"row\"><code>SUM()<\/code><\/th><td>Add numerical values.<\/td><td>What were total sales?<\/td><\/tr>\n            <tr><th scope=\"row\"><code>AVG()<\/code><\/th><td>Calculate an average.<\/td><td>What was the average score?<\/td><\/tr>\n            <tr><th scope=\"row\"><code>GROUP BY<\/code><\/th><td>Calculate summaries for separate categories.<\/td><td>What is the average score by subject?<\/td><\/tr>\n            <tr><th scope=\"row\"><code>HAVING<\/code><\/th><td>Filter groups after grouping.<\/td><td>Which branches have sales above a grouped threshold?<\/td><\/tr>\n            <tr><th scope=\"row\"><code>JOIN<\/code><\/th><td>Connect related tables.<\/td><td>Which customer placed each order?<\/td><\/tr>\n            <tr><th scope=\"row\"><code>LEFT JOIN<\/code><\/th><td>Keep left-table records even when no match exists.<\/td><td>Which students have no payment record?<\/td><\/tr>\n            <tr><th scope=\"row\"><code>IS NULL<\/code><\/th><td>Find missing or unknown values.<\/td><td>Which records have no score entered?<\/td><\/tr>\n          <\/tbody>\n        <\/table>\n      <\/div>\n      <p class=\"nit-pg-table-note\">PostgreSQL documents <code>WHERE<\/code>, <code>GROUP BY<\/code> and <code>HAVING<\/code> as distinct stages in shaping a query result. <a href=\"#source-1\">[1]<\/a><\/p>\n    <\/section>\n\n    <section class=\"nit-pg-section\" id=\"examples\" aria-labelledby=\"examples-heading\">\n      <p class=\"nit-pg-eyebrow\">Worked example 1 \u00b7 school data<\/p>\n      <h2 id=\"examples-heading\">Find the average Mathematics score for Form 4<\/h2>\n      <div class=\"nit-pg-table-wrap\" role=\"region\" aria-label=\"Fictional examination records\" tabindex=\"0\">\n        <table class=\"nit-pg-table\">\n          <thead><tr><th><span>Student<\/span><\/th><th><span>Class<\/span><\/th><th><span>Subject \/ score<\/span><\/th><\/tr><\/thead>\n          <tbody>\n            <tr><th scope=\"row\">Amina<\/th><td>Form 4<\/td><td>Mathematics \u00b7 78<\/td><\/tr>\n            <tr><th scope=\"row\">Brian<\/th><td>Form 4<\/td><td>Mathematics \u00b7 62<\/td><\/tr>\n            <tr><th scope=\"row\">Faith<\/th><td>Form 4<\/td><td>English \u00b7 81<\/td><\/tr>\n            <tr><th scope=\"row\">Kevin<\/th><td>Form 4<\/td><td>Mathematics \u00b7 55<\/td><\/tr>\n            <tr><th scope=\"row\">Mary<\/th><td>Form 3<\/td><td>Mathematics \u00b7 71<\/td><\/tr>\n          <\/tbody>\n        <\/table>\n      <\/div>\n      <div class=\"nit-pg-reasons\" aria-label=\"Analysis planning steps\">\n        <div><span>01<\/span><h3>Measure<\/h3><p>We need an average, so use <code>AVG(score)<\/code>.<\/p><\/div>\n        <div><span>02<\/span><h3>Subject<\/h3><p>Include Mathematics records only.<\/p><\/div>\n        <div><span>03<\/span><h3>Class<\/h3><p>Include Form 4 records only.<\/p><\/div>\n        <div><span>04<\/span><h3>Check<\/h3><p>Make sure Form 3 Mathematics and Form 4 English are excluded.<\/p><\/div>\n      <\/div>\n      <div class=\"nit-code-window\" role=\"img\" aria-label=\"SQL query calculating the average Mathematics score for Form 4\">\n      <div class=\"nit-code-window__bar\"><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__file\">exam-results.sql<\/span><\/div>\n      <div class=\"nit-code-window__body\"><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">SELECT<\/span> <span class=\"nit-code-keyword\">AVG<\/span>(<span class=\"nit-code-name\">score<\/span>) <span class=\"nit-code-keyword\">AS<\/span> <span class=\"nit-code-name\">average_score<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">FROM<\/span> <span class=\"nit-code-name\">exam_results<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">WHERE<\/span> <span class=\"nit-code-name\">class_level<\/span> = <span class=\"nit-code-string\">&#8216;Form 4&#8217;<\/span><\/span><span class=\"nit-code-line\">  <span class=\"nit-code-keyword\">AND<\/span> <span class=\"nit-code-name\">subject<\/span> = <span class=\"nit-code-string\">&#8216;Mathematics&#8217;<\/span>;<\/span><\/div>\n    <\/div>\n      <div class=\"nit-callout nit-callout--info\">\n        <p class=\"nit-callout__title\">Expected result: 65<\/p>\n        <p>The included Mathematics scores are 78, 62 and 55. Their average is <strong>(78 + 62 + 55) \u00f7 3 = 65<\/strong>. If Mary&#8217;s Form 3 score were included, the query could still run but would answer a different question.<\/p>\n      <\/div>\n\n      <h3>Now compare average scores by subject<\/h3>\n      <p>When the question changes from one subject to <em>each subject<\/em>, use <code>GROUP BY<\/code>.<\/p>\n      <div class=\"nit-code-window\" role=\"img\" aria-label=\"SQL query comparing average scores by subject\">\n      <div class=\"nit-code-window__bar\"><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__file\">subject-averages.sql<\/span><\/div>\n      <div class=\"nit-code-window__body\"><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">SELECT<\/span> <span class=\"nit-code-name\">subject<\/span>,<\/span><span class=\"nit-code-line\">       <span class=\"nit-code-keyword\">AVG<\/span>(<span class=\"nit-code-name\">score<\/span>) <span class=\"nit-code-keyword\">AS<\/span> <span class=\"nit-code-name\">average_score<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">FROM<\/span> <span class=\"nit-code-name\">exam_results<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">WHERE<\/span> <span class=\"nit-code-name\">class_level<\/span> = <span class=\"nit-code-string\">&#8216;Form 4&#8217;<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">GROUP BY<\/span> <span class=\"nit-code-name\">subject<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">ORDER BY<\/span> <span class=\"nit-code-name\">average_score<\/span> <span class=\"nit-code-keyword\">DESC<\/span>;<\/span><\/div>\n    <\/div>\n      <p>PostgreSQL explains grouping as the mechanism for collecting rows that share a grouping value so aggregate calculations can be produced for each group. <a href=\"#source-1\">[1]<\/a><\/p>\n      <div class=\"nit-callout nit-callout--warning\">\n        <p class=\"nit-callout__title\">Do not confuse a result with an explanation<\/p>\n        <p>If Chemistry has the lowest average, SQL has shown a difference in the records. It has not proved why that difference exists. Examination difficulty, missing marks, different learner groups or data-quality problems may still need investigation.<\/p>\n      <\/div>\n    <\/section>\n\n    <section class=\"nit-pg-section\" aria-labelledby=\"join-heading\">\n      <p class=\"nit-pg-eyebrow\">Worked example 2 \u00b7 payments<\/p>\n      <h2 id=\"join-heading\">How much has every student paid?<\/h2>\n      <p>Relational databases often separate information into related tables. A student table may contain names while a payment table stores transactions. A shared <code>student_id<\/code> connects the records.<\/p>\n      <div class=\"nit-pg-table-wrap\" role=\"region\" aria-label=\"Student and payment table example\" tabindex=\"0\">\n        <table class=\"nit-pg-table\">\n          <thead><tr><th><span>Student ID<\/span><\/th><th><span>Student<\/span><\/th><th><span>Payment records<\/span><\/th><\/tr><\/thead>\n          <tbody>\n            <tr><th scope=\"row\">101<\/th><td>Amina<\/td><td>KSh 10,000 + KSh 8,000<\/td><\/tr>\n            <tr><th scope=\"row\">102<\/th><td>Brian<\/td><td>KSh 15,000<\/td><\/tr>\n            <tr><th scope=\"row\">103<\/th><td>Faith<\/td><td>KSh 12,000<\/td><\/tr>\n            <tr><th scope=\"row\">104<\/th><td>Kevin<\/td><td>No matching payment row<\/td><\/tr>\n          <\/tbody>\n        <\/table>\n      <\/div>\n      <p>The wording <strong>\u201cevery student\u201d<\/strong> matters. An ordinary inner join would omit Kevin because he has no matching payment row. A <code>LEFT JOIN<\/code> keeps every student from the left table and represents unmatched payment fields as NULL. PostgreSQL documents this outer-join behaviour directly. <a href=\"#source-2\">[2]<\/a><\/p>\n      <div class=\"nit-code-window\" role=\"img\" aria-label=\"SQL query using a left join to calculate total payments for every student\">\n      <div class=\"nit-code-window__bar\"><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__file\">student-payments.sql<\/span><\/div>\n      <div class=\"nit-code-window__body\"><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">SELECT<\/span> <span class=\"nit-code-name\">s.student_name<\/span>,<\/span><span class=\"nit-code-line\">       <span class=\"nit-code-keyword\">COALESCE<\/span>(<span class=\"nit-code-keyword\">SUM<\/span>(<span class=\"nit-code-name\">p.amount<\/span>), <span class=\"nit-code-number\">0<\/span>) <span class=\"nit-code-keyword\">AS<\/span> <span class=\"nit-code-name\">total_paid<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">FROM<\/span> <span class=\"nit-code-name\">students<\/span> <span class=\"nit-code-keyword\">AS<\/span> <span class=\"nit-code-name\">s<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">LEFT JOIN<\/span> <span class=\"nit-code-name\">payments<\/span> <span class=\"nit-code-keyword\">AS<\/span> <span class=\"nit-code-name\">p<\/span><\/span><span class=\"nit-code-line\">  <span class=\"nit-code-keyword\">ON<\/span> <span class=\"nit-code-name\">s.student_id<\/span> = <span class=\"nit-code-name\">p.student_id<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">GROUP BY<\/span> <span class=\"nit-code-name\">s.student_id<\/span>, <span class=\"nit-code-name\">s.student_name<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">ORDER BY<\/span> <span class=\"nit-code-name\">total_paid<\/span> <span class=\"nit-code-keyword\">DESC<\/span>;<\/span><\/div>\n    <\/div>\n      <div class=\"nit-pg-table-wrap\">\n        <table class=\"nit-pg-table\">\n          <thead><tr><th>Student<\/th><th>Total paid<\/th><th>Why this row appears<\/th><\/tr><\/thead>\n          <tbody>\n            <tr><th scope=\"row\">Amina<\/th><td>KSh 18,000<\/td><td>Two matching payment rows<\/td><\/tr>\n            <tr><th scope=\"row\">Brian<\/th><td>KSh 15,000<\/td><td>One matching payment row<\/td><\/tr>\n            <tr><th scope=\"row\">Faith<\/th><td>KSh 12,000<\/td><td>One matching payment row<\/td><\/tr>\n            <tr><th scope=\"row\">Kevin<\/th><td>KSh 0<\/td><td>No matching payment row; LEFT JOIN keeps the student and COALESCE displays zero<\/td><\/tr>\n          <\/tbody>\n        <\/table>\n      <\/div>\n      <div class=\"nit-pg-highlight\">\n        <strong>A query can run successfully and still answer the wrong question.<\/strong>\n        <p>SQL correctness includes logic\u2014not only syntax. The join type must match the records the question expects to keep.<\/p>\n      <\/div>\n    <\/section>\n\n    <section class=\"nit-pg-section\" aria-labelledby=\"null-heading\">\n      <p class=\"nit-pg-eyebrow\">Data quality<\/p>\n      <h2 id=\"null-heading\">NULL does not automatically mean zero<\/h2>\n      <p>A missing score may be represented as <code>NULL<\/code>. That means the value is missing or unknown in the data; it is not automatically the numeric value 0.<\/p>\n      <div class=\"nit-code-window\" role=\"img\" aria-label=\"SQL queries checking missing scores and comparing row counts\">\n      <div class=\"nit-code-window__bar\"><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__file\">missing-scores.sql<\/span><\/div>\n      <div class=\"nit-code-window__body\"><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">SELECT<\/span> <span class=\"nit-code-name\">student<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">FROM<\/span> <span class=\"nit-code-name\">exam_results<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">WHERE<\/span> <span class=\"nit-code-name\">score<\/span> <span class=\"nit-code-keyword\">IS NULL<\/span>;<\/span><span class=\"nit-code-line\"><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">SELECT<\/span> <span class=\"nit-code-keyword\">COUNT<\/span>(*) <span class=\"nit-code-keyword\">AS<\/span> <span class=\"nit-code-name\">all_rows<\/span>,<\/span><span class=\"nit-code-line\">       <span class=\"nit-code-keyword\">COUNT<\/span>(<span class=\"nit-code-name\">score<\/span>) <span class=\"nit-code-keyword\">AS<\/span> <span class=\"nit-code-name\">scores_present<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">FROM<\/span> <span class=\"nit-code-name\">exam_results<\/span>;<\/span><\/div>\n    <\/div>\n      <p>With four rows where one score is NULL, <code>COUNT(*)<\/code> returns 4 while <code>COUNT(score)<\/code> returns 3 because <code>COUNT(column)<\/code> counts only non-NULL values. PostgreSQL&#8217;s aggregate-function documentation specifies this distinction. <a href=\"#source-3\">[3]<\/a><\/p>\n      <div class=\"nit-callout nit-callout--warning\">\n        <p class=\"nit-callout__title\">Why this matters<\/p>\n        <p>A beginner who treats missing information as zero can distort averages, completion rates, balances and other summaries. Always decide what a missing value means in the context of the data.<\/p>\n      <\/div>\n    <\/section>\n\n    <section class=\"nit-pg-section\" aria-labelledby=\"business-heading\">\n      <p class=\"nit-pg-eyebrow\">Worked example 3 \u00b7 business data<\/p>\n      <h2 id=\"business-heading\">Which product category generated the most recorded revenue?<\/h2>\n      <p>Suppose each sales row contains a product category, quantity and unit price. Revenue for a row can be calculated as <code>quantity \u00d7 unit_price<\/code>, then grouped by category.<\/p>\n      <div class=\"nit-code-window\" role=\"img\" aria-label=\"SQL query calculating revenue by product category\">\n      <div class=\"nit-code-window__bar\"><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__file\">category-revenue.sql<\/span><\/div>\n      <div class=\"nit-code-window__body\"><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">SELECT<\/span> <span class=\"nit-code-name\">category<\/span>,<\/span><span class=\"nit-code-line\">       <span class=\"nit-code-keyword\">SUM<\/span>(<span class=\"nit-code-name\">quantity<\/span> * <span class=\"nit-code-name\">unit_price<\/span>) <span class=\"nit-code-keyword\">AS<\/span> <span class=\"nit-code-name\">revenue<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">FROM<\/span> <span class=\"nit-code-name\">sales<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">GROUP BY<\/span> <span class=\"nit-code-name\">category<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">ORDER BY<\/span> <span class=\"nit-code-name\">revenue<\/span> <span class=\"nit-code-keyword\">DESC<\/span>;<\/span><\/div>\n    <\/div>\n      <div class=\"nit-pg-reasons\" aria-label=\"Business interpretation questions\">\n        <div><span>01<\/span><h3>Result<\/h3><p>Which category has the largest calculated revenue total?<\/p><\/div>\n        <div><span>02<\/span><h3>Period<\/h3><p>Does the query cover the correct date range?<\/p><\/div>\n        <div><span>03<\/span><h3>Definition<\/h3><p>Is unit price the actual selling price, and are refunds represented?<\/p><\/div>\n        <div><span>04<\/span><h3>Decision<\/h3><p>High revenue does not automatically mean high profit or future demand.<\/p><\/div>\n      <\/div>\n    <\/section>\n\n    <section class=\"nit-pg-section\" id=\"trust\" aria-labelledby=\"trust-heading\">\n      <p class=\"nit-pg-eyebrow\">Analytical quality control<\/p>\n      <h2 id=\"trust-heading\">Five checks before you trust a SQL result<\/h2>\n      <div class=\"nit-pg-check\">\n        <div class=\"nit-pg-check__intro\">\n          <h3>A useful query is not merely one that executes<\/h3>\n          <p>Before reporting an answer, make sure the query matches the question and the underlying records behave as expected.<\/p>\n        <\/div>\n        <ul>\n          <li><strong>Row meaning:<\/strong> know whether one row represents a student, payment, order, item or another unit.<\/li>\n          <li><strong>Filters:<\/strong> verify dates, locations, status fields and categories.<\/li>\n          <li><strong>Missing values:<\/strong> check how NULLs affect counts, averages and joins.<\/li>\n          <li><strong>Join behaviour:<\/strong> compare row counts and check whether matches duplicate or remove records.<\/li>\n          <li><strong>Interpretation:<\/strong> state what the result supports without inventing a cause the data does not prove.<\/li>\n        <\/ul>\n      <\/div>\n    <\/section>\n\n    <section class=\"nit-pg-section\" aria-labelledby=\"analyst-heading\">\n      <p class=\"nit-pg-eyebrow\">Beyond syntax<\/p>\n      <h2 id=\"analyst-heading\">Why a Data Analyst needs more than SQL commands<\/h2>\n      <ul class=\"nit-pg-questions\">\n        <li><span>01<\/span><div><strong>Define the question<\/strong><p>What decision or comparison is the analysis supposed to support?<\/p><\/div><\/li>\n        <li><span>02<\/span><div><strong>Find the evidence<\/strong><p>Which tables and columns actually contain the required information?<\/p><\/div><\/li>\n        <li><span>03<\/span><div><strong>Choose the records<\/strong><p>Which rows should be included or excluded?<\/p><\/div><\/li>\n        <li><span>04<\/span><div><strong>Calculate correctly<\/strong><p>Does the question need a count, total, average, group, rate or comparison?<\/p><\/div><\/li>\n        <li><span>05<\/span><div><strong>Check the result<\/strong><p>Are there duplicates, missing values, surprising row counts or impossible totals?<\/p><\/div><\/li>\n        <li><span>06<\/span><div><strong>Explain carefully<\/strong><p>What does the evidence show, and what does it not prove?<\/p><\/div><\/li>\n      <\/ul>\n    <\/section>\n\n    <section class=\"nit-pg-section\" id=\"learning-path\" aria-labelledby=\"learning-heading\">\n      <p class=\"nit-pg-eyebrow\">Beginner progression<\/p>\n      <h2 id=\"learning-heading\">How much SQL should a beginner Data Analyst learn first?<\/h2>\n      <ol class=\"nit-process\" aria-label=\"Beginner SQL learning sequence\">\n        <li><strong>Foundation<\/strong><br>Tables, rows, columns, keys, relationships and NULL.<\/li>\n        <li><strong>Query<\/strong><br><code>SELECT<\/code>, <code>FROM<\/code>, <code>WHERE<\/code> and sorting.<\/li>\n        <li><strong>Summarise<\/strong><br><code>COUNT<\/code>, <code>SUM<\/code>, <code>AVG<\/code>, grouping and <code>HAVING<\/code>.<\/li>\n        <li><strong>Connect<\/strong><br>Inner joins, left joins and row-count checks.<\/li>\n        <li><strong>Progress<\/strong><br><code>CASE<\/code>, dates, subqueries, CTEs and window functions.<\/li>\n      <\/ol>\n      <p>Microsoft&#8217;s beginner Transact-SQL path is explicitly aimed at roles including Data Analyst and starts from relational data and core querying rather than requiring prior Python knowledge. <a href=\"#source-4\">[4]<\/a><\/p>\n    <\/section>\n\n    <section class=\"nit-pg-section\" id=\"kenya\" aria-labelledby=\"kenya-heading\">\n      <p class=\"nit-pg-eyebrow\">Kenya labour-market context<\/p>\n      <h2 id=\"kenya-heading\">Is SQL relevant to Data Analysts in Kenya?<\/h2>\n      <p><strong>Yes.<\/strong> A Kenya ICT employment study by Genesis Analytics, developed with the ICT Authority of Kenya and GIZ, estimated about <strong>27,000 professionals<\/strong> in Kenya&#8217;s broader Data Science &amp; Analytics job family and explicitly listed <strong>SQL<\/strong> among Data Analyst skills. <a href=\"#source-5\">[5]<\/a><\/p>\n      <div class=\"nit-cm-snapshot\" aria-label=\"Kenya Data Science and Analytics evidence\">\n        <div><span>Estimated job family<\/span><strong>~27,000<\/strong><small>Kenyan Data Science &amp; Analytics professionals in the report<\/small><\/div>\n        <div><span>Employer skills gap<\/span><strong>56.25%<\/strong><small>SQL &amp; Database Management in the report&#8217;s competency-gap figure<\/small><\/div>\n        <div><span>Automation outlook<\/span><strong>Augmentation<\/strong><small>AI expected to change tasks while human interpretation remains important<\/small><\/div>\n      <\/div>\n      <p>The 56.25% figure should be read precisely: in Figure 12 of the study, 56.25% of employers represented in that competency analysis indicated <strong>SQL and Database Management<\/strong> as a skill area lacking across Data Science and Analytics competencies. It is not a claim that 56.25% of every employer in Kenya requires SQL. <a href=\"#source-5\">[5]<\/a><\/p>\n    <\/section>\n\n    <section class=\"nit-pg-section\" aria-labelledby=\"ai-heading\">\n      <p class=\"nit-pg-eyebrow\">SQL in the AI era<\/p>\n      <h2 id=\"ai-heading\">Does AI make SQL unnecessary?<\/h2>\n      <p>No. AI tools can generate or explain SQL, but the analyst still needs to verify whether the generated query matches the question and data.<\/p>\n      <div class=\"nit-pg-reasons\" aria-label=\"Checks for AI-generated SQL\">\n        <div><span>01<\/span><h3>Tables<\/h3><p>Did the tool use the correct tables and relationships?<\/p><\/div>\n        <div><span>02<\/span><h3>Joins<\/h3><p>Could the join remove records or multiply rows unexpectedly?<\/p><\/div>\n        <div><span>03<\/span><h3>Filters<\/h3><p>Are the date range, branch, status and category conditions correct?<\/p><\/div>\n        <div><span>04<\/span><h3>Meaning<\/h3><p>Does the result answer the actual question rather than a plausible-looking different one?<\/p><\/div>\n      <\/div>\n      <p>The Kenya ICT employment study expects AI to augment Data Science and Analytics work and describes a shift toward higher-level problem solving, interpretation and drawing insights from data. <a href=\"#source-5\">[5]<\/a><\/p>\n    <\/section>\n\n    <section class=\"nit-pg-section\" aria-labelledby=\"tools-fit-heading\">\n      <p class=\"nit-pg-eyebrow\">Where SQL fits<\/p>\n      <h2 id=\"tools-fit-heading\">How SQL works with Excel, Python and Power BI<\/h2>\n      <div class=\"nit-pg-progress\" aria-label=\"Typical data analytics tool flow\">\n        <div><span>Retrieve<\/span><strong>Database + SQL<\/strong><\/div>\n        <i aria-hidden=\"true\">\u2192<\/i>\n        <div><span>Analyse<\/span><strong>Excel \/ Python<\/strong><\/div>\n        <i aria-hidden=\"true\">\u2192<\/i>\n        <div><span>Communicate<\/span><strong>Power BI \/ report<\/strong><\/div>\n      <\/div>\n      <p>A real workflow does not always need every tool. SQL is especially useful when the records you need live in a relational database. NIT&#8217;s broader Data Analytics learning guide covers the Excel \u2192 SQL \u2192 Python \u2192 Power BI progression in detail, so this article stays focused on SQL itself. <a href=\"#source-6\">[6]<\/a><\/p>\n    <\/section>\n\n    <section class=\"nit-pg-section\" id=\"practice\" aria-labelledby=\"practice-heading\">\n      <p class=\"nit-pg-eyebrow\">Try it yourself<\/p>\n      <h2 id=\"practice-heading\">Beginner SQL practice challenge<\/h2>\n      <p>Use this fictional <code>orders<\/code> table:<\/p>\n      <div class=\"nit-pg-table-wrap\" role=\"region\" aria-label=\"Practice order records\" tabindex=\"0\">\n        <table class=\"nit-pg-table\">\n          <thead><tr><th><span>Order<\/span><\/th><th><span>Customer \/ town<\/span><\/th><th><span>Amount<\/span><\/th><\/tr><\/thead>\n          <tbody>\n            <tr><th scope=\"row\">1<\/th><td>Amina \u00b7 Migori<\/td><td>KSh 2,500<\/td><\/tr>\n            <tr><th scope=\"row\">2<\/th><td>Brian \u00b7 Kisii<\/td><td>KSh 1,800<\/td><\/tr>\n            <tr><th scope=\"row\">3<\/th><td>Faith \u00b7 Migori<\/td><td>KSh 4,100<\/td><\/tr>\n            <tr><th scope=\"row\">4<\/th><td>Kevin \u00b7 Migori<\/td><td>KSh 1,200<\/td><\/tr>\n            <tr><th scope=\"row\">5<\/th><td>Mary \u00b7 Kisii<\/td><td>KSh 3,000<\/td><\/tr>\n          <\/tbody>\n        <\/table>\n      <\/div>\n      <div class=\"nit-callout nit-callout--gold\">\n        <p class=\"nit-callout__title\">Question<\/p>\n        <p><strong>Which customers from Migori have an order above KSh 2,000?<\/strong> Before reading the solution, identify the required columns, the town condition and the amount condition.<\/p>\n      <\/div>\n      <div class=\"nit-code-window\" role=\"img\" aria-label=\"Practice SQL query filtering Migori orders above 2000 Kenya shillings\">\n      <div class=\"nit-code-window__bar\"><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__dot\"><\/span><span class=\"nit-code-window__file\">practice.sql<\/span><\/div>\n      <div class=\"nit-code-window__body\"><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">SELECT<\/span> <span class=\"nit-code-name\">customer<\/span>, <span class=\"nit-code-name\">town<\/span>, <span class=\"nit-code-name\">amount<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">FROM<\/span> <span class=\"nit-code-name\">orders<\/span><\/span><span class=\"nit-code-line\"><span class=\"nit-code-keyword\">WHERE<\/span> <span class=\"nit-code-name\">town<\/span> = <span class=\"nit-code-string\">&#8216;Migori&#8217;<\/span><\/span><span class=\"nit-code-line\">  <span class=\"nit-code-keyword\">AND<\/span> <span class=\"nit-code-name\">amount<\/span> &gt; <span class=\"nit-code-number\">2000<\/span>;<\/span><\/div>\n    <\/div>\n      <p>The result contains Amina and Faith. Kevin matches the town but not the amount condition; Mary matches the amount but not the town. Understanding <em>why<\/em> each row is included or excluded is more useful than memorising the query.<\/p>\n    <\/section>\n\n    <section class=\"nit-pg-section\" aria-labelledby=\"mental-check-heading\">\n      <p class=\"nit-pg-eyebrow\">Reusable method<\/p>\n      <h2 id=\"mental-check-heading\">The beginner SQL mental model<\/h2>\n      <div class=\"nit-pg-check\">\n        <div class=\"nit-pg-check__intro\">\n          <h3>Use this sequence whenever you meet a new analysis question<\/h3>\n          <p>It keeps your attention on the evidence and logic instead of jumping straight into syntax.<\/p>\n        <\/div>\n        <ul>\n          <li>Define exactly what you are trying to find out.<\/li>\n          <li>Identify the table or tables containing the evidence.<\/li>\n          <li>Understand what one row represents.<\/li>\n          <li>Choose only the fields you need.<\/li>\n          <li>Filter the correct records.<\/li>\n          <li>Join tables only when required and check what the join changes.<\/li>\n          <li>Calculate the appropriate count, total, average or grouped measure.<\/li>\n          <li>Check missing values, duplicates and unexpected outputs.<\/li>\n          <li>Interpret the answer without claiming more than the records support.<\/li>\n        <\/ul>\n      <\/div>\n    <\/section>\n\n    <section class=\"nit-pg-section\" id=\"faq\" aria-labelledby=\"faq-heading\">\n      <p class=\"nit-pg-eyebrow\">Frequently asked questions<\/p>\n      <h2 id=\"faq-heading\">SQL for Data Analysis: common beginner questions<\/h2>\n      <div class=\"nit-pg-faq\">\n        <details><summary>What does SQL stand for?<\/summary><div><p>SQL stands for <strong>Structured Query Language<\/strong>. It is used to interact with relational database systems. <a href=\"#source-4\">[4]<\/a><\/p><\/div><\/details>\n        <details><summary>Why is SQL useful for Data Analysis?<\/summary><div><p>It lets analysts retrieve, filter, group, summarise and combine structured database records so they can answer defined questions from organisational data.<\/p><\/div><\/details>\n        <details><summary>Do all Data Analysts use SQL?<\/summary><div><p>No. Tool use depends on the organisation and role. SQL is especially relevant when important records are stored in relational databases. Kenya-focused labour-market evidence explicitly lists SQL among Data Analyst skills. <a href=\"#source-5\">[5]<\/a><\/p><\/div><\/details>\n        <details><summary>Can I learn SQL without Python?<\/summary><div><p>Yes. Python is not a prerequisite for basic SQL. Microsoft&#8217;s introductory SQL module is beginner level and lists familiarity with tabular data, such as a spreadsheet, as useful preparation. <a href=\"#source-4\">[4]<\/a><\/p><\/div><\/details>\n        <details><summary>What is the difference between WHERE and HAVING?<\/summary><div><p><code>WHERE<\/code> filters individual rows before grouping. <code>HAVING<\/code> filters groups after <code>GROUP BY<\/code>. <a href=\"#source-1\">[1]<\/a><\/p><\/div><\/details>\n        <details><summary>What is a JOIN?<\/summary><div><p>A JOIN connects related information stored in separate tables using a matching condition. An outer join such as <code>LEFT JOIN<\/code> can retain unmatched rows from one side. <a href=\"#source-2\">[2]<\/a><\/p><\/div><\/details>\n        <details><summary>What does NULL mean?<\/summary><div><p>NULL represents a missing or unknown value. It is not automatically the same thing as zero or an empty string. <a href=\"#source-3\">[3]<\/a><\/p><\/div><\/details>\n        <details><summary>Is knowing SQL enough to become a Data Analyst?<\/summary><div><p>No. SQL is one technical skill. Analysts also need data-quality judgement, interpretation, communication and other tools appropriate to their work. The Kenya ICT employment study lists communication, business knowledge, Data Visualisation and Excel alongside SQL for Data Analysts. <a href=\"#source-5\">[5]<\/a><\/p><\/div><\/details>\n        <details><summary>Can AI write SQL for me?<\/summary><div><p>AI can assist with SQL, but you still need to verify the tables, joins, filters, calculations and meaning of the result. A plausible query can be logically wrong even when it executes.<\/p><\/div><\/details>\n      <\/div>\n    <\/section>\n\n    <section class=\"nit-pg-final\" aria-labelledby=\"main-lesson-heading\">\n      <p class=\"nit-pg-eyebrow\">Main lesson<\/p>\n      <h2 id=\"main-lesson-heading\">SQL matters because it turns stored records into answerable questions<\/h2>\n      <p>Do not measure your progress by the number of commands you can recite. Measure it by whether you can take a question, identify the right records, write a query, check the result and explain what the evidence actually supports.<\/p>\n      <p><strong>Question \u2192 correct data \u2192 correct query \u2192 checked result \u2192 defensible interpretation.<\/strong><\/p>\n    <\/section>\n\n    <section class=\"nit-pg-enrol\" aria-labelledby=\"enrol-heading\">\n      <div class=\"nit-pg-enrol__copy\">\n        <p class=\"nit-pg-eyebrow\">Admissions \u00b7 Newton Institute of Technology<\/p>\n        <h2 id=\"enrol-heading\">Learn Data Science &amp; Analytics at NIT<\/h2>\n        <p>NIT&#8217;s Data Science &amp; Analytics programme develops practical skills in Excel, statistics, SQL, Python, data cleaning, visualisation, introductory Machine Learning and project work. The current pathway is six months of institutional training followed by a compulsory three-month industrial attachment, with physical and online study options. <a href=\"#source-7\">[7]<\/a><\/p>\n      <\/div>\n      <div class=\"nit-pg-enrol__details\">\n        <p><span>Training pathway<\/span><strong>6 months institutional training + 3-month compulsory attachment<\/strong><\/p>\n        <p><span>Study options<\/span><strong>Physical \u00b7 evening \u00b7 online<\/strong><\/p>\n        <p><span>Contact<\/span><strong>+254 713 584 858 \u00b7 Migori Town, Kenya<\/strong><\/p>\n      <\/div>\n      <div class=\"nit-pg-enrol__actions\">\n        <a class=\"nit-pg-button nit-pg-button--gold\" href=\"https:\/\/niteducation.com\/admissions\/\">Register at NIT<\/a>\n        <a class=\"nit-pg-button nit-pg-button--outline\" href=\"https:\/\/wa.me\/254713584858\" target=\"_blank\" rel=\"noopener\">Ask on WhatsApp<\/a>\n      <\/div>\n    <\/section>\n\n    <section class=\"nit-pg-sources\" aria-labelledby=\"sources-heading\">\n      <h2 id=\"sources-heading\">Sources and references<\/h2>\n      <ol>\n        <li id=\"source-1\"><strong>PostgreSQL Global Development Group \u2014 PostgreSQL 18 Documentation: Table Expressions.<\/strong> Primary technical documentation for <code>WHERE<\/code>, <code>GROUP BY<\/code>, <code>HAVING<\/code> and grouped query logic. <a href=\"https:\/\/www.postgresql.org\/docs\/current\/queries-table-expressions.html\" target=\"_blank\" rel=\"noopener\">PostgreSQL documentation<\/a>.<\/li>\n        <li id=\"source-2\"><strong>PostgreSQL Global Development Group \u2014 PostgreSQL Tutorial: Joins Between Tables.<\/strong> Primary technical documentation for inner joins, outer joins and preservation of unmatched rows. <a href=\"https:\/\/www.postgresql.org\/docs\/current\/tutorial-join.html\" target=\"_blank\" rel=\"noopener\">PostgreSQL join tutorial<\/a>.<\/li>\n        <li id=\"source-3\"><strong>PostgreSQL Global Development Group \u2014 Aggregate Functions.<\/strong> Primary technical documentation for <code>COUNT<\/code>, <code>SUM<\/code>, <code>AVG<\/code> and NULL-sensitive aggregate behaviour. <a href=\"https:\/\/www.postgresql.org\/docs\/current\/functions-aggregate.html\" target=\"_blank\" rel=\"noopener\">PostgreSQL aggregate functions<\/a>.<\/li>\n        <li id=\"source-4\"><strong>Microsoft Learn \u2014 Introduction to Transact-SQL.<\/strong> Beginner reference for relational databases, SQL, <code>SELECT<\/code>, data types and NULL handling; Data Analyst is listed among the intended roles. <a href=\"https:\/\/learn.microsoft.com\/en-us\/training\/modules\/introduction-to-transact-sql\/\" target=\"_blank\" rel=\"noopener\">Microsoft Learn<\/a>.<\/li>\n        <li id=\"source-5\"><strong>Genesis Analytics \/ ICT Authority of Kenya \/ GIZ \u2014 Unlocking Current and Future Employment for ICT Professionals in Kenya.<\/strong> Kenya-specific evidence for the Data Science &amp; Analytics workforce, SQL among Data Analyst skills, employer competency gaps and expected AI augmentation. <a href=\"https:\/\/cms.genesis-analytics.com\/uploads\/files\/Unlocking-current-and-future-employment-for-ICT-professionals-in-Kenya-1.pdf\" target=\"_blank\" rel=\"noopener\">Read the report<\/a>.<\/li>\n        <li id=\"source-6\"><strong>Newton Institute of Technology \u2014 Online Data Analytics Courses in Africa: Excel, SQL, Python &amp; Power BI.<\/strong> Internal supporting guide for the wider analytics-tool learning pathway. <a href=\"https:\/\/niteducation.com\/resources\/online-data-analytics-courses-in-africa\/\">Read the NIT guide<\/a>.<\/li>\n        <li id=\"source-7\"><strong>Newton Institute of Technology \u2014 Data Science and Analytics Course in Kenya.<\/strong> Current programme information for curriculum, institutional training, compulsory industrial attachment and study options. <a href=\"https:\/\/niteducation.com\/resources\/data-science-course-in-kenya\/\">View the programme<\/a>.<\/li>\n      <\/ol>\n      <p><strong>Prepared by:<\/strong> Newton Institute of Technology Editorial Team \u00b7 <strong>Technical review:<\/strong> Engineer Simon Barongo \u00b7 <strong>Last reviewed:<\/strong> 29 October 2026.<\/p>\n    <\/section>\n  <\/div>\n<\/article>\n","protected":false},"excerpt":{"rendered":"<p>NIT Data Skills Guide Beginner SQL \u00b7 2026 What Is SQL for Data Analysis? Question \u2192 query \u2192 checked result \u2192 interpretation Learn why Data Analysts use SQL, how a database question becomes a query, and how to check whether the answer is safe to trust\u2014using simple school, payment and business examples. See your first [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[30],"tags":[762,763,764],"class_list":["post-3711","post","type-post","status-publish","format-standard","hentry","category-ict","tag-sql-for-data-analysis","tag-what-is-sql-for-data-analysis","tag-why-do-data-analysts-need-sql"],"_links":{"self":[{"href":"https:\/\/niteducation.com\/resources\/wp-json\/wp\/v2\/posts\/3711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/niteducation.com\/resources\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/niteducation.com\/resources\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/niteducation.com\/resources\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/niteducation.com\/resources\/wp-json\/wp\/v2\/comments?post=3711"}],"version-history":[{"count":1,"href":"https:\/\/niteducation.com\/resources\/wp-json\/wp\/v2\/posts\/3711\/revisions"}],"predecessor-version":[{"id":3712,"href":"https:\/\/niteducation.com\/resources\/wp-json\/wp\/v2\/posts\/3711\/revisions\/3712"}],"wp:attachment":[{"href":"https:\/\/niteducation.com\/resources\/wp-json\/wp\/v2\/media?parent=3711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/niteducation.com\/resources\/wp-json\/wp\/v2\/categories?post=3711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/niteducation.com\/resources\/wp-json\/wp\/v2\/tags?post=3711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}