<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Brian Kariuki</title>
    <description>The latest articles on DEV Community by Brian Kariuki (@brian_kariuki).</description>
    <link>https://dev.to/brian_kariuki</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4070915%2F1a55be41-4342-452f-8829-5d70548f28d9.png</url>
      <title>DEV Community: Brian Kariuki</title>
      <link>https://dev.to/brian_kariuki</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/brian_kariuki"/>
    <language>en</language>
    <item>
      <title>Understanding SQL Concepts</title>
      <dc:creator>Brian Kariuki</dc:creator>
      <pubDate>Sun, 18 Oct 2026 16:47:41 +0000</pubDate>
      <link>https://dev.to/brian_kariuki/understanding-sql-concepts-2n8b</link>
      <guid>https://dev.to/brian_kariuki/understanding-sql-concepts-2n8b</guid>
      <description>&lt;p&gt;&lt;strong&gt;Structured Query Language (SQL)&lt;/strong&gt; is the universal engine powering how we &lt;em&gt;store&lt;/em&gt;, &lt;em&gt;retrieve&lt;/em&gt;, and &lt;em&gt;organize&lt;/em&gt; digital information. From tracking account transactions, balances and loans to storing patient data, medical history, prescriptions and appointments, almost every modern application relies on databases. Understanding core SQL concepts is a vital skill for anyone looking to turn raw data into actionable insights.&lt;/p&gt;

&lt;h3&gt;
  
  
  SQL Window Functions
&lt;/h3&gt;

&lt;p&gt;At the heart of SQL concepts are SQL Window functions, they allow performing calculations across a set of rows that are related to the current row, without collapsing the result into a single value. They are commonly used for tasks like aggregates, rankings and running totals. SQL window functions are mainly of two types: &lt;strong&gt;aggregate window functions&lt;/strong&gt; and &lt;strong&gt;ranking window functions&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;column_name1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
       &lt;span class="n"&gt;window_function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;column_name2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; 
       &lt;span class="n"&gt;OVER&lt;/span&gt; &lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="k"&gt;PARTITION&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;column_name3&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;column_name4&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;new_column&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="k"&gt;table_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Aggregate Window Functions
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Aggregate window functions&lt;/strong&gt; calculate aggregates over a window of rows while retaining individual rows ie;&lt;/p&gt;

&lt;p&gt;SUM(): Sums values within a window.&lt;br&gt;
AVG(): Calculates the average value within a window.&lt;br&gt;
COUNT(): Counts the rows within a window.&lt;br&gt;
MIN(): Returns the minimum value in the window.&lt;br&gt;
MAX(): Returns the maximum value in the window.&lt;/p&gt;

&lt;p&gt;AVG(): Calculates the average value within a window. It does all this without collapsing individual rows into a single summary row.&lt;/p&gt;

&lt;p&gt;Example: Using AVG(), we will calculate the average age of patients within each gender from our hospital dataset&lt;/p&gt;

&lt;p&gt;Unlike a GROUP BY clause—which hides the original granular details — the avg() window function allows you to retain every single record in your output while simultaneously appending the calculated average alongside it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foc31lqcbu6src3fytdv5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Foc31lqcbu6src3fytdv5.png" alt="Average age" width="799" height="560"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  Ranking Window Functions
&lt;/h4&gt;

&lt;p&gt;These functions provide rankings of rows within a partition based on specific criteria. Common ranking functions include:&lt;/p&gt;

&lt;p&gt;ROW_NUMBER(): Assigns a unique number to each row in the result set.&lt;br&gt;
RANK(): Assigns ranks to rows, skipping ranks for duplicates.&lt;br&gt;
DENSE_RANK(): Assigns ranks to rows without skipping rank numbers for duplicates.&lt;br&gt;
NTILE(): Distributes rows of an ordered partition into a pre-defined number of roughly equal groups.&lt;br&gt;
LAG(): allows us to retrieve the value of a column from a previous row in the result set.&lt;br&gt;
LEAD(): allows to access data of the following row, or the row after the subsequent row, and continue on.&lt;br&gt;
FIRST_VALUE(): results in the first value in an ordered partition of the given data set.&lt;br&gt;
LAST_VALUE(): results the last value in an ordered partition of the given data set.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;RANK() Functions&lt;/strong&gt; are used to assign ranks to rows within a group based on a specific order. Ranking functions are commonly used to organize and analyze data.&lt;/p&gt;

&lt;p&gt;Example: Using RANK(), in our hospital dataset we will rank total bills by insurance provider&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpgnc5qgw5dyo6i6ttjrh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fpgnc5qgw5dyo6i6ttjrh.png" alt="Rank" width="637" height="555"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now here is how &lt;em&gt;OVER()&lt;/em&gt;, &lt;em&gt;PARTITION BY&lt;/em&gt;, &lt;em&gt;ORDER BY&lt;/em&gt;, and &lt;em&gt;window frames&lt;/em&gt; build upon each other to isolate and calculate data.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;OVER() (The Window Opener)&lt;/em&gt; clause which is mandatory signals to SQL that you are creating a window function, It defines the boundaries of the rows (the "window") that the function will evaluate. &lt;/p&gt;

&lt;p&gt;The &lt;em&gt;PARTITION BY&lt;/em&gt; clause divides your data into distinct, independent groups (partitions) based on one or more columns.&lt;br&gt;
How it works: Think of it as a GROUP BY that does not collapse rows. The window function calculates its results independently for each group, and the calculation resets entirely when a new group begins.&lt;/p&gt;

&lt;p&gt;The &lt;em&gt;ORDER BY&lt;/em&gt; clause defines the physical sequence of rows inside each partition.  Adding an &lt;em&gt;ORDER BY&lt;/em&gt; clause inside your &lt;em&gt;OVER()&lt;/em&gt; statement completely changes how aggregate functions behave. Without &lt;em&gt;ORDER BY&lt;/em&gt;, an aggregate like &lt;em&gt;SUM()&lt;/em&gt; adds up the entire partition. With &lt;em&gt;ORDER BY&lt;/em&gt;, &lt;em&gt;SQL&lt;/em&gt; assumes you want a cumulative/running calculation, which triggers a default window frame.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Frames&lt;/strong&gt; dictates precisely which rows are factored into the calculation at any given moment and are defined using either ROWS (counting exact physical rows) or RANGE (looking at matching values). &lt;/p&gt;
&lt;h3&gt;
  
  
  SQL Joins
&lt;/h3&gt;

&lt;p&gt;Data is rarely stored in a single, massive table. Instead, it is organized into smaller, focused tables to ensure efficiency and accuracy. But how do we bring that scattered information back together when we need answers? &lt;strong&gt;SQL Joins&lt;/strong&gt;, the foundational tool that allows you to connect distinct tables and unlock deeper insights from your relational databases.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SQL Joins&lt;/strong&gt; are used to combine data from two or more tables based on a related column.&lt;/p&gt;
&lt;h4&gt;
  
  
  Types of SQL Joins
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;INNER JOIN&lt;/strong&gt; is used to retrieve rows where matching values exist in both tables. It helps in:&lt;/p&gt;

&lt;p&gt;Combining records based on a related column.&lt;br&gt;
Returning only matching rows from both tables.&lt;br&gt;
Excluding non-matching data from the result set.&lt;br&gt;
Ensuring accurate data relationships between tables.&lt;/p&gt;

