<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Raji Babatunde on Medium]]></title>
        <description><![CDATA[Stories by Raji Babatunde on Medium]]></description>
        <link>https://medium.com/@rajibabatunde?source=rss-81789d58dd89------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*K1R2IMtUTtIIyXYvw6Rl5A@2x.jpeg</url>
            <title>Stories by Raji Babatunde on Medium</title>
            <link>https://medium.com/@rajibabatunde?source=rss-81789d58dd89------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 14:15:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rajibabatunde/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[CTE VS SUBQUERIES: The Battle of Building Queries from Inside Out]]></title>
            <link>https://medium.com/@rajibabatunde/cte-vs-subqueries-the-battle-of-building-queries-from-inside-out-b455609ca9b6?source=rss-81789d58dd89------2</link>
            <guid isPermaLink="false">https://medium.com/p/b455609ca9b6</guid>
            <dc:creator><![CDATA[Raji Babatunde]]></dc:creator>
            <pubDate>Thu, 07 Sep 2023 08:50:16 GMT</pubDate>
            <atom:updated>2023-09-07T08:50:16.630Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*zO1AhmuICN9-N0hTlTHZHw.png" /></figure><p>Imagine you’re constructing a puzzle. Do you start with the big picture, fitting pieces together as you go? Or do you build smaller sections and combine them to reveal the whole image? In the world of SQL, a programming language designed to manage and manipulate databases, we have similar strategies to unravel data mysteries. Enter CTEs (Common Table Expressions) and Subqueries.</p><h3>INTRODUCTION</h3><p>SQL queries are like detective stories, where we look for data clues to solve our case. However, some cases (or queries) are more complicated than others. To simplify things, we use tools like CTEs and Subqueries. Let’s dive into what they are and how they compare.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Not3-p8jhrIAmwXFPjhKuw.png" /><figcaption>Image From SQL Murder Mystery Knightlab</figcaption></figure><h3>Subqueries: <strong>The Mini-Queries</strong></h3><p>Imagine you have to find a book in a massive library. But instead of looking for the book directly, you first locate the right section, then the right shelf, and finally the book. Each of these steps is like a mini-search or a “subquery” that helps us get to our final answer.</p><p>Let’s take an example from my most recent case study of my <a href="https://github.com/Kile-kun/My100DaysSQLChallenge/tree/main">#My100DaysSQLChallenge</a> (which I titled <a href="https://github.com/Kile-kun/My100DaysSQLChallenge/blob/main/Day60-62%20(SQL%20Case%20Study4).sql">Data Bank</a>). Part of the problem requires us to retrieve the list of customers who deposit multiple times and either withdraw or purchase once a month. if we are to approach the solution from a subquery angle, we will get the following;</p><pre>SELECT txn_month, COUNT(*) AS total_customers<br>FROM (<br>       SELECT customer_id, MONTH(txn_date) AS txn_month,<br>         SUM (CASE WHEN txn_type = &#39;deposit&#39; THEN 1 ELSE 0 END) AS dep_count,<br>         SUM (CASE WHEN txn_type IN(&#39;purchase&#39;, &#39;withdrawal&#39;)<br>                   THEN 1 ELSE 0 END) AS pur_withd_count<br>       FROM transactions<br>       GROUP BY customer_id, MONTH(txn_date)<br>       ) AS dep_pur_with_cte<br>WHERE dep_count &gt; 1 AND pur_withd_count &gt; 1<br>GROUP BY txn_month<br>ORDER BY txn_month;</pre><p>If you observe, the FROM syntax was not followed by a single table name but a table we created on the spot, which is afterward given an alias after the closing bracket.</p><h4><strong>Pros</strong></h4><ol><li><strong>Flexibility</strong>: They can be used in various parts of a main query (like SELECT, FROM, or WHERE).</li><li><strong>Universality</strong>: The Concept of Subqueries is not alien across all flavors of SQL. MySQL, MSSQL, PostgreSQL, and the like all support its usage.</li></ol><h4>Cons</h4><p><strong>Readability: </strong>In cases where there is a need for Multiple nested subqueries, it can become complex and hard to follow, like a maze within a maze.</p><h3>CTEs (Common Table Expressions): The Guided Path</h3><p>Returning to our library analogy, CTEs are like creating a temporary signpost. Instead of remembering every step (locate the section, find a shelf, and then the book), you put a temporary marker in the section. This way, anyone looking for the book starts at the signpost, making the process easier and faster. In this scenario, CTE helps create a temporary table needed for the query before extracting what we need or performing aggregation on it. You can always reference any column of the temporary table as you proceed.</p><p>Using the CTE approach for the same question as for subquery, the solution thus will be;</p><pre>WITH dep_pur_with_cte AS (<br>       SELECT customer_id, MONTH(txn_date) AS txn_month,<br>         SUM (CASE WHEN txn_type = &#39;deposit&#39; THEN 1 ELSE 0 END) AS dep_count,<br>         SUM (CASE WHEN txn_type IN(&#39;purchase&#39;, &#39;withdrawal&#39;) <br>                    THEN 1 ELSE 0 END) AS pur_withd_count<br>       FROM transactions<br>       GROUP BY customer_id, MONTH(txn_date)<br>       )<br>SELECT txn_month, COUNT(*) AS total_customers<br>FROM dep_pur_with_cte<br>WHERE dep_count &gt; 1 AND pur_withd_count &gt; 1<br>GROUP BY txn_month<br>ORDER BY txn_month;</pre><p>If you observe, the WITH clause helped create a temporary table for deposits, purchases, and withdrawals (named dep_pur_with_cte) from which a final aggregated table that counts customers that satisfy the requirements was further extracted.</p><h4>Pros</h4><ol><li><strong>Readability:</strong> CTEs are declared at the start, so you set your temporary tables first, making the main query cleaner.</li><li><strong>Reuse:</strong> You can reference a CTE multiple times in your main query.</li></ol><h4>Cons</h4><p><strong>Not Always Necessary:</strong> Introducing a CTE might be overkill for more straightforward queries. Imagine a case where we need to write a query that extracts the list of customers with total deposits above the average deposit, Subquery is the perfect method.</p><pre>SELECT customer_id, txn_amount AS tot_deposit<br>FROM transactions<br>WHERE txn_type = &#39;deposit&#39; <br>    AND txn_amount &gt; (<br>                      SELECT avg(txn_amount) <br>                      FROM transactions<br>                      WHERE txn_type = &#39;deposit&#39;);</pre><h3>Battle Time: CTEs vs. Subqueries</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*VgJAWhZpY0CGz13Buea6uA.png" /></figure><p><strong>Complexity: </strong>For more intricate queries, CTEs often offer better readability. Instead of diving deep into nested subqueries, you can follow the step-by-step breakdown a CTE offers.</p><p><strong>Performance:</strong> There’s a myth that one is faster than the other. In Reality, Performance largely depends on how the database engine processes the query. Sometimes, there’s no significant difference.</p><p><strong>Use Case:</strong> If you want a temporary result set that you’ll reference multiple times, CTEs are your friend. A subquery might be the way to go if you want to do a quick, one-off sub-search within your main search.</p><p><strong>Non-SQL Adherence: </strong>In some cases, there is a need to use an SQL database with a Visualization tool like Power BI to retrieve and visualize the result. When using the direct query to import the results, the CTE function result can&#39;t be loaded into the report environment. Converting the CTE in such queries to a Subquery is highly advisable for it to work.</p><h3>Conclusion</h3><p>Like many things in tech, choosing between CTEs and Subqueries isn’t about which is ‘better’. It’s about which is better for your specific task. Are you building a complex data story and need a clear structure? CTEs might be your choice. Do you need to pull out a quick fact? A subquery could do the trick.</p><p>Remember, both CTEs and subqueries are tools in your SQL toolkit. Mastering when and how to use each will make you an excellent SQL detective!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b455609ca9b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL QUERIES BEST PRACTICES]]></title>
            <link>https://medium.com/@rajibabatunde/sql-queries-best-practices-1bdf77148bf3?source=rss-81789d58dd89------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bdf77148bf3</guid>
            <category><![CDATA[best-practices]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[database-management]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Raji Babatunde]]></dc:creator>
            <pubDate>Mon, 17 Jul 2023 07:05:40 GMT</pubDate>
            <atom:updated>2023-07-17T07:05:40.065Z</atom:updated>
            <content:encoded><![CDATA[<h4>(<strong>Encouraging Writing Readable Codes)</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*uTtTuNl8fjr3OcO0SZ0sxw.jpeg" /><figcaption><em>Picture from Microsoft Online image</em></figcaption></figure><h3>Introduction</h3><p>Much has been said about the importance of SQL to data management. Most articles and experienced data professionals rank the knowledge of SQL very high across different fields of data (ranging from data analytics, data engineering, machine learning, and the like). They believe it plays a very crucial role in the manipulation and retrieval of information from the ever-increasing gazillion bytes of data for corporations. However, most focus is always centered on the efficiency and performance of the queries. In the sense that, most analysts want queries that will retrieve data faster while saving space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*dDoNLSrvei0-m2YbKRqHJQ.png" /><figcaption>Different Query Methods to Retrieve a Specific Data from Database</figcaption></figure><p>It is equally important to emphasize code readability. We are in the era of rapidly changing jobs, so it is not uncommon for a new developer to have a problem deciphering queries written by the previous occupant of the role. A well-written SQL query not only facilitates collaboration but also ensures maintainability and ease of troubleshooting. In this article, we will explore some essential best practices that promote code readability, making SQL queries more approachable for developers and database professionals alike.</p><h4>Consistent Formatting</h4><p>One of the fundamental aspects of code readability is maintaining a consistent formatting style. By adhering to a consistent structure for keywords, clauses, and indentation, queries become more accessible to read and understand. It is recommended to;</p><ol><li>Use uppercase for keywords (e.g., SELECT, FROM, WHERE),</li><li>Lowercase for table names and column identifiers (e.g., sales, products, geography, price)</li><li>Proper indentation and line break help in visually separating different clauses, making the query flow more apparent.</li></ol><h4>Consistent Naming Conventions</h4><p>When choosing names for our tables, columns, and aliases we must ensure it is Meaningful and descriptive names for tables, columns, and aliases. This helps improve code readability. Various naming styles to choose from include the following.</p><ol><li><strong>Descriptive Naming (descriptive_naming)</strong>: This style entails choosing a name that perfectly describes the columns separated by an underscore. Examples include sales_id, product_category, last_name among others. This convention focuses on providing clarity and making it easier to understand the purpose and content of each data element.</li><li><strong>Camel Case (camelCase): </strong>it involves writing multiple-worded column names without space in between them where each words’s first letter (except the first word) are capitalized example include saleId, productCategory, lastName among others. It is quite popular for variable or column names in programming languages and can be applied to data analysis as well.</li><li><strong>Pascal Case (PascalCase): </strong>This style is similar to that of Camel Case, just that the first word just like the subsequent first words of the column is capitalized too. Examples include SalesId, ProductCategory, and LastName among others.</li><li><strong>Prefix and Suffix Naming (_pre &amp; suf_):</strong> it is a form of descriptive naming that involves adding a prefix or suffix to the name to indicate the type or purpose of the data. For example, you could use the prefix “is_” for Boolean fields, such as “is_premium” to indicate whether a customer is a premium member.</li><li><strong>Abbreviation and Acronym: </strong>In the case of overtly possible long Aliases, the abbreviation naming conventions maintain brevity and improve readability. However, it’s important to use them sparingly and ensure they are widely understood within the context of the project or organization. For example, you could use “DOB” for “Date of Birth” or “ROI” for “Return on Investment.” It’s crucial to document any abbreviations or acronyms used to maintain consistency and avoid confusion. And ideally, it is advisable to use the prefix and suffix naming conventions.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/335/1*4zLnb0p4En_Yqn7i1jWr8A.png" /><figcaption>Pictorial Representation of Camel Case Method</figcaption></figure><p>In Summary, whichever of the above naming style you chose to start with it is important to stick to it throughout the queries. And most importantly, it is important to choose names that accurately reflect the data they represent, avoiding vague abbreviations or cryptic labels. For example, instead of using “emp” as a table alias, opt for “employees” to provide clarity. Similarly, employ intuitive and self-explanatory names for columns, avoiding generic terms like “col1” or “data1.” Clear and descriptive naming conventions contribute to the comprehensibility and maintainability of SQL queries.</p><h4><strong>Commenting for Clarity</strong></h4><p>Adding comments to SQL queries can greatly enhance understanding, especially for complex or intricate logic. Commenting should be used judiciously to explain the purpose, intention, or any specific details of the query. Commenting on queries is of the two methods this includes.</p><ol><li>Using the Double Dash (- -): This method uses the double dash symbol at the start of any comment. It is ideal for use for single-line comments, and it can be added to any of the lines of the queries.</li><li>The Slash and Asterix Opening-Close (/**/): This method uses forward slash asterisk and asterisk forward slash to start and close comments in that order to add comments to queries. It is normally used when the comment is going to cover beyond a single line. It is ideal to use it before writing queries.</li></ol><p>In summary, documenting assumptions or providing insights into the query’s behavior can be invaluable for future developers or database administrators who need to comprehend or modify the code. Remember to update comments when making changes to the query to keep the documentation in sync with the code.</p><h4>Modularization and Subqueries</h4><p>Breaking down complex queries into smaller, manageable parts improves both readability and maintainability. Consider using subqueries or common table expressions (CTEs) to isolate logical components. This approach allows focusing on one part of the problem at a time, reducing cognitive overload. Furthermore, modularization promotes code reuse and facilitates troubleshooting by enabling the testing and debugging of individual subqueries.</p><h3>Conclusion</h3><p>Writing SQL queries with code readability in mind is essential for promoting collaboration, maintainability, and troubleshooting. By following best practices like consistent formatting, consistent naming styles, commenting, and modularization, developers can create SQL code that is easily understandable and maintainable.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bdf77148bf3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CAMPAIGN AGAINST GLOBAL HUNGER]]></title>
            <link>https://medium.com/@rajibabatunde/campaign-against-global-hunger-67a61f88a252?source=rss-81789d58dd89------2</link>
            <guid isPermaLink="false">https://medium.com/p/67a61f88a252</guid>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[dax]]></category>
            <category><![CDATA[data-cleaning]]></category>
            <dc:creator><![CDATA[Raji Babatunde]]></dc:creator>
            <pubDate>Tue, 27 Jun 2023 09:56:12 GMT</pubDate>
            <atom:updated>2023-06-27T09:56:12.674Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*8Z_TfRe-WmUT7dfSGotnWg.jpeg" /><figcaption><em>Image from Microsoft Word Stock Picture</em></figcaption></figure><p><em>The most fulfilling aspect of being a data analyst is the privilege to work on practicable projects. Using one’s skills which are gotten from putting in hundreds of hours of practicing on already prepared, cleaned, and profiled data. These data in most cases just need modeling (for visualization experts and machine learning operations too).</em></p><h4>BACKGROUND</h4><p>The Zero Hunger campaign is a challenge by the THRIVE Project to make a difference in our world. The End to Global Hunger and Malnourishment by the year 2030 is one of the core Goals of the United Nations Sustainable Development Goals (SDGs). As such, the project aims to dive deep and access the Global Hunger Index since the turn of the new millennium.</p><h4>DATA PREPARATION</h4><p>The Over Fifty Thousand Rows Data provided by the THRIVE project did not come without challenges, and they include different types of data issues.</p><ol><li><strong>Irrelevant Data</strong>: These are data columns that potentially contribute next to nothing important to the analysis. They are mostly characterized by a larger portion of it being empty values.</li><li><strong>Inconsistent data or Outliers</strong>: These data columns have entries that just don’t conform to the required standard of actual data in real life. An example is a Year column with entries like negative values or values like zeroes and other unideal values.</li><li><strong>Redundant Data</strong>: These gave the most challenges Some entries in the “entity” column are just the addition of some of the values of other rows examples are the World, Africa, Europe, and other foreign entries in the entity column which not only have their other column values missing but their population values are just addition of the values for some other entries and as such were filter out (using the fact that they have no country code) and subsequently deleted.</li></ol><p>After all the challenges with redundancy and missing values were cleared, the fifty thousand entries were reduced to five thousand row data and were subsequently loaded onto the Microsoft Power BI for further preparation and visualization.</p><h4>DATA VISUALIZATION</h4><p>After uploading the prepared data in CSV format to the power bi desktop for further cleaning and enriching, the following operation was done;</p><p>· The Columns of the two tables were further formatted according to their individual data types,</p><p>· A calendar table was created using the Power Query (M-Query Language).</p><pre>= {Number.From(#date(2000,1,1))..Number.From(#date(2021,12,31))}</pre><p>· Standard country table was researched from the <a href="https://statisticstimes.com/geography/countries-by-continents.php">statistics times</a> website and attached to the model.</p><p>Several Measure values were written and added to the key measure table. The measure values range from simple DAX functions like the total populations to much more complicated functions like the previous period’s global hunger index (which was caused by the uneven intervals of the recorded global hunger index.</p><pre>Previous Period GHI = <br>VAR CurrentYear =<br>    MAX (year_lookup[End of Year])<br>VAR T1 =<br>    ALLSELECTED(year_lookup[End of Year])<br>VAR T2 =<br>    ADDCOLUMNS(<br>        T1,<br>        &quot;@GHI&quot;,<br>            VAR ThisYear = (year_lookup[End of Year])<br>            RETURN<br>                CALCULATE ([Global Hunger Index], (year_lookup[End of Year])<br>                                                    = ThisYear )<br>    )<br>VAR T3 =<br>    FILTER (T2, (year_lookup[End of Year]) &lt; CurrentYear &amp;&amp; [@GHI] &lt;&gt; BLANK ())<br>VAR T4 =<br>    TOPN (1, T3, (year_lookup[End of Year]))<br>RETURN<br>    IF ([Global Hunger Index] &lt;&gt; BLANK (), MAXX (T4, [@GHI]))</pre><h4>INSIGHTS</h4><p>Displayed on the Dashboard include;</p><ol><li>Total World Population,</li><li>Average GDP per Capita, and</li><li>Average Global Hunger Index</li></ol><p>All of these were expressed on KPI cards (to compare with the previous period), Maps (To see the distribution among regions), and Line Chart (To visualize yearly progression and Bar Chart to see the topmost challenged regions in terms of hunger.</p><p>The details of the insights are expressed <a href="https://app.powerbi.com/groups/me/reports/a41e5e3f-4658-4704-bfbc-1a23ae5de6bc/ReportSection?experience=power-bi&amp;clientSideAuth=0">here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*X2qH9LUZw6M54652Umm-fA.png" /><figcaption>Dashboard</figcaption></figure><h4>CONCLUSION</h4><p>Having explored and analyzed the growth and progress of the sustainable development goals in which global hunger is a focal point it can be concluded that;</p><ol><li>Population growth has not been proportionated to the GDP per capita growth. Where Nearly 2 billion people are added to the world population as against $4000 added to the world’s average GDP Per Capita.</li><li>The Global Hunger Index decline has been largely slower when compared to the Global GDP Per Capita Growth.</li><li>Africa is the biggest victim of the Global Hunger Menace with a Lower GDP per Capita And a Higher Global Hunger Index when compared to the Global Average Value.</li></ol><h4>RECOMMENDATION</h4><p>Looking at the dashboard it is highly recommended that;</p><ol><li>Special focus should be given to Africa to help abate the menace of hunger</li><li>Efforts should be put into wealth distribution (between rich and poor nations) through initiatives like Agriculture and Rural Development, the Provision of safety nets for struggling nations, and Combating climate change (which affects poor nations more).</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67a61f88a252" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[World Startup Analytics]]></title>
            <link>https://medium.com/@rajibabatunde/world-startup-analytics-b2809716d867?source=rss-81789d58dd89------2</link>
            <guid isPermaLink="false">https://medium.com/p/b2809716d867</guid>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[historical-analytics]]></category>
            <category><![CDATA[data-storytelling]]></category>
            <dc:creator><![CDATA[Raji Babatunde]]></dc:creator>
            <pubDate>Sat, 04 Feb 2023 12:56:41 GMT</pubDate>
            <atom:updated>2023-02-04T12:56:41.044Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*02DG9V6N63Ov-T7d56BlSA.png" /></figure><p>The Bedrock of any nation’s economic growth is the innovative capacity of its citizens. The ability to create a solution-focused idea out of mere intuition and observations will continue to be a determining factor in ranking economic world powers among countries. In a national context, it is a crucial factor in a nation’s economic growth as it can lead to the development of new products, services, and technologies that can help increase productivity, efficiency, and competitiveness. A strong innovative capacity can also attract foreign investment and talent, which can further boost economic growth.</p><p>According to <a href="https://meoconsultants.com/articles/the-importance-of-startups-in-economic-growth/#:~:text=Startups%20are%20a%20major%20contributor,be%20more%20innovative%20and%20creative.">Meo 2022</a>, a startup is a business that is just starting. They are created by one or more owners who desire to provide a good or service for which they feel there is a market. They are usually small, early-stage businesses that are trying to validate their business model and scale their operations. They often have limited resources and operate with a high degree of uncertainty. The goal of a startup is to grow quickly and become a successful and sustainable business, while some grow so big and powerful that they disrupt the traditional way of doing things, a case study is Amazon, eBay, Alibaba, et al. which redefined e-commerce. Google and Yahoo disrupt traditional media. Some not-so-lucky ones fizzle away or at best get bought over by the established corporation.</p><p>In this project, we use SQL, excel, and power bi to analyze the historic trend of the innovation industries from the start of the last century (1900) till the last decade 2013 to generate insights and highlight several factors that influence investment into different startups.</p><h3>Project Objectives</h3><p>1. Creation of a Startup database to document all startups since 1900, their top personnel, and every major detail and milestone they achieved since inception.</p><p>2. Writing queries to generate insights from the startup database.</p><p>3. Description and understanding of major factors affecting a startup’s ability to raise funds for operation.</p><p>4. Designing of Dashboard to visualize the insights generated from the database.</p><h3>Dataset Description</h3><p>This dataset was provided as part of the bootcamp capstone project by <a href="https://app.tech1m.com/">Tech1M</a>. The Dataset provides details about all the startups in separate tables which includes.</p><p>1. The name and valuation of each startup.</p><p>2. Details of locations of operations for each startup.</p><p>3. All the Personnel involved in each startup (ranging from the founders to engineers) since its inception.</p><p>4. The Academic Qualification of each personnel.</p><p>5. The Funding details each startup partook in to raise funds for operation.</p><p>6. The Details of each venture capital and financial institution that invested in each startup.</p><p>7. The Details of all acquisitions that took place since inception.</p><p>8. Details of Initial Public offerings raised value, and both pre-and post-IPO valuations for startups that went public.</p><p>9. Major Event timelines that happen in each startup.</p><h3>Tools Description</h3><p><strong>Excel</strong>- This is the most basic and easy-to-use data analytics software, developed by Microsoft for businesses, engineers, and the public for data entry and analytics. The data for this project was collated and saved in CSV, a format of excel. So, it is logical to first eyeball the data using excel before uploading it to the database.</p><p><strong>Microsoft SQL Server Management System (SSMS)-</strong> Microsoft SQL Server is a relational database management system (RDBMS). Developed by Microsoft, SSMS is one of the SQL software used for managing an enormous amount of data. It is used to store and manage data for a wide variety of applications, including business intelligence, data warehousing, and web-based applications. The SQL Server Management Studio (SSMS) is a tool provided by Microsoft that allows users to manage and interact with SQL Server databases.</p><p><strong>Power BI</strong>- This is a business intelligence and data visualization tool also developed by Microsoft which allows users to connect to various data sources, such as Excel, SQL Server, and cloud-based services like Azure, and transform and analyze the data to create interactive reports and dashboards. It provides a drag-and-drop interface for creating visualizations, such as charts, tables, and maps, and allows users to explore and interact with the data using filters and slicers.</p><h3>Data Analysis (Excel &amp; SQL)</h3><p><strong>Data Eyeballing- </strong>Also Known as data snooping is the process of visually inspecting data for patterns or trends without using a formal statistical method. In this context, the visual inspection of the datasets was restricted to each first hundred rows to see the viability of their headings and to understand the data types for database creation. Also, Data eyeballing helped to reinforce the fact that the database needed a country dataset which was not provided in the parent dataset, the country dataset was sourced from <a href="https://data.world/dr5hn/country-state-city/workspace/file?filename=countries.csv">dataworld</a>. The link to the data is <a href="https://drive.google.com/drive/u/1/folders/1gVxvhBmrlEnnLVKDrqZx7_gZeU6wTkQm">here</a></p><p><strong>Database Creation- </strong>This Process entails the simple task of setting up a database needed for the project. The “startup” database creation follows thus.</p><pre>DROP DATABASE IF EXISTS startup_db;<br>CREATE DATABASE startup_db;</pre><p><strong>Data Upload- </strong>All the twelve datasets that were to make up the database were uploaded on the database using the flat file uploads method.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/332/1*zWyZmsdXozRoH2OLnoNBaA.png" /><figcaption>Screenshot of Data Uploading Process</figcaption></figure><p>This method involves uploading all the individual datasets onto the created database. Here the individual data type will be specified for each column of each dataset and each dataset has a specified primary key. The following rules were followed to successfully update the datasets in the database.</p><ol><li>All columns were allowed to have null values except the primary columns,</li><li>Columns with the currency amount related should have a decimal (18,2) as a datatype,</li><li>All primary keys except the object table (which has varchar (50)) have an Integer as their datatype,</li><li>Date columns have either Datetime (for created_at and updated_at columns) or date2 datatype depending on the content of the column,</li><li>All other columns outside the above rules employ varchar (MAX) as their datatypes.</li></ol><p><strong>Dataset And Their Respective Primary Key</strong></p><p>acquisitions- acquisition_id</p><p>countries- country_id</p><p>degrees- degree_id</p><p>funding_rounds- funding_round_id</p><p>funds- fund_id</p><p>investments- investment_id</p><p>ipos- ipo_id</p><p>milestones- milestones_id</p><p>objects- object_id</p><p>offices- office_id</p><p>people- people_id</p><p>relationships- relationships_id</p><h3>Data Exploration</h3><p>Digging into the data to generate insight to help understand the growth of innovations over the years. The link to the code details is <a href="https://github.com/Kile-kun/Startup-Analysis">here</a>.</p><h4><strong>I. No of Startups Represented Across Each Entity</strong></h4><p>Fundamentally, we should understand the spread of each entity across the entire dataset.</p><pre>SELECT <br>entity_type AS startup_type, <br>COUNT(entity_type) AS no_of_startups, <br>SUM(funding_total_usd) AS total_funding <br>FROM dbo.objects<br>GROUP BY entity_type;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/463/1*zBh8a9MZ0MWuve-WpXlpXw.png" /><figcaption>A doughnut graph of startup spread under review</figcaption></figure><p>From the start of the 19th century till 2013, from a total of over Four Hundred thousand entries, 90% of them represent Startups and Personnel which means a little below Two hundred thousand startups have been created employing the same amount of personnel as its top management. Also, Six Percent of the recorded entities are products developed by the startups since inception, and a little bit above a thousand Investment Organization Financing the startups. Of all the entities considered only the Startups received investments according to the records.</p><h4><strong>II. Yearly Startups Creation Rate</strong></h4><p>Isolating the startups (Company) from the above analysis and considering the timeline progress of startup creation throughout the year under study.</p><pre>SELECT <br>FORMAT(founded_at, &#39;yyyy&#39;) AS year_founded,<br>COUNT(name) AS no_of_startups, <br>SUM(funding_total_usd) AS funding_attracted<br>FROM [dbo].[objects]<br>WHERE entity_type != &#39;Person&#39;<br>GROUP BY FORMAT(founded_at, &#39;yyyy&#39;)<br>ORDER BY FORMAT(founded_at, &#39;yyyy&#39;) ASC;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*XuRdKVZjzGubPQxBd7RayQ.png" /><figcaption><em>Time series Analysis of Startup Creation Since Inceptions</em></figcaption></figure><p>From the turn of the 20th century till the 1960s no visible growth in the innovations industry was recorded, after then, there seems to be a growth in the number of startups created which peaked temporarily around the start of the 21st century. The growth continued and peaked fully around 2008 which started descending from there.</p><h4>III. Yearly Startup Acquisition Rate</h4><p>The timeline analysis was taken for the rate of acquisition of emerging technologies by bigger corporations.</p><pre>SELECT <br>FORMAT(acquired_at, &#39;yyyy&#39;) AS acquisition_year,<br>COUNT(acquiring_object_id) AS total_startups_acquired, <br>SUM(price_amount) AS acquisition_value<br>FROM [dbo].[acquisitions]<br>GROUP BY FORMAT(acquired_at, &#39;yyyy&#39;)<br>ORDER BY FORMAT(acquired_at, &#39;yyyy&#39;) ASC;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*iaHb4et-BBrbgplRH42oug.png" /><figcaption><em>Startup Acquisition Rate Time Series Analysis</em></figcaption></figure><p>As Startups were springing up in their droves, the Successful ones have been acquired by the bigger corporation to either stifle competition, reinforce monopoly, or both. The first recorded acquisitions took place in 1966 and there seems to be constant growth in startup acquisitions. These peaked in 2011.</p><h4><strong>IV. Top Acquisition Ranking</strong></h4><p>Here we seek to rank the top organizations by both the number of startups they acquired and the value of the acquisition amount.</p><pre>SELECT <br>ob.normalized_name,<br>COUNT(ob.normalized_name) as total_acquisitions,<br>SUM(ac.price_amount) as total_spent_on_acquisitions<br>FROM [dbo].[objects] ob<br>JOIN<br>[dbo].[acquisitions] ac<br>ON ob.object_id = ac.acquiring_object_id<br>GROUP BY ob.normalized_name<br>ORDER BY total_spent_on_acquisitions DESC;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*tK8kozf61df-Em3FUpAbQA.png" /><figcaption><em>Ranking Acquisitions Based on the number of startups acquired and the value of acquisitions</em></figcaption></figure><p>For the year under consideration, Cisco, Google, and Microsoft top the corporations with the most startup acquisitions. While, General Motors, AT&amp;T, and HP Spent the most on acquisitions. These go to prove that there seems to be a paradigm shift in the category of startups springing up lately. Top Acquisitions based on the number of startups acquired are done by software designing organizations, while top acquisitions based on the amount spent are done between the telecommunications and automobile industries.</p><h4>V. Top Rankings Based on Funding Rounds</h4><p>Digging into the Ranking of Organizations by the number of times they apply for funding from investment openings.</p><pre>SELECT ob.normalized_name AS startup_name, <br> COUNT(ob.normalized_name) AS no_of_rounds, <br> SUM(fr.raised_amount) AS total_funds_raised<br>FROM  [dbo].[objects] ob<br>JOIN<br>[dbo].[funding_rounds] fr<br>ON  fr.object_id = ob.object_id<br>GROUP BY ob.normalized_name<br>ORDER BY no_of_rounds DESC;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/615/1*wd2bKvi3JOkfNQJKMDFwEg.png" /><figcaption>Bar Graph of Startup Ranking by Funds and Funding Rounds</figcaption></figure><p>The analysis showed that none of the startups that rank the most on funding application rounds are nowhere near the top startups with the most raised funds. While mobivery and tyro payments top the startups with the number of funding rounds with equal numbers (15), Clearwire led the ranks of the startups with the most raised funds from the funding rounds.</p><h4><strong>VI. Top Startups with Successful Rounds</strong></h4><p>Looking into the number of times each funding round type successfully raises funds for startups.</p><pre>SELECT funding_round_type, <br>COUNT(funding_round_type) AS no_of_funding_round, <br>SUM(raised_amount_usd) AS total_fund_disbursed<br>FROM dbo.funding_rounds<br>GROUP BY funding_round_type<br>HAVING SUM(raised_amount_usd) &gt; 0<br>ORDER BY funding_round_type;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*SNATHAh3KsAjOeJLUOKrNQ.png" /><figcaption><em>Total Successful funding rounds for startups</em></figcaption></figure><p>By virtue of the fact that it is the first funding available to every startup, it is not surprising that Venture capitalist and angel investment recorded the highest number of successful investments while post-ipo recorded the least.</p><h4><strong>VII. Top Initial Public Offerings (IPO)</strong></h4><p>Assessing the ranks of startups that successfully went public.</p><pre>SELECT ob.name AS company_name, <br>ip.raised_amount, <br>ip.valuation_amount<br>FROM  [dbo].[objects] ob<br>JOIN [dbo].[ipos] ip<br>ON  ob.object_id = ip.object_id<br>WHERE  raised_amount &gt; 0<br>ORDER BY raised_amount DESC;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*6Jao615qPSMgRf2eoLWJ5g.png" /><figcaption><em>Top IPOs recorded</em></figcaption></figure><p>Not Every birthed idea becomes a startup, and not all startups become successful enough to go public, Out of A little above a thousand startups (1249) that attempted to raise funds via Initial Public Offerings (IPO), only 137 were successful of which only Tesco and Facebook (Now Meta) recorded double digits (in billion dollars) raised funds.</p><h4><strong>VIII. Top Startup Categories with Funding Rate</strong></h4><p>To Assess top startup categories using the likelihood of their startup to receive funding using average funding received per startup (in a category) as a metric. This will help give insight into which idea investors are more likely to fund.</p><pre>SELECT  ob.category_code,<br>COUNT(ob.category_code) AS no_of_startups, <br>SUM(ob.funding_total_usd) AS total_funds_recieved,<br>MAX(ob.funding_total_usd) AS highest_funding_recieved,<br>SUM(ob.funding_total_usd)/NULLIF(COUNT(ob.category_code),0) AS funding_per_startup<br>FROM   [dbo].[objects] ob<br>GROUP BY ob.category_code<br>ORDER BY  total_funds_recieved DESC;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*eDBcSIfQXm2nPKuEZmVazQ.png" /><figcaption><em>Startup category ranking</em></figcaption></figure><p>From the Tree Map above, even though software design and web design-focused startups raised more funding (By the number of startups that provide that service), The Category of startups that focused on bio and semiconductors averaged more funding received per startup that represented them.</p><h4><strong>IX. Top Startup Investment Destinations</strong></h4><p>Assessing the impact of locations on startup creation and investment they attract</p><pre>SELECT  co.name  AS country,<br>COUNT(co.name) AS no_of_startups, <br>SUM(ob.funding_total_usd) AS total_fund_recieved<br>FROM  [dbo].[countries] co<br>JOIN  [dbo].[objects] ob<br>ON  co.country_code = ob.country_code<br>WHERE   ob.entity_type = &#39;Company&#39;<br>GROUP BY  co.name<br>ORDER BY  no_of_startups DESC;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/602/1*EFEtz3XvbvABXj--CZ6rOw.png" /><figcaption><em>Startup spreads across countries</em></figcaption></figure><p>Of the 196,553 Startups spread across 168 countries, the United State of America has a hold of over 25% of the total startups with funding representation of a staggering 75% of all the available investments for all the startups. The United Kingdom holds the lion’s share for Europe, China for Asia, and India for the Middle East.</p><h4>X. Impact of Startup Founder’s Qualifications on Rate of Funding</h4><p>To be able to assess the impact qualification has on the likelihood of investment, it is incredibly important to group all founders’ qualifications and their respective investments.</p><pre>SELECT<br> (CASE<br> WHEN <br> (de.degree_type LIKE (&#39;B%&#39;) OR de.degree_type LIKE (&#39;%BSc%&#39;) OR <br> de.degree_type LIKE (&#39;%Bachelor%&#39;) OR de.degree_type LIKE (&#39;JD%&#39;)  OR de.degree_type LIKE (&#39;Juris%&#39;) OR de.degree_type LIKE (&#39;Law%&#39;) OR de.degree_type LIKE (&#39;%Degree%&#39;))THEN &#39;Bachelors&#39;<br> WHEN <br> (de.degree_type LIKE (&#39;%M.%&#39;)OR de.degree_type LIKE (&#39;%Grad%&#39;) OR de.degree_type LIKE (&#39;%MBA%&#39;) OR de.degree_type LIKE (&#39;%MS%&#39;) OR de.degree_type LIKE (&#39;%MB%&#39;) OR de.degree_type LIKE (&#39;%Master%&#39;)) THEN &#39;Masters&#39; <br>    WHEN <br> (de.degree_type LIKE (&#39;%Ph%&#39;)OR de.degree_type LIKE (&#39;%Phil%&#39;) OR de.degree_type LIKE (&#39;%Doctor%&#39;)OR de.degree_type LIKE (&#39;D.%&#39;)) THEN &#39;Ph.D&#39;<br> WHEN <br> (de.degree_type LIKE (&#39;%Dip%&#39;)) THEN &#39;Diploma&#39;<br> ELSE &#39;Others&#39;<br> END) AS degree_type,<br>COUNT((CASE<br> WHEN <br> (de.degree_type LIKE (&#39;B%&#39;) OR de.degree_type LIKE (&#39;%BSc%&#39;) OR <br> de.degree_type LIKE (&#39;%Bachelor%&#39;) OR de.degree_type LIKE (&#39;JD%&#39;)  OR de.degree_type LIKE (&#39;Juris%&#39;) OR de.degree_type LIKE (&#39;Law%&#39;) OR de.degree_type LIKE (&#39;%Degree%&#39;))THEN &#39;Bachelors&#39;<br> WHEN <br> (de.degree_type LIKE (&#39;%M.%&#39;)OR de.degree_type LIKE (&#39;%Grad%&#39;) OR de.degree_type LIKE (&#39;%MBA%&#39;) OR de.degree_type LIKE (&#39;%MS%&#39;) OR de.degree_type LIKE (&#39;%MB%&#39;) OR de.degree_type LIKE (&#39;%Master%&#39;)) THEN &#39;Masters&#39; <br>    WHEN <br> (de.degree_type LIKE (&#39;%Ph%&#39;)OR de.degree_type LIKE (&#39;%Phil%&#39;) OR de.degree_type LIKE (&#39;%Doctor%&#39;)OR de.degree_type LIKE (&#39;D.%&#39;)) THEN &#39;Ph.D&#39;<br> WHEN <br> (de.degree_type LIKE (&#39;%Dip%&#39;)) THEN &#39;Diploma&#39;<br> ELSE &#39;Others&#39;<br> END)) AS no_of_founders,<br>SUM(ob.funding_total_usd) total_funding_generated,<br>SUM(ob.funding_rounds) AS no_of_funding_rounds,<br>SUM(ob.funding_total_usd)/NULLIF(COUNT((CASE<br> WHEN <br> (de.degree_type LIKE (&#39;B%&#39;) OR de.degree_type LIKE (&#39;%BSc%&#39;) OR <br> de.degree_type LIKE (&#39;%Bachelor%&#39;) OR de.degree_type LIKE (&#39;JD%&#39;)  OR de.degree_type LIKE (&#39;Juris%&#39;) OR de.degree_type LIKE (&#39;Law%&#39;) OR de.degree_type LIKE (&#39;%Degree%&#39;))THEN &#39;Bachelors&#39;<br> WHEN <br> (de.degree_type LIKE (&#39;%M.%&#39;)OR de.degree_type LIKE (&#39;%Grad%&#39;) OR de.degree_type LIKE (&#39;%MBA%&#39;) OR de.degree_type LIKE (&#39;%MS%&#39;) OR de.degree_type LIKE (&#39;%MB%&#39;) OR de.degree_type LIKE (&#39;%Master%&#39;)) THEN &#39;Masters&#39; <br>    WHEN <br> (de.degree_type LIKE (&#39;%Ph%&#39;)OR de.degree_type LIKE (&#39;%Phil%&#39;) OR de.degree_type LIKE (&#39;%Doctor%&#39;)OR de.degree_type LIKE (&#39;D.%&#39;)) THEN &#39;Ph.D&#39;<br> WHEN <br> (de.degree_type LIKE (&#39;%Dip%&#39;)) THEN &#39;Diploma&#39;<br> ELSE &#39;Others&#39;<br> END)),0) AS funding_per_degree<br>from degrees de<br>JOIN relationships re<br>ON de.object_id = re.person_object_id<br>JOIN objects ob<br>ON re.relationship_object_id =ob.object_id<br>WHERE re.title LIKE &#39;%Founder%&#39;<br>GROUP BY((CASE<br> WHEN <br> (de.degree_type LIKE (&#39;B%&#39;) OR de.degree_type LIKE (&#39;%BSc%&#39;) OR <br> de.degree_type LIKE (&#39;%Bachelor%&#39;) OR de.degree_type LIKE (&#39;JD%&#39;)  OR de.degree_type LIKE (&#39;Juris%&#39;) OR de.degree_type LIKE (&#39;Law%&#39;) OR de.degree_type LIKE (&#39;%Degree%&#39;))THEN &#39;Bachelors&#39;<br> WHEN <br> (de.degree_type LIKE (&#39;%M.%&#39;)OR de.degree_type LIKE (&#39;%Grad%&#39;) OR de.degree_type LIKE (&#39;%MBA%&#39;) OR de.degree_type LIKE (&#39;%MS%&#39;) OR de.degree_type LIKE (&#39;%MB%&#39;) OR de.degree_type LIKE (&#39;%Master%&#39;)) THEN &#39;Masters&#39; <br>    WHEN <br> (de.degree_type LIKE (&#39;%Ph%&#39;)OR de.degree_type LIKE (&#39;%Phil%&#39;) OR de.degree_type LIKE (&#39;%Doctor%&#39;)OR de.degree_type LIKE (&#39;D.%&#39;)) THEN &#39;Ph.D&#39;<br> WHEN <br> (de.degree_type LIKE (&#39;%Dip%&#39;)) THEN &#39;Diploma&#39;<br> ELSE &#39;Others&#39;<br> END))<br>ORDER BY degree_type;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/942/1*cnRuhRH5T0VSFAVbrhJ7rQ.png" /><figcaption><em>Qualifications impact on startup funding likelihood</em></figcaption></figure><p>The column chart established a relationship between the founder’s academic qualification and their likelihood to attract investments for their startups. The Result (average funding received per startup) saw Doctoral degree holders raise nearly double the amount attracted by both bachelor’s and master’s holders. Even though there seems to be a disparity between the average investment attracted by bachelor’s and master’s (with bachelors receiving more), the fact that diplomas attract the least average investment show that Founder’s qualification directly impacts their investment likelihood.</p><h3>Special Insights</h3><h4><strong>XI. Focus on Africa</strong></h4><p>African startups have made significant progress in recent years, driven by factors such as increasing access to technology, government support, and investment. Some of the areas where African startups have seen growth in Fintech, E-commerce, Agriculture, Healthcare, and Energy. Despite the progress, African startups still face challenges such as access to capital, regulatory barriers, and limited infrastructure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vzBXbvynAzl678_TuXaQKw.png" /><figcaption><a href="https://en.wikipedia.org/wiki/African_studies">This Photo</a> by Unknown Author is licensed under <a href="https://creativecommons.org/licenses/by-sa/3.0/">CC BY-SA</a></figcaption></figure><p>The Insight generated placed South Africa atop the list (Even bigger than the next five countries), but the biggest startup investment on the continent belongs to the EDITA FOOD INDUSTRY of Egypt. Closely followed by JUMIA of Nigeria. Unfortunately, none of the African companies have successfully gone public.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*u4Lg64eggPYjPtwRRle94A.png" /><figcaption><em>Africa’s top startups.</em></figcaption></figure><h4>XII. Top Universities</h4><p>Like the founder’s degree influence on the likelihood of a startup raising investment for its project, it is important to rank academic institutions according to their contribution to the creation and growth of innovation through the personnel that graduated from them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*UuV88GIC95ZwlR2IqlpGMg.png" /></figure><p>Of over Five Thousand Universities that produced over A hundred thousand Alumni working with startups, only A hundred and Forty-Four Institutions produced a startup founder. Shenzhen University is the only Non-American University in the top Ten with Harvard University Producing the most startup founders closely followed by Massachusetts Institute of Technology (MIT) and Stanford University.</p><h3>Data Visualization (Power BI)</h3><p>Creating a dashboard to visualize an overview of the insights for the historical progression of startups since the turn of the 20th century.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*5a3QkZj0QKAxKcDpNj-oxQ.png" /><figcaption>A Dashboard for Startup Overview</figcaption></figure><h3>Conclusions</h3><ol><li>Even though Innovation is as old as man, startup creation started gaining massive traction in the late 20th century,</li><li>Even though digital technology and IOT-focused startups accounted for half of the startups recorded, biotechnology and nanotechnology are more likely to raise funds,</li><li>Top startup destinations are top world economic powers,</li><li>Startup Founder’s academic qualification affects the ability to raise funds.</li><li>South Africa is Africa’s Innovation powerhouse.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2809716d867" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>