<?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 Oyeyinka olumayowa  on Medium]]></title>
        <description><![CDATA[Stories by Oyeyinka olumayowa  on Medium]]></description>
        <link>https://medium.com/@olumayowaoyeyinka?source=rss-27806ee6ff66------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*2D3eSnNmr-R1CWZF8Vzs7g.jpeg</url>
            <title>Stories by Oyeyinka olumayowa  on Medium</title>
            <link>https://medium.com/@olumayowaoyeyinka?source=rss-27806ee6ff66------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 16:32:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@olumayowaoyeyinka/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[Detective-SQL]]></title>
            <link>https://medium.com/@olumayowaoyeyinka/detective-sql-9f00405992bc?source=rss-27806ee6ff66------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f00405992bc</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[detective]]></category>
            <dc:creator><![CDATA[Oyeyinka olumayowa ]]></dc:creator>
            <pubDate>Tue, 08 Aug 2023 09:24:45 GMT</pubDate>
            <atom:updated>2023-08-08T09:24:45.807Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GbEZOxWO0sKAxRoV.jpg" /></figure><p><strong>Case Study</strong><br>A crime has taken place and the detective needs your help. The detective gave you the crime scene report, but you somehow lost it. You vaguely remember that the crime was a murder that occurred sometime on Jan.15, 2018 and that it took place in SQL City. Start by retrieving the corresponding crime scene report from the police department’s database.<br><strong>Data</strong><br>Follow these steps to solve this challenge:</p><p>Download the sql-murder-mystery.db file <a href="https://drive.google.com/drive/folders/1SLlSSzIqhu9m4p8HmoJYjn5X_GTYdDsf?usp=share_link">here</a><br>Visit <a href="http://www.sqliteonline.com/">www.sqliteonline.com</a><br>Click on file, then open db and load in the database file you downloaded above<br>Write your SQL queries to see the different tables and the content<br><strong>Tools</strong><br>SQLiteonline.com</p><p><strong>Entity Relationship Diagram</strong><br>Since We are analysing with SQL it is best that we know the relationship between our tables, and yes we can always generate that ourselves. I Published a document concerning that you can read up here</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/0*LGbVdNzcZ8j_vXzf.png" /></figure><p><strong>Analysis</strong><br>We need to note the some few things;<br>* Date was on Jan.15, 2018.<br>* Location was SQL City.</p><p>Firstly checking if the details exist in the database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/0*_RyrbaaxU7-MSgUy.png" /></figure><p>since it does i would love to know the description</p><p><em>Security footage shows that there were 2 witnesses. The first witness lives at the last house on “Northwestern Dr”. The second witness, named Annabel, lives somewhere on “Franklin Ave”.</em></p><p>So with this lead i need to get to the two witness <br>the first witness</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/0*77tZgLwK15-N1F14.png" /></figure><p>the second witness</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/685/0*262ocvytPPadO2nt.png" /></figure><p>the next thing i decided to do was to check the witnesses account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/755/0*48FN1niQjk5CVti_.png" /></figure><p>the first witness said</p><p><em>_I heard a gunshot and then saw a man run out. He had a “Get Fit Now Gym” bag. The membership number on the bag started with “48Z”. Only gold members have those bags. The man got into a car with a plate that included “H42W”._</em></p><p>Second said:</p><p><em>_I saw the murder happen, and I recognized the killer from my gym when I was working out last week on January the 9th._</em></p><p>Since they were both related to gym i decided to go futher to investigate the first witness account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/0*f_wRy6sq4YCjcs9l.png" /></figure><p>we are getting close to knowing who the murderer is but we can’t just nail him based on one witness when we have two let’s confirm if it mattches the other witness report</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/0*xf_haytAG5OZuY2Y.png" /></figure><p>so i need to check if the two witnessess account matches</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/614/0*ORmE8PBka5ebbcdy.png" /></figure><p>so finally we can say the killer if _**Jeremy Bowers**_</p><p>Never imagined this. He was already interviewed and he confessed to the Murder</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/0*uERSVvMgZXg37EAf.png" /></figure><p>Saying <br><em>_I was hired by a woman with a lot of money. I don’t know her name but I know she’s around 5&#39;5&quot; (65&quot;) or 5&#39;7&quot; (67&quot;). She has red hair and she drives a Tesla Model S. I know that she attended the SQL Symphony Concert 3 times in December 2017.</em><br>_</p><p>so we need to get the woman that hired Jeremy .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/0*4O4r239MyBn9_cHo.png" /></figure><p>While we already know the killer we now get to know the person that hired him was _**Miranda Priestly**_</p><p>and according to jeremy i decided to go futher to check hoe rich she was and lo and behold she was part of the top 50 Richest in SQL City to be precise she is the 47 richest person in the city.</p><p>If you’re able to follow along or like it here please do give a star and follow me on <a href="https://www.linkedin.com/in/olumayowa-oyeyinka-33ba29272/">Linkedin</a> ,<a href="https://github.com/iamasprout">Github</a> and <a href="https://twitter.com/oyeyinka_mayowa?t=6mlZ2rG0oDKErJW5LgNzHQ&amp;s=09">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f00405992bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Common SQL Function and Their Parameter]]></title>
            <link>https://medium.com/@olumayowaoyeyinka/common-sql-function-and-their-parameter-6f6f2e35a2e0?source=rss-27806ee6ff66------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f6f2e35a2e0</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Oyeyinka olumayowa ]]></dc:creator>
            <pubDate>Fri, 07 Jul 2023 13:17:00 GMT</pubDate>
            <atom:updated>2023-07-07T13:17:00.708Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/650/0*0s4uGGpMkSD-0o_V.jpeg" /></figure><blockquote>So recently I was battling with a particular task in sql for hours which would take me minutes to get in Excel, so i googled for the formula to use and even after that I was still not sure of what i need to input(parameters) unlike python that you use <strong><em>Shift+Tab</em></strong>. So this made me research functions in SQL and their parameters I hope this will be helpful to one or two persons.</blockquote><p><strong>Aggregate Functions:</strong></p><p>COUNT(column or * ) — Returns the number of rows in a specified column or the total number of rows in a table.</p><p>SUM(column) — Calculates the sum of values in a specified column.</p><p>AVG(column) — Calculates the average of values in a specified column.</p><p>MIN(column) — Returns the minimum value in a specified column.</p><p>MAX(column) — Returns the maximum value in a specified column.</p><p><strong>String Functions:</strong></p><p>CONCAT(string1, string2, …) — Concatenates two or more strings together.</p><p>SUBSTRING(string, start, length) — Extracts a substring from a string based on the starting position and length.</p><p>LENGTH(string) — Returns the length of a string.</p><p>UPPER(string) — Converts a string to uppercase.</p><p>LOWER(string) — Converts a string to lowercase.</p><p>TRIM(string) — Removes leading and trailing spaces from a string.</p><p>REPLACE(string, old_value, new_value) — Replaces occurrences of a substring within a string.</p><p>LEFT(string, length) — Extracts a specified number of characters from the left side of a string.</p><p>RIGHT(string, length) — Extracts a specified number of characters from the right side of a string.</p><p>INSTR(string, substring) — Returns the position of the first occurrence of a substring within a string.</p><p><strong>Date and Time Functions:</strong></p><p>GETDATE() — Returns the current date and time.</p><p>DATEPART(datepart, date) — Extracts a specific part (e.g., year, month, day) from a date or time.</p><p>DATEADD(datepart, number, date) — Adds or subtracts a specific interval to/from a date or time.</p><p>DATEDIFF(datepart, start_date, end_date) — Calculates the difference between two dates or times.</p><p>YEAR(date) — Returns the year from a date.</p><p>MONTH(date) — Returns the month from a date.</p><p>DAY(date) — Returns the day of the month from a date.</p><p>HOUR(date) — Returns the hour from a date.</p><p>MINUTE(date) — Returns the minute from a date.</p><p>SECOND(date) — Returns the second from a date.</p><p><strong>Numeric Functions:</strong></p><p>ROUND(number, decimals) — Rounds a number to a specified number of decimal places.</p><p>CEILING(number) — Returns the smallest integer greater than or equal to a specified number.</p><p>FLOOR(number) — Returns the largest integer less than or equal to a specified number.</p><p>ABS(number) — Returns the absolute value of a number.</p><p>POWER(number, exponent) — Raises a number to a specified power.</p><p>SQRT(number) — Returns the square root of a number.</p><p>RAND() — Generates a random number between 0 and 1.</p><p><strong>Conditional Functions:</strong></p><p>CASE WHEN condition THEN value ELSE value END — Allows conditional branching in a query.</p><p>COALESCE(expression1, expression2, …) — Returns the first non-null value in a list.</p><p>NULLIF(expression1, expression2) — Returns NULL if the two expressions are equal; otherwise, returns the first expression.</p><p>feel free to add yours.</p><p>you can connect with me on <a href="https://www.linkedin.com/in/olumayowa-oyeyinka-33ba29272">Linkedin</a> and <a href="https://twitter.com/oyeyinka_mayowa?t=6mlZ2rG0oDKErJW5LgNzHQ&amp;s=09">Twitter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f6f2e35a2e0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Generate an ER diagram for a Database in MySQL Workbench.]]></title>
            <link>https://medium.com/@olumayowaoyeyinka/how-to-generate-an-er-diagram-for-a-database-in-mysql-workbench-658c077bfef0?source=rss-27806ee6ff66------2</link>
            <guid isPermaLink="false">https://medium.com/p/658c077bfef0</guid>
            <category><![CDATA[er-diagram]]></category>
            <category><![CDATA[data-analyst]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[data-analytics-tools]]></category>
            <category><![CDATA[mysql]]></category>
            <dc:creator><![CDATA[Oyeyinka olumayowa ]]></dc:creator>
            <pubDate>Sat, 10 Jun 2023 14:45:12 GMT</pubDate>
            <atom:updated>2023-06-10T14:45:12.705Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="ER diagram of a database" src="https://cdn-images-1.medium.com/max/820/1*o895RHnS6OpciVY5pfkWZQ.png" /></figure><p>Firstly what is ER?</p><p>An entity-relationship (ER) diagram is a graphical representation of entities and their relationships to each other. It is commonly used in database design to help visualize the structure of a database. ER diagrams can be used to:</p><ul><li>Identify entities and their attributes</li><li>Define relationships between entities</li><li>Identify primary and foreign keys</li><li>Identify cardinality and modality of relationships</li></ul><ol><li>Ensure that a MySQL server is available and that both a Database and Tables have been established. I will utilize an employee database which consists of approximately 8 tables, as seen in the image.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/1*al6qOXFonxzOW-f-Ad9ZnA.png" /></figure><p>2. Click on <strong>Database</strong> and then <strong>Reverse Engineer. </strong>or <strong><em>CTRL+R</em></strong> : )</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*WXtWF-dKEVq6t2aG_3mURA.png" /></figure><p>3. Choose the connection that you have saved (to connect to your MySQL Server where the database is located) from the list provided. Afterwards, proceed by clicking the Next button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*ftbVRR7fwnIbjfumqfelOg.png" /></figure><p>4. Once the execution has been successfully completed, which includes establishing a connection to the DBMS, proceed by clicking on the Next button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/887/1*p8D4nR4W31QQZqxuzDs_7g.png" /></figure><p>5. Choose the MySQL Server database for which you wish to generate the ER Diagram (in this instance, it is named “Employees”), and then proceed by clicking on the Next button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*SOUJaDnO5m5MsRYAXQyywA.png" /></figure><p>6. Once the selected Database retrieval has been completed successfully, proceed to click on Next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*RQflQ3luwOnHPKBgwo0YZg.png" /></figure><p>7. Choose the tables from the database that you wish to display on the ER diagram (in this instance, I am opting to include all tables).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/1*d2KE9dKACMAIvAyq1io9Ow.png" /></figure><p>You can click on show Filter to see the table you have in the database, and then hit the “Execute” button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*cvUV7TJCsYM6w1G_mqTMog.png" /></figure><p>8. Once the Reverse Engineering Process has been completed, proceed to click on the Next button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/881/1*QxreBWBSTvCSirbFi-ZHwg.png" /></figure><p>Finally Click on the Finish button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/879/1*nS8PzhhLNzw34Qi8u6v5UQ.png" /></figure><p>And this is what we have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lZHwtZf4YDhUhG9Zf5EumQ.png" /></figure><p>With the image we have, it is possible to adjust the zoom level and rearrange tables by dragging them. Additionally, the background can be customized by adding a layer to the selected area.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7UXh21qH_XjPIuor7l2EMA.png" /></figure><p>and finally you can have this!!!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*o895RHnS6OpciVY5pfkWZQ.png" /></figure><p>Thank you for reading through.</p><p>Since you’re here you can follow me on <a href="https://www.linkedin.com/in/olumayowa-oyeyinka-33ba29272">Linkedin</a> and <a href="https://twitter.com/oyeyinka_mayowa?t=BeNSFW7Dy4VuRNenQ_tgcw&amp;s=09">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=658c077bfef0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LAYOFF ANALYSIS]]></title>
            <link>https://medium.com/@olumayowaoyeyinka/layoff-analysis-c1ef3c19bad3?source=rss-27806ee6ff66------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1ef3c19bad3</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-analysis]]></category>
            <dc:creator><![CDATA[Oyeyinka olumayowa ]]></dc:creator>
            <pubDate>Mon, 01 May 2023 16:06:37 GMT</pubDate>
            <atom:updated>2023-05-01T16:06:37.505Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently followed my “passion” as they say as a data analyst and it has been very adventurous and this is my first documentation. So in any case that I inserts anything wrongly pardon me.</p><blockquote>Shoutout to the data community on twitter <a href="https://medium.com/u/9e70fb997967">Tina Okonkwo</a> your journey in this space has inspired a lot of us me especially.</blockquote><p><em>Just wanted to give a quick shoutout to </em><a href="https://medium.com/@amitkr209">@amitkr209</a><a href="https://medium.com/@abolomopebiliqees"><em> </em></a><em>— his blog actually inspired me to write this one! If you’re interested, check out his blog on Medium.</em></p><p>The dataset is a CSV file obtained from Kaggle @<a href="https://www.kaggle.com/datasets/swaptr/layoffs-2022?resource=download">Layoffs Dataset | Kaggle</a> and includes layoffs of staffs across various industries from the year COVID-19 struck to the present.</p><p>The dataset consists of 9 columns:</p><p><em>Company’s name</em></p><p><em>Location</em></p><p><em>Industry</em></p><p><em>Total laid off</em></p><p><em>Percentage laid off</em></p><p><em>Date</em></p><p><em>Stage (stage of funding)</em></p><p><em>Country and</em></p><p><em>Funds raised (funds raised by the company).</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ulXUi7M6dJn4qIGytpDK2g.png" /><figcaption>Messy Data</figcaption></figure><p><strong>DATA CLEANING PROCESS</strong></p><p>It is important to clean the data before analyzing it because it may contain unwanted entries, which can cause errors in your analysis.</p><p>So, when I began cleaning the data, and I converted the percentage-layoff column from decimal to, a percentage format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5l8gedo-3g9ZnqHPDm-3vQ.png" /><figcaption>Formatting into percentage</figcaption></figure><p>Firstly i made sure my data is in a table for better reference when calculating</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xUqPDUQW45vMX_46uS61ng.png" /></figure><p>To calculate the “total number of staff ” from the laid off column I added a new column. I also added an IF statement to turn all empty cells into 0 before rounding the values.</p><p>I inserted another column to calculate the “total number of staff after the layoff” to get an estimate of how many employees were still employed.</p><p>=FLOOR(IFERROR(IFNA([@[total_laid_off]],0)/[@[percentage_laid_off]],D2),1)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AP5vg09g1lgD51R0PcvfLQ.png" /></figure><p>So to get the number of staff that is remaining after the lay off, all that is needed to do is subtract (total laid off) from (total staff)</p><p>i went futher to extract the year and month. i just learned this.</p><p>For Year column<br>=YEAR(H2)</p><p>For Month column<br>=TEXT(H2, “MMM”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JOaWIgCyN05lUp7GUtl9pA.png" /></figure><p>Then I changed the data type for each column to its own.</p><p><strong>DATA ANALYSIS</strong></p><p>I conducted analysis on the dataset after converting my table into a pivot table, and I was able to provide answers to some of the following questions:</p><ul><li>The total layoff between 2020–2023</li><li>The layoff by Month</li><li>The companies that laid off their staff</li><li>The company with the highest fundraise</li><li>The stage with the highest fundraise and layoff</li><li>The industry with the highest fundraised</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/982/1*WXBPAVqQ2QlYuiVpwIb28w.png" /></figure><p><strong>The layoff by Month</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*u9FcEcH7Y5P3xbCPnQOoBg.png" /></figure><p><strong>The companies that laid off their staff</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/920/1*oR0Se1f8acCxI7v7jn8I7Q.png" /></figure><p><strong>The company with the highest fundraise</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*5nd8x1GcMVtMhSB7Fy0-oA.png" /></figure><p><strong>The stage with the highest fundraise and layoff</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*Qhz0rg4iZ-GPwuYXxHJPYg.png" /></figure><p><strong>The industry with the highest fundraised</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*OxKCuYh2_6Dr-pa1ZCL16g.png" /></figure><p><strong>DATA VISUALIZATION</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0NnfeKwoVcFfzRoxQK4rAw.png" /><figcaption>Beautiful isn’t it?</figcaption></figure><p>I would love to know if there’s a way i could have done it better.</p><p>connect with me on<a href="http://www.linkedin.com/in/olumayowa-oyeyinka-33ba29272"> Linkedin</a>, and on twitter <a href="https://twitter.com/oyeyinka_mayowa?t=6mlZ2rG0oDKErJW5LgNzHQ&amp;s=09">Twitter</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1ef3c19bad3" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>