&lt;p&gt;Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;tableA&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;
&lt;span class="k"&gt;INNER&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;tableB&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;matching_column&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;matching_column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example of &lt;strong&gt;INNER JOIN&lt;/strong&gt; to find patients and their different payment method;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxylb8zn8mswg1tyb8ve6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxylb8zn8mswg1tyb8ve6.png" alt="Inner join" width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LEFT JOIN&lt;/strong&gt; is used to retrieve all rows from the left table and matching rows from the right table. It helps in:&lt;/p&gt;

&lt;p&gt;Returning all records from the left table.&lt;br&gt;
Showing matching data from the right table.&lt;br&gt;
Displaying NULL values where no match exists in the right table.&lt;/p&gt;

&lt;p&gt;Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;tableA&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;
&lt;span class="k"&gt;LEFT&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;tableB&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;matching_column&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;matching_column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;RIGHT JOIN&lt;/strong&gt; is used to retrieve all rows from the right table and the matching rows from the left table. It helps in:&lt;/p&gt;

&lt;p&gt;Returning all records from the right-side table.&lt;br&gt;
Showing matching data from the left-side table.&lt;br&gt;
Displaying NULL values where no match exists in the left table.&lt;br&gt;
Performing outer joins, also known as RIGHT OUTER JOIN.&lt;/p&gt;

&lt;p&gt;Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;tableA&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;
&lt;span class="k"&gt;RIGHT&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;tableB&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;matching_column&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;matching_column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;FULL JOIN&lt;/strong&gt; is used to combine the results of both &lt;em&gt;LEFT JOIN&lt;/em&gt; and &lt;em&gt;RIGHT JOIN&lt;/em&gt;. It helps in:&lt;/p&gt;

&lt;p&gt;Returning all rows from both tables.&lt;br&gt;
Showing matching records from each table.&lt;br&gt;
Displaying NULL values where no match exists in either table.&lt;br&gt;
Providing complete data from both sides of the join.&lt;/p&gt;

&lt;p&gt;Syntax:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;tableA&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;
&lt;span class="k"&gt;FULL&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;tableB&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;
&lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;A&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;matching_column&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;B&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;matching_column&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Self-join&lt;/strong&gt; allows us to join a table itself. It is useful when a user wants to compare the data (rows) within the same table while &lt;strong&gt;Cross join&lt;/strong&gt; allows us to join each and every row of both the tables. It is similar to the cartesian product that joins all the rows. &lt;/p&gt;

&lt;h3&gt;
  
  
  Common Table Expressions (CTEs)
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;Common Table Expression (CTE)&lt;/strong&gt; is a temporary result set in SQL that you can reference within a single query. CTEs simplify complex queries, make them easier to read and can be reused multiple times within the same query. It is used for:&lt;/p&gt;

&lt;p&gt;Performing recursive operations, such as traversing hierarchical data.&lt;br&gt;
Breaking down multi-step calculations into manageable parts.&lt;br&gt;
Replacing nested subqueries in complex data retrieval tasks.&lt;/p&gt;

&lt;p&gt;Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="n"&gt;cte_name&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;cte_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can chain &lt;strong&gt;multiple CTEs&lt;/strong&gt; together sequentially by separating them with a comma. The WITH keyword is only used once at the very beginning.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;recursive CTE&lt;/strong&gt; references itself to retrieve hierarchical data, such as employee-manager relationships.&lt;/p&gt;

&lt;p&gt;Consists of; &lt;br&gt;
&lt;strong&gt;Anchor member&lt;/strong&gt;: The initial query that selects the base case (e.g., top-level managers).&lt;br&gt;
&lt;strong&gt;Recursive member&lt;/strong&gt;: The query that references the CTE itself, pulling the next level of data.&lt;/p&gt;

&lt;p&gt;Basic Syntax&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="k"&gt;RECURSIVE&lt;/span&gt; &lt;span class="n"&gt;cte_name&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="c1"&gt;-- 1. Anchor Member&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;column2&lt;/span&gt; 
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="k"&gt;table_name&lt;/span&gt; 
    &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;condition&lt;/span&gt;

    &lt;span class="k"&gt;UNION&lt;/span&gt; &lt;span class="k"&gt;ALL&lt;/span&gt;

    &lt;span class="c1"&gt;-- 2. Recursive Member (References 'cte_name')&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;column2&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="k"&gt;table_name&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;
    &lt;span class="k"&gt;INNER&lt;/span&gt; &lt;span class="k"&gt;JOIN&lt;/span&gt; &lt;span class="n"&gt;cte_name&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="n"&gt;t&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parent_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;
    &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;text_condition&lt;/span&gt; &lt;span class="c1"&gt;-- 3. Termination Condition&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;cte_name&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CTE vs. Subqueries&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CTE&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Can be referenced multiple times.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improves readability for complex queries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Optimized for multiple references.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Subqueries&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Typically used once.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Can become difficult to read when nested.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;May be less efficient for repeated operations.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SQL Subqueries
&lt;/h3&gt;

&lt;p&gt;A &lt;strong&gt;subquery&lt;/strong&gt; in SQL is a query nested inside another SQL query, they are an essential tool when we need to perform operations like:&lt;/p&gt;

&lt;p&gt;Apply aggregate functions like SUM, COUNT or AVG dynamically.&lt;br&gt;
Update data using values from other tables.&lt;br&gt;
Delete rows based on conditions returned by another query.&lt;/p&gt;

&lt;h5&gt;
  
  
  Scalar subqueries
&lt;/h5&gt;

&lt;p&gt;A &lt;strong&gt;scalar subquery&lt;/strong&gt; returns exactly one value: one row and one column. Its result can be used wherever a single value is expected, such as in a comparison, calculation, or output column&lt;/p&gt;

&lt;h5&gt;
  
  
  Non-correlated subqueries
&lt;/h5&gt;

&lt;p&gt;A &lt;strong&gt;non-correlated subquery&lt;/strong&gt; is an inner query that does not depend on values from the outer query. It can execute independently because it does not reference the outer query's tables or columns.&lt;/p&gt;

&lt;h5&gt;
  
  
  Correlated subqueries
&lt;/h5&gt;

&lt;p&gt;A &lt;strong&gt;correlated subquery&lt;/strong&gt; references a column from the outer query. Therefore, its result depends on the current row being considered by the outer query.&lt;/p&gt;

&lt;p&gt;A &lt;strong&gt;non-correlated subquery&lt;/strong&gt; can run independently of the outer query, while a correlated subquery depends logically on values from the outer query. The database may optimize either query in different ways.&lt;/p&gt;

&lt;h5&gt;
  
  
  Nested subqueries
&lt;/h5&gt;

&lt;p&gt;A &lt;strong&gt;nested subquery&lt;/strong&gt; occurs when one subquery contains another subquery. This allows a query to solve a problem through several levels of conditions.&lt;/p&gt;

&lt;h5&gt;
  
  
  Summary of subquery placement
&lt;/h5&gt;

&lt;p&gt;&lt;strong&gt;SELECT&lt;/strong&gt;- Display a calculated or related value&lt;br&gt;
&lt;strong&gt;FROM&lt;/strong&gt;- Create an intermediate result set&lt;br&gt;
&lt;strong&gt;WHERE&lt;/strong&gt;- Filter records using another query's result&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Subqueries using IN&lt;/strong&gt; the IN operator checks whether a value matches any value returned by a subquery. It is especially useful when the inner query returns multiple rows. &lt;strong&gt;The EXISTS operator&lt;/strong&gt; checks whether a subquery returns at least one row. It returns true when a matching row exists and false when no rows match. It is commonly used with correlated subqueries. &lt;strong&gt;The ANY operator&lt;/strong&gt; compares a value with the values returned by a subquery. The condition is true if the comparison succeeds for at least one returned value. &lt;strong&gt;The ALL operator&lt;/strong&gt; compares a value with every value returned by a subquery. The condition is true only when the comparison succeeds for all returned values.&lt;/p&gt;

</description>
      <category>data</category>
      <category>sql</category>
    </item>
    <item>
      <title>Building JCars Logistics Power BI Performance Analysis</title>
      <dc:creator>Brian Kariuki</dc:creator>
      <pubDate>Sat, 26 Sep 2026 09:34:56 +0000</pubDate>
      <link>https://dev.to/brian_kariuki/building-jcars-logistics-power-bi-performance-analysis-3410</link>
      <guid>https://dev.to/brian_kariuki/building-jcars-logistics-power-bi-performance-analysis-3410</guid>
      <description>&lt;p&gt;Turning a raw dataset into a useful business intelligence solution is not simply a matter of creating charts. It begins with understanding the data, identifying problems, designing an appropriate &lt;em&gt;model&lt;/em&gt;, and creating calculations that answer real business questions.&lt;br&gt;
The article documents my journey building the &lt;em&gt;JCars Logistics Power BI project&lt;/em&gt;, from raw data through &lt;em&gt;modelling&lt;/em&gt;, &lt;em&gt;DAX&lt;/em&gt;, &lt;em&gt;dashboard development&lt;/em&gt; and &lt;em&gt;analysis&lt;/em&gt;.&lt;/p&gt;
&lt;h4&gt;
  
  
  1. Starting with the Raw Dataset
&lt;/h4&gt;

&lt;p&gt;The first stage was understanding the dataset rather than immediately building visuals.&lt;br&gt;
The &lt;em&gt;PBIX&lt;/em&gt; contains the original &lt;em&gt;Jcars_data dataset&lt;/em&gt; alongside a &lt;em&gt;Jcars_data Clean&lt;/em&gt; version. Keeping the raw and cleaned files separate was important because it preserved the original source while providing a better dataset for analytical work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs16g74rml6qwvfacegfp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fs16g74rml6qwvfacegfp.png" alt="cleaning process" width="208" height="234"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Understanding the meaning of each field.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Checking data types, ie dates and numerical fields&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Looking for blanks and invalid values.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Looking for duplicates&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The Procedure was clean first, analyse second.&lt;/p&gt;
&lt;h4&gt;
  
  
  2. Data Cleaning and Preparation
&lt;/h4&gt;

&lt;p&gt;The &lt;em&gt;Jcars_data&lt;/em&gt; became the foundation for cleaning and preparation.&lt;/p&gt;

&lt;p&gt;The preparation stage involved standardising field types and values, dealing with missing or invalid records where appropriate, and ensuring that dates could support time-based analysis.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cleaning Process&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxdwb473jy9mng45r8mmp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxdwb473jy9mng45r8mmp.png" alt="Cleaning process" width="799" height="232"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cleaning Steps&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flcqzdhsk3prdf3dd1mg6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flcqzdhsk3prdf3dd1mg6.png" alt="cleaning step" width="652" height="143"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I then separated &lt;em&gt;descriptive information&lt;/em&gt; from &lt;em&gt;transactional information&lt;/em&gt;. This was an important modelling decision because repeating customer, vehicle, location and sales-representative attributes inside every transaction makes analysis harder to maintain.&lt;/p&gt;

&lt;p&gt;The result was a model consisting of a main &lt;em&gt;fact table&lt;/em&gt; surrounded by &lt;em&gt;dimension tables&lt;/em&gt;.&lt;/p&gt;
&lt;h4&gt;
  
  
  3. Building the Data Model
&lt;/h4&gt;

&lt;p&gt;I used a &lt;em&gt;star-schema&lt;/em&gt; , with FactSales acting as the fact table.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5p7knkkb8rofpjeekqvx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5p7knkkb8rofpjeekqvx.png" alt="Star schema" width="799" height="498"&gt;&lt;/a&gt;&lt;br&gt;
The model contains dimensions including:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Dim_Date&lt;/li&gt;
&lt;li&gt;Dim_Vehicle&lt;/li&gt;
&lt;li&gt;Dim_Customer&lt;/li&gt;
&lt;li&gt;Dim_Location&lt;/li&gt;
&lt;li&gt;Dim_SalesRep&lt;/li&gt;
&lt;li&gt;Dim_PaymentMethod&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This approach separates measures from descriptive attributes.&lt;/p&gt;

&lt;p&gt;For example, FactSales contains the transactional measures, while Dim_Vehicle provides vehicle context and Dim_Location provides geographic context.&lt;/p&gt;
&lt;h4&gt;
  
  
  4. DAX Development
&lt;/h4&gt;

&lt;p&gt;Rather than placing calculations directly inside individual visuals, I created reusable measures.&lt;br&gt;
Important measures in the project include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Total Cars Sold &lt;/li&gt;
&lt;li&gt;Total Sales Revenue&lt;/li&gt;
&lt;li&gt;Total Gross Profit&lt;/li&gt;
&lt;li&gt;Total Transactions&lt;/li&gt;
&lt;li&gt;Average Revenue per Car&lt;/li&gt;
&lt;li&gt;Average Revenue per Order&lt;/li&gt;
&lt;li&gt;Average Customer Rating&lt;/li&gt;
&lt;li&gt;Returned Transactions&lt;/li&gt;
&lt;li&gt;Total Logistics Cost&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Measures such as average revenue per car are particularly useful as they transform into key business performance indicators:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Average revenue per car = DIVIDE([Total Sales Revenue], [Total Cars Sold], 0)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Similarly, average revenue per order can be calculated using revenue divided by the number of transactions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Average revenue per order = DIVIDE([Total Sales Revenue], [Total Transactions], 0)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The benefit is that same business definition can be reused across cards and charts.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Dashboard Development
&lt;/h4&gt;

&lt;p&gt;The main dashboard was designed around the questions a logistics manager might ask:&lt;/p&gt;

&lt;p&gt;How much are we selling? Where are we selling? Which vehicles perform well? Which representatives and branches contribute most? How are revenue and profit changing?&lt;br&gt;
The first page therefore combines KPI cards with comparative and trend visuals.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fih9unbkf36s9dyndpmg8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fih9unbkf36s9dyndpmg8.png" alt="Main dashboard" width="800" height="446"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cars sold&lt;/li&gt;
&lt;li&gt;Sales revenue&lt;/li&gt;
&lt;li&gt;Gross profit&lt;/li&gt;
&lt;li&gt;Average revenue per car&lt;/li&gt;
&lt;li&gt;Average revenue per order&lt;/li&gt;
&lt;li&gt;Vehicle performance&lt;/li&gt;
&lt;li&gt;Branch performance&lt;/li&gt;
&lt;li&gt;Sales representative performance&lt;/li&gt;
&lt;li&gt;Payment status&lt;/li&gt;
&lt;li&gt;Revenue and profit over time&lt;/li&gt;
&lt;li&gt;Revenue versus logistics cost&lt;/li&gt;
&lt;li&gt;Geographic performance&lt;/li&gt;
&lt;li&gt;Interactive branch and sales-representative filters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The design intentionally moves from well defined KPIs to explanations of performance. A manager can first see the overall position and then investigate what is driving it&lt;/p&gt;

&lt;h4&gt;
  
  
  6. Detailed Report Development
&lt;/h4&gt;

&lt;p&gt;The solution goes beyond one dashboard. The PBIX contains six report pages, each serving a different analytical purpose.&lt;br&gt;
The additional pages provide deeper analysis of branches, time trends, sales channels, vehicles, customers and sales representatives.&lt;br&gt;
For example, the vehicle analysis compares cars sold by model, average revenue per model and the relationship between sales volume and customer rating.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5u5fe2jr96sq3wh68zez.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5u5fe2jr96sq3wh68zez.png" alt="vehicle" width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  7. Analysis and Business Insights
&lt;/h4&gt;

&lt;p&gt;The report was designed to move beyond descriptive reporting.&lt;/p&gt;

&lt;p&gt;The combination of revenue, gross profit and logistics cost allows management to investigate whether high-revenue areas are also generating healthy returns.&lt;/p&gt;

&lt;p&gt;Branch-level analysis can identify locations that contribute strongly to revenue or vehicle volume, while the sales-representative analysis provides another dimension for evaluating commercial performance.&lt;/p&gt;

&lt;p&gt;Vehicle analysis can reveal models with strong sales volume but weaker revenue per car, or models that generate higher value despite lower volume.&lt;/p&gt;

&lt;p&gt;Time-series analysis also provides a way to identify changes in revenue and profitability rather than relying only on cumulative totals.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;The JCars Logistics project demonstrates effective Power BI reporting starts well before dashboard design.&lt;/p&gt;

&lt;p&gt;The workflow moved from raw data investigation → cleaning → preparation → dimensional modelling → DAX → dashboard design → detailed analysis.&lt;/p&gt;

&lt;p&gt;The most important lesson is that the dashboard is only the final layer of the solution. The quality of the decisions it supports depends on the quality of the data preparation, modelling assumptions and calculations underneath it.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>data</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Data Relationships, Modelling Schemas, and Joins in Power BI</title>
      <dc:creator>Brian Kariuki</dc:creator>
      <pubDate>Sun, 13 Sep 2026 12:29:04 +0000</pubDate>
      <link>https://dev.to/brian_kariuki/data-relationships-modelling-schemas-and-joins-in-power-bi-3aod</link>
      <guid>https://dev.to/brian_kariuki/data-relationships-modelling-schemas-and-joins-in-power-bi-3aod</guid>
      <description>&lt;p&gt;Data modelling in &lt;strong&gt;Power BI&lt;/strong&gt; is the process of organizing tables, columns, keys and relationships so that data can be analyzed effectively. A well-designed model improves reporting accuracy, simplifies DAX calculations, enhances performance, supports scalability, and makes solutions easier to maintain.&lt;/p&gt;

&lt;p&gt;The majority of data is kept in a single table using the &lt;em&gt;flat-table&lt;/em&gt; method. It is simple and suitable for small datasets, but repeated customer, product, and location information creates redundancy, increases memory usage, and can make the table difficult to manage.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9lxvxby880gy7u5oe4t0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9lxvxby880gy7u5oe4t0.png" alt="Farmer" width="685" height="179"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The star schema divides descriptive data into dimension tables. Because it offers strong performance, clear DAX, and clear relationships, it is typically chosen in Power BI.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;star schema&lt;/em&gt;:&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftyhmxca90paf3jcfnhhs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ftyhmxca90paf3jcfnhhs.png" alt="Star schema" width="575" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The snowflake schema further normalizes dimensions into additional tables. It can reduce duplication but introduces more relationships and complexity.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;snowflake schema&lt;/em&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw817pwtpanqp6ox2viw1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw817pwtpanqp6ox2viw1.png" alt="snowflake" width="381" height="242"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Fact and Dimension Tables
&lt;/h3&gt;

&lt;p&gt;A fact table stores business events and numeric measures, such as quantity, sales, cost, and profit. Examples include FactSales, FactOrders, and FactTransactions. A dimension table stores descriptive attributes, such as product names, customer details, dates, and locations.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Fact and Dimension Tables&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9s8qjb8xuyp5qlkmyteb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9s8qjb8xuyp5qlkmyteb.png" alt="Fact and Dimension Tables" width="622" height="295"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Relationships
&lt;/h3&gt;

&lt;p&gt;Relationships connect tables using keys. In a typical model, CustomerID is unique in DimCustomer but can occur many times in FactSales.&lt;/p&gt;

&lt;p&gt;One-to-many (1:*) is the most common relationship and is ideal for dimension-to-fact connections. One-to-one (1:1) means each record matches exactly one record and should only be used when justified. Many-to-many (:) allows multiple matches on both sides but should be used carefully because it can create ambiguity.&lt;/p&gt;

&lt;p&gt;Primary keys uniquely identify dimension records, while foreign keys connect fact records to dimensions. Relationships may also be active or inactive depending on how they are required for analysis.&lt;/p&gt;

&lt;h3&gt;
  
  
  Filter Direction
&lt;/h3&gt;

&lt;p&gt;Filters normally flow from dimensions to fact tables. Selecting a product in DimProduct therefore filters the relevant records in FactSales. Single-direction filtering is generally preferred because it provides predictable results. Bidirectional filtering can be useful in specific situations but may create ambiguous paths and unnecessary complexity.&lt;/p&gt;

&lt;h3&gt;
  
  
  Joins in Power Query
&lt;/h3&gt;

&lt;p&gt;Power Query uses Merge Queries to join tables during data preparation. The main join types are:&lt;/p&gt;

&lt;p&gt;Left Outer: keeps all left records and matching right records.&lt;br&gt;
Right Outer: keeps all right records and matching left records.&lt;br&gt;
Full Outer: keeps all records from both tables.&lt;br&gt;
Inner: keeps only matching records.&lt;br&gt;
Left Anti: keeps unmatched left records.&lt;br&gt;
Right Anti: keeps unmatched right records.&lt;/p&gt;

&lt;p&gt;For example, Customers and Orders can be joined using CustomerID to identify matching or unmatched customers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Power Query Joins vs Relationships
&lt;/h3&gt;

&lt;p&gt;A Power Query merge physically combines columns into a query before loading the model. A Power BI relationship keeps tables separate while allowing filters and calculations to work across them. Therefore, relationships are generally preferable for maintaining separate fact and dimension tables, while merges are useful when data genuinely needs to be combined during preparation.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recommended Model
&lt;/h3&gt;

&lt;p&gt;For most business projects, the star schema is the preferred design. It reduces redundancy, supports efficient DAX, improves readability and performance, scales effectively, and simplifies maintenance. A typical model should use one-to-many relationships from dimensions to facts and primarily single-direction filtering. This creates a reliable and efficient foundation for Power BI reporting and analysis.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>data</category>
      <category>datamodel</category>
    </item>
    <item>
      <title>Building an Interactive Excel Dashboard for E-commerce Product Analysis: A Case Study of Jumia Products</title>
      <dc:creator>Brian Kariuki</dc:creator>
      <pubDate>Sat, 05 Sep 2026 13:59:03 +0000</pubDate>
      <link>https://dev.to/brian_kariuki/building-an-interactive-excel-dashboard-for-e-commerce-product-analysis-a-case-study-of-jumia-5a4g</link>
      <guid>https://dev.to/brian_kariuki/building-an-interactive-excel-dashboard-for-e-commerce-product-analysis-a-case-study-of-jumia-5a4g</guid>
      <description>&lt;h2&gt;
  
  
  Objective
&lt;/h2&gt;

&lt;p&gt;The goal of this project is to create an interactive &lt;strong&gt;Excel dashboard&lt;/strong&gt; that provides insights into the performance of products listed on &lt;em&gt;Jumia&lt;/em&gt;. &lt;br&gt;
Emphasis is on &lt;strong&gt;product pricing&lt;/strong&gt;, &lt;strong&gt;discounts&lt;/strong&gt;, &lt;strong&gt;customer reviews&lt;/strong&gt;, and &lt;strong&gt;ratings&lt;/strong&gt; in order to understand product performance and identify trends. Its meant to help &lt;em&gt;Jumia&lt;/em&gt; and sellers make better decisions around pricing strategies, promotions, and customer engagement.&lt;/p&gt;

&lt;h3&gt;
  
  
  Project introduction and objective
&lt;/h3&gt;

&lt;p&gt;There were 115 source rows and six fields at the beginning of the project: &lt;em&gt;Product&lt;/em&gt;, &lt;em&gt;Current price&lt;/em&gt;, &lt;em&gt;Old price&lt;/em&gt;, &lt;em&gt;Discount&lt;/em&gt;, &lt;em&gt;Review&lt;/em&gt;, and &lt;em&gt;Ratings&lt;/em&gt;. The goal was to build a professional, interactive Excel dashboard that turns the supplied Jumia product data into useful pricing, promotion, and customer-engagement insights.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dataset and business questions
&lt;/h3&gt;

&lt;p&gt;The dataset consisted information about products listed on Jumia with the following columns: &lt;br&gt;
• Product: Name of the product. &lt;br&gt;
• Current Price: The current selling price of the product (in KSh). &lt;br&gt;
• Old Price: The original price before discount (in KSh). &lt;br&gt;
• Discount: The percentage discount offered on the product. &lt;br&gt;
• Review: The number of customer reviews received by the product. &lt;br&gt;
• Rating: The average customer rating of the product (out of 5). &lt;/p&gt;

&lt;p&gt;While the business questions were: Which products have the highest ratings? Which products have the most reviews? Which products carry the largest discounts? How much of the catalogue has missing customer feedback? Are discount levels associated with review counts or ratings? Can these patterns be presented in a dashboard that decision-makers can filter and interpret quickly?&lt;/p&gt;

&lt;h3&gt;
  
  
  Initial data-quality audit
&lt;/h3&gt;

&lt;p&gt;Six &lt;em&gt;columns&lt;/em&gt; and 115 &lt;em&gt;rows&lt;/em&gt; were recorded in the audit. The worksheet found 11 product &lt;em&gt;duplicate&lt;/em&gt; rows, and each of the 58 &lt;em&gt;review&lt;/em&gt; and &lt;em&gt;rating&lt;/em&gt; rows was blank. Additionally, there were negative numbers in the &lt;em&gt;reviews&lt;/em&gt; that needed to be looked at rather than deleted automatically. &lt;em&gt;Currency&lt;/em&gt; was in form of &lt;em&gt;KSh&lt;/em&gt; like "KSh 950" used in place of prices, and rating as text like "4.5 out of 5".&lt;/p&gt;

&lt;h3&gt;
  
  
  Cleaning and preparation decisions
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Product names&lt;/em&gt; were &lt;em&gt;cleaned/trimmed&lt;/em&gt; and &lt;em&gt;duplicates&lt;/em&gt; handled. &lt;em&gt;Currency&lt;/em&gt; was converted to numeric values for &lt;em&gt;current and old price&lt;/em&gt;. &lt;em&gt;Negative reviews&lt;/em&gt; were treated as an &lt;em&gt;artifact&lt;/em&gt; rather than genuine &lt;em&gt;negative reviews&lt;/em&gt; and converted to &lt;em&gt;whole-number&lt;/em&gt;. &lt;em&gt;Ratings&lt;/em&gt; had 'out of 5' text, they were removed, converted to decimals, and missing ratings were left blank.&lt;/p&gt;

&lt;h3&gt;
  
  
  Excel formulas and enrichment fields
&lt;/h3&gt;

&lt;p&gt;The cleaned table was added columns such as; &lt;em&gt;rating check&lt;/em&gt;, &lt;em&gt;Discount check&lt;/em&gt; and &lt;em&gt;Price check&lt;/em&gt;. Additional columns calculate the discount amount, calculated discount rate, rating category and discount category. Rating categories are Missing, Poor, Average and Excellent; discount categories are Low Discount (&amp;lt;20%), Medium Discount (20%–40%), and High Discount (&amp;gt;40%).&lt;/p&gt;

&lt;h3&gt;
  
  
  PivotTable and analysis workflow
&lt;/h3&gt;

&lt;p&gt;The &lt;em&gt;tblProducts&lt;/em&gt; table is the main table. &lt;em&gt;Pivots tables&lt;/em&gt; rank products by rating, review count and discount, while separate summaries show the mix of rating and discount. The dashboard combines these outputs with scatterplots.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dashboard design and slicer connections
&lt;/h3&gt;

&lt;p&gt;The dashboard combines slicers, charts and tblProduct&amp;nbsp;table&amp;nbsp;into one display. Slicer&amp;nbsp;filters&amp;nbsp;are included in the spreadsheet.&lt;/p&gt;

&lt;h3&gt;
  
  
  Key findings
&lt;/h3&gt;

&lt;p&gt;The cleaned table contains 110 products. The dashboard gives an average rating of 3.9 and 723 total reviews. 56 of 110 products have no rating, or about 51%. The rating mix is 17 Excellent, 26 Average, 11 Poor and 56 Missing. Discounting is concentrated in the high-discount group: 60 products above 40%, 32 medium-discount and 18 low-discount products.&lt;/p&gt;

&lt;h3&gt;
  
  
  Business recommendations
&lt;/h3&gt;

&lt;p&gt;Products with missing customer feedback should be given priority for data-quality follow-up. Instead of&amp;nbsp;thinking that a bigger discount equates to higher demand, evaluate high-discount products in conjunction with reviews. Look into high-rated products.&lt;/p&gt;

&lt;h3&gt;
  
  
  Limitations and lessons learned
&lt;/h3&gt;

&lt;p&gt;Products with missing customer feedback should be given priority for data-quality follow-up. Instead of&amp;nbsp;thinking that a bigger discount equates to higher demand, evaluate high-discount products in conjunction with reviews. Look into high-rated products. &lt;/p&gt;

&lt;h3&gt;
  
  
  Links to the GitHub repository and dashboard file
&lt;/h3&gt;

&lt;p&gt;GitHub repository: &lt;a href="https://github.com/Gi-thua/jumia-product-performance-dashboard-" rel="noopener noreferrer"&gt;Github repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5uks3aomopqs8do3bae1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5uks3aomopqs8do3bae1.png" alt="Raw data" width="800" height="553"&gt;&lt;/a&gt; &lt;strong&gt;Raw-data screenshot requiring cleaning.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fida50rrmarlhwl447xaf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fida50rrmarlhwl447xaf.png" alt="cleaned data" width="800" height="402"&gt;&lt;/a&gt;  &lt;strong&gt;Cleaned-data screenshot: numeric prices, discounts, reviews and ratings prepared for analysis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fupqdgg42mgxyw10a2u1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fupqdgg42mgxyw10a2u1l.png" alt="formulas" width="800" height="314"&gt;&lt;/a&gt; &lt;strong&gt;Formula/calculation screenshot: validation checks and enrichment fields used in tblProducts.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0bmh22hz6lei5a6f0tju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0bmh22hz6lei5a6f0tju.png" alt="Pivot tables" width="800" height="511"&gt;&lt;/a&gt; &lt;strong&gt;Pivot/analysis screenshot: ranking and category summaries feeding the dashboard.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff384dps2gyx02ybt42b2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff384dps2gyx02ybt42b2.png" alt="charts" width="800" height="514"&gt;&lt;/a&gt; &lt;strong&gt;Pivot charts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmy8ek5x0dgc9cb42n1h2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmy8ek5x0dgc9cb42n1h2.png" alt="dashboard" width="800" height="411"&gt;&lt;/a&gt; &lt;strong&gt;Dashboard&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0pyregno2t9wvtrj9xcw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0pyregno2t9wvtrj9xcw.png" alt="Insight" width="800" height="191"&gt;&lt;/a&gt; &lt;strong&gt;Insight summary&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>analytics</category>
      <category>data</category>
    </item>
    <item>
      <title>Getting Started with Excel for Data Analytics: From Basics to Data Cleaning.</title>
      <dc:creator>Brian Kariuki</dc:creator>
      <pubDate>Sun, 30 Aug 2026 06:37:19 +0000</pubDate>
      <link>https://dev.to/brian_kariuki/getting-started-with-excel-for-data-analytics-from-basics-to-data-cleaning-24oj</link>
      <guid>https://dev.to/brian_kariuki/getting-started-with-excel-for-data-analytics-from-basics-to-data-cleaning-24oj</guid>
      <description>&lt;h2&gt;
  
  
  Microsoft Excel
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Microsoft Excel&lt;/strong&gt; is a spreadsheet software developed by Microsoft that allows you to &lt;em&gt;collect&lt;/em&gt;,&lt;em&gt;organize&lt;/em&gt;, &lt;em&gt;analyze&lt;/em&gt;, &lt;em&gt;calculate&lt;/em&gt;, and &lt;em&gt;visualize&lt;/em&gt; data efficiently using &lt;em&gt;tables&lt;/em&gt;, &lt;em&gt;rows&lt;/em&gt;, and &lt;em&gt;columns&lt;/em&gt;. Excel's features, which include &lt;em&gt;charts&lt;/em&gt;, &lt;em&gt;functions&lt;/em&gt;, &lt;em&gt;formulas&lt;/em&gt;, and &lt;em&gt;formatting tools&lt;/em&gt;, facilitate information organization and decision-making. It is a vital resource for professionals in a variety of industries and&amp;nbsp;companies&lt;/p&gt;

&lt;h2&gt;
  
  
  The Excel Interface
&lt;/h2&gt;

&lt;p&gt;The Microsoft Excel interface consists of a collection of customizable tools, menus, and grid-based workspaces designed for data management and analysis.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv8kkcvaaguge50ruy7le.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fv8kkcvaaguge50ruy7le.png" alt="Excel Interface" width="800" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When you open Excel, you are presented with a user interface made up of many tools ie&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ribbon&lt;/strong&gt;-Toolbar across the top that contains all commands organized into tabs &lt;br&gt;
&lt;strong&gt;Quick Access Toolbar&lt;/strong&gt;- Icons for Save, Undo, and Redo (top left corner)&lt;br&gt;
&lt;strong&gt;Formula Bar&lt;/strong&gt;- Area above the grid where the content or formula of the selected cell appears&lt;br&gt;
&lt;strong&gt;Name Box&lt;/strong&gt;- Displays the address of the selected cell (e.g., A1)&lt;br&gt;
&lt;strong&gt;Columns&lt;/strong&gt;- Labeled A, B, C... across the top vertically&lt;br&gt;
&lt;strong&gt;Rows&lt;/strong&gt;- Labeled 1, 2, 3... down the left side horizontally&lt;br&gt;
&lt;strong&gt;Cell&lt;/strong&gt;- A single box where a row and column intersect (e.g., B2)&lt;br&gt;
&lt;strong&gt;Worksheet Tabs&lt;/strong&gt;- Tabs at the bottom (Sheet1, Sheet2) that switch between spreadsheets within a workbook&lt;/p&gt;

&lt;h3&gt;
  
  
  The Excel’s Structure: Rows, Columns, Cells
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Row&lt;/strong&gt;- A horizontal line of cells (e.g., Row 1)&lt;br&gt;
&lt;strong&gt;Column&lt;/strong&gt;- A vertical line of cells (e.g., Column A)&lt;br&gt;
&lt;strong&gt;Cell&lt;/strong&gt;- Intersection of a row and column (e.g., A1)&lt;br&gt;
&lt;strong&gt;Range&lt;/strong&gt;- A group of cells (e.g., A1:C3)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbkgzkj2bj6w8x28yglab.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fbkgzkj2bj6w8x28yglab.png" alt="Excel Structure" width="735" height="474"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Supported data types in include; &lt;strong&gt;Text&lt;/strong&gt; (words): e.g., Brian, &lt;strong&gt;Numbers&lt;/strong&gt;: 100, 60.1, &lt;strong&gt;Dates&lt;/strong&gt;: 01/06/2025, &lt;strong&gt;Formulas&lt;/strong&gt;: COUNT. =COUNT(A2:A10)&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Formatting in Excel
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Data formatting&lt;/strong&gt; in &lt;em&gt;Excel&lt;/em&gt; is the process of changing how data looks and is categorized in a spreadsheet without changing the actual value inside the cell.&lt;/p&gt;

&lt;p&gt;Main Types of Formatting include;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Number Formatting&lt;/strong&gt; Controls how numbers appear, such as changing raw digits into Currency ($1,250.00), Percentages (75%), Dates (MM/DD/YYYY), or decimals&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Common Number Formats:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;em&gt;Currency&lt;/em&gt; (e.g., $1,000.00, KES 1000)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Percentage&lt;/em&gt; (e.g., 75%)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Date and Time&lt;/em&gt; (e.g., 03-Jun-2025, 2:30 PM)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4qu0klog203giqn0c0r5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F4qu0klog203giqn0c0r5.png" alt="Number format" width="493" height="403"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Real life application in &lt;em&gt;Number Formatting&lt;/em&gt; can be showing Salary of employees as currency&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw8pii56e33ydp2xc5xvh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fw8pii56e33ydp2xc5xvh.png" alt="Salary" width="252" height="240"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Currency formatting steps&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select the cells with numbers (Salary Column)&lt;/li&gt;
&lt;li&gt;Go to Home tab &amp;gt; Number group&lt;/li&gt;
&lt;li&gt;Click the dropdown arrow on the number format box&lt;/li&gt;
&lt;li&gt;Select Currency&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To change currency symbol, click the small dialog launcher → Choose symbol&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Text Formatting&lt;/strong&gt; Changes text appearance using font styles, sizes, bold, italics, underlining, and text colors via the Home tab.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspb2ajaxdqjwrntuyug9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fspb2ajaxdqjwrntuyug9.png" alt="Text" width="232" height="105"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzimbe1hid4si1yvffnhk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzimbe1hid4si1yvffnhk.png" alt="textmore" width="511" height="324"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Real life application in &lt;strong&gt;text formatting&lt;/strong&gt; can be showing Employee records ie Clearly displaying employee names, departments, salary, and other information.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0xtioyeyhu4pcvjpt1os.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0xtioyeyhu4pcvjpt1os.png" alt="Employee" width="800" height="34"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Cell Alignment&lt;/strong&gt; To align cells in Excel, select your cells, go to the Home tab, and use the buttons in the Alignment group. You can change horizontal alignment (left, center, right), vertical alignment (top, middle, bottom), or use Wrap Text to fit long content&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsrhpnle4ah9cpk95yn1p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fsrhpnle4ah9cpk95yn1p.png" alt="Alignment" width="272" height="140"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Real life application in &lt;strong&gt;Cell Alignment&lt;/strong&gt; can be aligning employee IDs to the right and aligning names to the left appropriately.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg1zaq4tit217adrpaeoh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg1zaq4tit217adrpaeoh.png" alt="alignment" width="242" height="436"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Cell Styling &amp;amp; Borders&lt;/strong&gt; Adds visual boundaries, background fill colors, and structure to tables.
In Home &amp;gt; Font, click:
Borders → Choose “All Borders”
Fill Color → Choose a light background for headings&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Real life application in cell styling &amp;amp; Borders can be Styling cells to distinguish Employee's First name, Last name, deparment etc.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Conditional Formatting&lt;/strong&gt; highlights cells automatically based on rules or criteria, helping spot trends or outliers&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Real life application in conditional formatting can be highlighting salary of employees below certain figure. ie our case &amp;lt;ksh 75,000&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff8tl351c0grbzg25kt0t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff8tl351c0grbzg25kt0t.png" alt="conditional" width="251" height="616"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to Home &amp;gt; Conditional Formatting&lt;/li&gt;
&lt;li&gt;Choose a rule type:

&lt;ul&gt;
&lt;li&gt;Highlight Cell Rules (Less than, Greater than)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Select Highlight Cell Rules &amp;gt; Less Than&lt;/li&gt;
&lt;li&gt;Enter a value (e.g., ksh75,000)&lt;/li&gt;
&lt;li&gt;Choose a formatting style (e.g., red fill)&lt;/li&gt;
&lt;li&gt;Click OK&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Data Sorting
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Sorting&lt;/strong&gt; means arranging data in a specific order — either ascending (A to Z or smallest to largest) or descending (Z to A or largest to smallest).&lt;/p&gt;

&lt;p&gt;Types of Sorting:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Text Sorting (A to Z or Z to A)&lt;/li&gt;
&lt;li&gt;Number Sorting (Smallest to Largest or Largest to Smallest)&lt;/li&gt;
&lt;li&gt;Date Sorting (Oldest to Newest or vice versa)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Real life application of data sorting can be Sorting employee names alphabetically&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffuzzevgg7u4cewybk897.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ffuzzevgg7u4cewybk897.png" alt="data sort" width="219" height="586"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Steps to Sort Data:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select the column or data range to sort&lt;/li&gt;
&lt;li&gt;Go to Home &amp;gt; Sort &amp;amp; Filter (or Data &amp;gt; Sort)&lt;/li&gt;
&lt;li&gt;Choose Sort A to Z or Sort Z to A (our case A to Z)&lt;/li&gt;
&lt;li&gt;For custom sorts, click Sort..., then choose:&lt;/li&gt;
&lt;li&gt;Column&lt;/li&gt;
&lt;li&gt;Sort order&lt;/li&gt;
&lt;li&gt;Value/Cell Color/Font Color&lt;/li&gt;
&lt;li&gt;Click OK&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Filtering
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Filtering&lt;/strong&gt; allows you to display only the rows that meet certain criteria and hide the rest temporarily.&lt;/p&gt;

&lt;p&gt;Filter Types:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Text Filter: Contains, Begins With, Ends With, etc.&lt;/li&gt;
&lt;li&gt;Number Filter: Greater Than, Less Than, Equals, etc.&lt;/li&gt;
&lt;li&gt;Date Filter: Before, After, Between, etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Real life application of data filtering can be showing hire date of employees between certain periods ie our case between 01-01-2021 and 01-01-2022&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frbp97b336czakcw3mb19.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frbp97b336czakcw3mb19.png" alt="Hire date" width="239" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Steps to Apply a Filter:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click anywhere in your dataset&lt;/li&gt;
&lt;li&gt;Go to Home &amp;gt; Sort &amp;amp; Filter &amp;gt; Filter (or Data &amp;gt; Filter)&lt;/li&gt;
&lt;li&gt;Little dropdown arrows appear in header row&lt;/li&gt;
&lt;li&gt;Click the dropdown arrow for the column you want to filter&lt;/li&gt;
&lt;li&gt;Choose the values to show or use text/number/date filters&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Data Validation
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Data validation&lt;/strong&gt; restricts the type of data users can input into a cell.&lt;/p&gt;

&lt;p&gt;Steps&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Select the cells where you want a dropdown (e.g., A2:A10)&lt;/li&gt;
&lt;li&gt;Go to Data &amp;gt; Data Validation&lt;/li&gt;
&lt;li&gt;In the dialog:&lt;/li&gt;
&lt;li&gt;Allow: List&lt;/li&gt;
&lt;li&gt;Source: Department, Age, Gender&lt;/li&gt;
&lt;li&gt;Click OK&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Removing Duplicates
&lt;/h3&gt;

&lt;p&gt;Duplicate data causes errors in analysis and inflates numbers.&lt;/p&gt;

&lt;h3&gt;
  
  
  Functions in Excel
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Text Functions&lt;/strong&gt; are built-in formulas used to clean, extract, change, and combine text strings in your spreadsheets.&lt;/p&gt;

&lt;p&gt;Key Functions include;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;UPPER()&lt;/strong&gt; Converts text to uppercase&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LOWER()&lt;/strong&gt; Converts text to lowercase&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PROPER()&lt;/strong&gt; Capitalizes first letter of each word&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TRIM()&lt;/strong&gt; Removes extra spaces from text&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LEFT()&lt;/strong&gt; Extracts leftmost characters&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RIGHT()&lt;/strong&gt; Extracts rightmost characters&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MID()&lt;/strong&gt; Extracts characters from the middle&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LEN()&lt;/strong&gt; Returns length of text&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;FIND()&lt;/strong&gt; Finds position of a substring (case-sensitive)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SUBSTITUTE()&lt;/strong&gt; Replaces text within a string&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An example can be Correcting names to lower case, Upper case and proper case&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Facc8mmi9opwxuj942vrl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Facc8mmi9opwxuj942vrl.png" alt="Upperlower" width="346" height="178"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Number Function&lt;/strong&gt; help you perform math, find totals, count items, and change how numbers look in your spreadsheet.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Arithmetic operators&lt;/em&gt; are symbols used to perform basic mathematical calculations like addition, subtraction, multiplication, and division&lt;/p&gt;

&lt;p&gt;Addition + =A1+B1&lt;br&gt;
Subtraction - =A1-B1&lt;br&gt;
Multiplication * =A1*B1&lt;br&gt;
Division / =A1/B1&lt;br&gt;
Exponents ^ =A1^2&lt;/p&gt;

&lt;p&gt;An example can be performing a Simple Addition Calculation&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fthzh5ylm32x87xoq09zx.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fthzh5ylm32x87xoq09zx.png" alt="Addition" width="341" height="144"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Functions&lt;/strong&gt; A function is a predefined formula in Excel that performs a specific task. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SUM()&lt;/strong&gt; Adds a range of numbers&lt;br&gt;
&lt;strong&gt;AVERAGE()&lt;/strong&gt; Calculates the mean of values&lt;br&gt;
&lt;strong&gt;MIN()&lt;/strong&gt; Finds the smallest number&lt;br&gt;
&lt;strong&gt;MAX()&lt;/strong&gt; Finds the largest number&lt;br&gt;
&lt;strong&gt;COUNT()&lt;/strong&gt; Counts how many numbers are in a range&lt;br&gt;
&lt;strong&gt;POWER()&lt;/strong&gt; to raise a base number to a specified exponent or power&lt;br&gt;
&lt;strong&gt;SQRT()&lt;/strong&gt; to calculate the square root of a positive number&lt;br&gt;
&lt;strong&gt;PRODUCT()&lt;/strong&gt; to multiply all the numbers given as arguments and return the final result&lt;br&gt;
&lt;strong&gt;MODE()&lt;/strong&gt; to find the most frequently occurring number in a datase&lt;br&gt;
&lt;strong&gt;MEDIAN()&lt;/strong&gt; to find the middle number in a set of given values&lt;/p&gt;

&lt;p&gt;An example can be performing Addition for cells ranging from A12 to D13&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnhmfmu41lpsrr9akpwb3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fnhmfmu41lpsrr9akpwb3.png" alt="SUM" width="407" height="165"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click on an empty cell (e.g., D15)&lt;/li&gt;
&lt;li&gt;Type =SUM(A12:D13)&lt;/li&gt;
&lt;li&gt;Press Enter&lt;/li&gt;
&lt;li&gt;Excel returns the total sum of A12 to D13&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>data</category>
      <category>datascience</category>
      <category>analytics</category>
    </item>
    <item>
      <title>My First Github Project: From A Local Folder To Github Using Git And SSH.</title>
      <dc:creator>Brian Kariuki</dc:creator>
      <pubDate>Sat, 22 Aug 2026 11:29:21 +0000</pubDate>
      <link>https://dev.to/brian_kariuki/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-l00</link>
      <guid>https://dev.to/brian_kariuki/my-first-github-project-from-a-local-folder-to-github-using-git-and-ssh-l00</guid>
      <description>&lt;h1&gt;
  
  
  Git and Github
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Github&lt;/strong&gt; is a website and cloud-based platform where users may store, exchange, and collaborate on computer code. It makes use of &lt;strong&gt;Git&lt;/strong&gt;, a program that keeps track of file changes over time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating Project Folder
&lt;/h2&gt;

&lt;p&gt;I first created a new project using &lt;strong&gt;Gitbash&lt;/strong&gt; called Kenya-Health-Records-Analysis using the &lt;strong&gt;mkdir&lt;/strong&gt; &lt;em&gt;make directory&lt;/em&gt; command.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps I took:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Navigated where I want project stored (&lt;code&gt;cd ~/Desktop&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Created the project folder (&lt;code&gt;mkdir Kenya-Health-Records-Analysis&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Enter the created folder (&lt;code&gt;cd Kenya-Health-Records-Analysis&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Inside the Kenya-Health-Records-Analysis folder, I created an additional folder called data (&lt;code&gt;mkdir data&lt;/code&gt;) and a file README.md (&lt;code&gt;touch README.md&lt;/code&gt;)&lt;/p&gt;

&lt;p&gt;Inside the data folder I added a Kenya_Hospital_Health_Records xlsx file.&lt;/p&gt;

&lt;h2&gt;
  
  
  User Guide To Our First Project
&lt;/h2&gt;

&lt;p&gt;Our README.md file serves as introduction or user guide to our project. I opened and edited it in &lt;strong&gt;gitbash&lt;/strong&gt; by running &lt;code&gt;nano README.md&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps I took
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Navigated to the Project Folder &lt;code&gt;cd Kenya-Health-Records-Analysis&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Typed open command &lt;code&gt;nano README.md&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Edited text insided the terminal window explaining our project.&lt;/li&gt;
&lt;li&gt;Saved changes &lt;strong&gt;ctrl+o&lt;/strong&gt; then Enter&lt;/li&gt;
&lt;li&gt;Exit nano &lt;strong&gt;ctrl+x&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Creating our Github Account
&lt;/h2&gt;

&lt;p&gt;As stated earlier, &lt;strong&gt;Github&lt;/strong&gt; is a cloud-based platform where users may store, exchange, and collaborate on computer code. It makes use of &lt;strong&gt;Git&lt;/strong&gt;, a program that keeps track of file modifications over time to prevent you from losing previous work or becoming confused by different stored versions. I used my email to create Github, set a good password, chose the Github free tier and customized my profile.&lt;/p&gt;

&lt;h2&gt;
  
  
  Set Up SSH for GitHub
&lt;/h2&gt;

&lt;p&gt;SSH enables secure communication between my computer and Github without requiring me to input my Github username and password each time I push changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Steps I took
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Checked whether I already have an SSH key by running &lt;code&gt;ls -al ~/.ssh&lt;/code&gt;, In my case I didn't have one.&lt;/li&gt;
&lt;li&gt;I created a new SSH key by running &lt;code&gt;ssh-keygen -t ed25519 -C "your-email@example.com"&lt;/code&gt; , replaced email with the email address connected to my GitHub account.&lt;/li&gt;
&lt;li&gt;Created an SSH passphrase.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Add SSH Key to the SSH Agent
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Started the SSH agent by running &lt;code&gt;eval "$(ssh-agent -s)"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Then added my private SSH key &lt;code&gt;ssh-add ~/.ssh/id_ed25519&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Add Public SSH Key to GitHub
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Show my public SSH key by running &lt;code&gt;cat ~/.ssh/id_ed25519.pub&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Copy the Public SSH Key.&lt;/li&gt;
&lt;li&gt;Open GitHub and go to Settings, then select &lt;strong&gt;SSH and GPG keys&lt;/strong&gt;. &lt;/li&gt;
&lt;li&gt;Click New SSH key, enter a descriptive title such as &lt;em&gt;My laptop&lt;/em&gt;, and paste the public SSH key into the key field.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Test SSH Connection
&lt;/h3&gt;

&lt;p&gt;Tested whether GitHub recognizes my &lt;strong&gt;SSH&lt;/strong&gt; key by running, &lt;code&gt;ssh -T git@github.com&lt;/code&gt;. My case I was asked to confirm GitHub's host by typing yes. GitHub displayed a successful authentication message.&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Project Folder
&lt;/h2&gt;

&lt;p&gt;I navigated to the folder containing my project, &lt;code&gt;cd Kenya-Health-Records-Analysis&lt;/code&gt;&lt;br&gt;
I confirmed that I'm in the correct folder by listing its contents, &lt;code&gt;ls&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Initialize Git in Local Project
&lt;/h2&gt;

&lt;p&gt;Inside my project folder, I &lt;strong&gt;initialized&lt;/strong&gt; Git by running, &lt;code&gt;git init&lt;/code&gt;, this command creates a new local Git repository and allows Git to begin tracking changes to your project files. &lt;br&gt;
Checked the repository status by running, &lt;code&gt;git status&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Add Project Files to Git
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Added&lt;/strong&gt; all files in the current project folder to Git by running, &lt;code&gt;git add .&lt;/code&gt;&lt;br&gt;
Checked whether the files are ready to be committed by running &lt;code&gt;git status&lt;/code&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Create First Commit
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Commit&lt;/strong&gt; main goal is to permanently store your project in your local repository history, I run &lt;code&gt;git commit -m "Initial commit"&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Create a New Repository on GitHub
&lt;/h2&gt;

&lt;p&gt;Inside Github, I selected New &lt;strong&gt;repository&lt;/strong&gt;,entered a name for my project, chose whether the &lt;strong&gt;repository&lt;/strong&gt; should be Public or Private and clicked Create &lt;strong&gt;repository&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connect Local Project to GitHub
&lt;/h2&gt;

&lt;p&gt;In GitHub repository created, I clicked SSH and copied the URL.&lt;br&gt;
I connected local repository to gitHub by running, &lt;code&gt;git remote add origin git@github.com:YOUR-USERNAME/Kenya-Health-Records-Analysis&lt;/code&gt;, replaced USERNAME with my actual github username.&lt;br&gt;
I verified that the remote repository was added successfully by running, &lt;code&gt;git remote -v&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Push Project to GitHub
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Pushed&lt;/strong&gt; my project to GitHub by running, &lt;code&gt;git push -u origin main&lt;/code&gt;&lt;br&gt;
Project files were visible in my GitHub repository.&lt;/p&gt;

</description>
      <category>github</category>
      <category>git</category>
      <category>datascience</category>
      <category>analytics</category>
    </item>
  </channel>
</rss>
