<?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:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:googleplay="http://www.google.com/schemas/play-podcasts/1.0"><channel><title><![CDATA[novsto]]></title><description><![CDATA[Novsto displays my exploration into research, data analysis (mostly SQL, Python), levelheaded decision making, & forceful data visualizations (Python, Excel, Power BI, Tableau). But it's not just a portfolio- it's also a practice hub for other analysts! ]]></description><link>https://www.novsto.com</link><image><url>https://substackcdn.com/image/fetch/$s_!XJ02!,w_256,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09da10c6-8a16-4b59-ab57-57fa8985a482_1080x1080.png</url><title>novsto</title><link>https://www.novsto.com</link></image><generator>Substack</generator><lastBuildDate>Mon, 18 May 2026 04:27:11 GMT</lastBuildDate><atom:link href="https://www.novsto.com/feed" rel="self" type="application/rss+xml"/><copyright><![CDATA[Shahaf Rabi]]></copyright><language><![CDATA[en]]></language><webMaster><![CDATA[novsto@substack.com]]></webMaster><itunes:owner><itunes:email><![CDATA[novsto@substack.com]]></itunes:email><itunes:name><![CDATA[Shahaf Rabi]]></itunes:name></itunes:owner><itunes:author><![CDATA[Shahaf Rabi]]></itunes:author><googleplay:owner><![CDATA[novsto@substack.com]]></googleplay:owner><googleplay:email><![CDATA[novsto@substack.com]]></googleplay:email><googleplay:author><![CDATA[Shahaf Rabi]]></googleplay:author><itunes:block><![CDATA[Yes]]></itunes:block><item><title><![CDATA[e-letters marketplace case study]]></title><description><![CDATA[data analysis case study : 7 tables, much data. Improve your analytical, business, product, & critical thinking]]></description><link>https://www.novsto.com/p/e-letters-marketplace-case-study</link><guid isPermaLink="false">https://www.novsto.com/p/e-letters-marketplace-case-study</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Wed, 04 Dec 2024 16:16:54 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!2aJL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The objective of this case study is to provide an as-real-as-possible example for data analysts to hone their analytical thinking, business acumen, product sense, and critical reasoning skills.</p><p>Lots of data; 7 tables. Enjoy!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><h4><strong>background:</strong></h4><p>I host my portfolio on <a href="https://substack.com/">Substack</a>, a platform that acts as a marketplace for electronic newsletters. It&#8217;s a space where real money can be made for those willing to put in the <a href="https://fortune.com/2021/10/07/substack-writers-newsletters-how-much-money-do-they-make/">effort</a>, with exposure being the key to success. So there are clear incentives for some users to cheat the system. </p><p>This idea struck me as I browsed <a href="https://www.similarweb.com/website/substack.com/#overview">Substack</a>, curious about how they decided which publications to show/offer me. It became apparent that three factors played a role: keywords and categorical relevance, publication age, and subscriber count.</p><p>I confess&#8212;I have a bit of a criminal mind. This sparked the idea for a realistic analysis case study for data analysts working at a similar marketplace. Rest assured, all the data here is fictional and purely for practice&#8212;no accusations, no harm, just fun and an opportunity to learn.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share novsto&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share novsto</span></a></p><h4><strong>2 options:</strong></h4><p>In here, you&#8217;ll get the chance to analyze data. You can either:</p><ol><li><p>Dive right in with 3 focused tasks to solve the case directly.</p></li><li><p>Opt for a more gradual approach, with thought-provoking questions to build your business, product, and critical thinking skills, along with analysis and visualization tasks to explore and practice further.</p></li></ol><p>The choice is yours. </p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/e-letters-marketplace-case-study?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/e-letters-marketplace-case-study?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div><hr></div><h3><strong>the data</strong></h3><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2aJL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2aJL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png 424w, https://substackcdn.com/image/fetch/$s_!2aJL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png 848w, https://substackcdn.com/image/fetch/$s_!2aJL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png 1272w, https://substackcdn.com/image/fetch/$s_!2aJL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2aJL!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png" width="1200" height="382.85714285714283" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:402,&quot;width&quot;:1260,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:32847,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2aJL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png 424w, https://substackcdn.com/image/fetch/$s_!2aJL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png 848w, https://substackcdn.com/image/fetch/$s_!2aJL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png 1272w, https://substackcdn.com/image/fetch/$s_!2aJL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ca78d9f-0cb1-44aa-bf98-3aea806ad81f_1260x402.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><ul><li><p>Table Name: <strong>USERS</strong><br>General idea: table with all users and when they created their user.<br>Granularity: one record per userID.</p></li><li><p>Table Name: <strong>USERPUBLICATIONS</strong><br>General idea: table connecting between users and their publications.<br>Granularity: each user may have more than one publication.</p></li><li><p>Table Name: <strong>PUBLICATIONS</strong><br>General idea: table with all publications, when they were created, deletion datetime if applicable.<br>Granularity: one record per publicationID.</p></li><li><p>Table Name: <strong>PUBLICATION_CATEGORIES</strong><br>General idea: label category assigned to describe each publication.<br>Granularity: one record per publicationID.</p></li><li><p>Table Name: <strong>POSTS</strong><br>General idea: one record of postID per publicationID, alongside other data related to the post.<br>Granularity: one record for every postID, per publicationID.</p></li><li><p>Table Name: <strong>EMAILED_POSTS_STATS</strong><br>General idea: Information concerning the emailed post which was published and then sent to subscribers.<br>Granularity: one record per postID as each postID can be sent/emailed only once.</p></li><li><p>Table Name: <strong>SUBSCRIBERS</strong><br>General idea: dimensional table which records per combination of subscriber and publicationID, details about the subscription.<br>Granularity: one record per registration of an email to a / per publicationID, noting time and type of subscriber.</p></li></ul><div><hr></div><ul><li><p>The <a href="https://drive.google.com/drive/folders/1JV3F7BbqMdEFP6r6ljo8cdgaRequqth7?usp=sharing">entire folder</a>. All data/documents available in that folder.</p></li></ul><pre><code>CREATE DATABASE eletters;
USE DATABASE eletters;</code></pre><ol><li><p><a href="https://drive.google.com/file/d/1EhSye00LssAbKrc1UshOHtGIacRW2xen/view?usp=sharing">create USERS table</a></p></li><li><p><a href="https://drive.google.com/file/d/1vnVSa7zWcqRBY6gOU0bqeueTNOILCzIj/view?usp=sharing">USERS table data (part 1 of 2)</a></p></li><li><p><a href="https://drive.google.com/file/d/1VibRWhf8kH5J7DMUvOPTS5Oo7a1smdMm/view?usp=sharing">USERS table data (part 2 of 2)</a></p></li><li><p><a href="https://drive.google.com/file/d/1xS0IKgxNDMMDxj3X4h048LPV44jrGDXP/view?usp=sharing">create USERPUBLICATIONS table &amp; load bulk</a></p></li><li><p><a href="https://drive.google.com/file/d/14KVfcKpEfkz81vRqZ_0goouu93GKjlu0/view?usp=sharing">USERPUBLICATIONS table data csv</a></p></li><li><p><a href="https://drive.google.com/file/d/1uXZu0RjnCW9rRPzngWdtgu7yI6ux40KV/view?usp=sharing">create PUBLICATIONS table &amp; bulk load</a></p></li><li><p><a href="https://drive.google.com/file/d/1oWva0UGPSZKo7m3Cw49hHxT625dxw1jf/view?usp=sharing">PUBLICATIONS data table csv</a></p></li><li><p><a href="https://drive.google.com/file/d/1OkTrH_SGwPEEN1SF-LYbwSbxHmso5mg8/view?usp=sharing">create PUBLICATION_CATEGORIES table &amp; bulk load</a></p></li><li><p><a href="https://drive.google.com/file/d/1vnEIZyjQEeZw1vtHFUrkFbknTscITk5S/view?usp=sharing">PUBLICATION_CATEGORIES data table csv</a></p></li><li><p><a href="https://drive.google.com/file/d/1OmreZ9EwAnpp5g3EhxR43Hxi-zBoA1YR/view?usp=sharing">create POSTS table</a></p></li><li><p><a href="https://drive.google.com/file/d/19FAE1hXIy8oRWNF1WQvIAK3CZ00DyXdC/view?usp=sharing">POSTS table data</a></p></li><li><p><a href="https://drive.google.com/file/d/1XM4onNvpWf6a6eim4726nN5JVwxyYs1u/view?usp=sharing">create EMAILED_POSTS_STATS table &amp; bulk load</a></p></li><li><p><a href="https://drive.google.com/file/d/1MOG_RuELrjzFzVLSqR88Ew9v7dA9EdaG/view?usp=sharing">EMAILED_POSTS_STATS data table csv</a></p></li><li><p><a href="https://drive.google.com/file/d/1s4aLhijif7gj5Zo2yk163tRyFNAcPtci/view?usp=sharing">create SUBSCRIBERS table &amp; bulk load</a></p></li><li><p><a href="https://drive.google.com/file/d/1V7MkmHQAP91wJyDDsIVGxsjw-IgkzhBh/view?usp=sharing">SUBSCRIBERS data table csv</a></p></li></ol><div><hr></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h1>THE SCENARIO</h1><p><em>Option #1: dive right in</em></p><p>Imagine it&#8217;s the start of your weekly planning session with your manager. You are given the following tasks to tackle:</p><h2>assist the Head of Marketing &amp; the Product team</h2><p>The Head of Marketing wants to launch a blog series about creating successful publications. This is in response to user requests. They want to appear on the company&#8217;s website/application among the top-20 recommended publications (details of how the company ranks them is described below). </p><p>Thus, the first focus will be on subscriber growth: </p><ul><li><p>Identify what characterizes some publications which attracted and grew their subscriber base more successfully compared to their peers.</p></li><li><p>Provide insights &amp; examples that the Head of Marketing and the company&#8217;s Content Writer can share.</p></li></ul><p>Not unrelated, you are requested, in parallel, to provide improvements to the ranking logic for the top-20 recommended publications. The Product team awaits your ideas.</p><ul><li><p>Review the current methodology for determining the top-20 publications.</p></li><li><p>Suggest modifications to the ranking system that will better align with the company&#8217;s goals.</p></li><li><p>Briefly explain the rationale behind your recommendations.</p></li></ul><h4>the company&#8217;s current ranking methodology for top-20 publications</h4><p>Here&#8217;s how the company currently determines the Top-20 Publications which it displays on its homepage both globally and per category:</p><ol><li><p>Eligibility Criteria:</p><ul><li><p>Publications must <strong>not be deleted</strong>.</p></li><li><p>Publications must be <strong>at least over 90 days old</strong>.</p></li><li><p>Publications must have at least one <strong>new post in the last 120 days</strong>.</p></li></ul></li><li><p>Ranking Logic:</p><ul><li><p>Publications are ranked primarily by their <strong>total number of subscribers</strong> as of the current date (feel free to assume the current date is 2021-07-01).</p></li><li><p>In case of a tie, the <strong>earliest-created user</strong> (publication-owner) is ranked higher.</p></li></ul></li></ol><h2>the CEO&#8217;s concerns for marketplace-integrity</h2><p>The CEO is concerned about fraudulent activity within the marketplace, which damages its reputation and revenue. Your task is to:</p><ul><li><p>Spot the cheater(s). Look for patterns that suggest abuse or cheating.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></p></li><li><p>Briefly explain what/how you identified and why it constitutes cheating.</p></li></ul><div><hr></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/e-letters-marketplace-case-study?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/e-letters-marketplace-case-study?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div><hr></div><h1>ADDITIONAL PRACTICE: ANALYSIS, VISUALIZATIONS, BUSINESS + PRODUCT + CRITICAL THINKING</h1><p><em>Option #2: Warm Up / Additional Practice</em></p><p>Lots of data, lots of tables, lots of fun. You have here all you need for plenty of practice. </p><p>The key to make the most out of it is not by just technically practicing SQL/Python etc. (though 100% important too), but to always examine each through the perspective of e.g. business / product angle. Think about the unique contribution, if any, to better understanding of the business, the product, of those engaged with it, and then, the actionable recommendations you may provide stakeholders as a data analyst.</p><p>Moreover, recall you may open a <a href="https://substack.com/sign-in">Substack</a> account yourself to better understand the product if you feel that you got questions you don&#8217;t have answers for.</p><p>Here are some ideas:</p><ol><li><p>Carefully review the <em>Publications</em> table. Identify the naming policy defect and craft the message how you&#8217;d report it.</p></li><li><p>Create a dashboard which provides visibility into:</p><ol><li><p>The total amount of users.</p></li><li><p>The total amount of publications.</p></li><li><p>The distribution of publications per publication category.</p></li><li><p>How many subscribers there are &amp; paid/free types.</p></li><li><p>The distribution of subscribers &amp; types per publication category.</p></li><li><p>How many email-posts were sent.</p></li></ol></li><li><p>Calculate and populate the open_rate (emailed_posts_stats table).</p><ol><li><p>Create a dashboard enabling to select a specific publication and compare its stats with the average of its peers (i.e. overall average and average of the publication category of the selected publication).</p></li></ol></li><li><p>Who are the top 5% of users with the most subscribers? Free/Paid subscribers?</p></li><li><p>Are there publication categories which show more engagement (e.g. likes, comments, shares) by their readership compared to others?</p></li><li><p>Create a View for the current top-20 publications ranking system: global_rank, category_rank, publication_name, publicationID, publication_category (precise details of the company&#8217;s current methodology is in <em>Option #1</em> above).</p></li><li><p>Ask yourself how the company generates revenue. Find out how <a href="https://substack.com/">Substack</a> does it. For example, do the publishers pay it to host their e-newsletters (is it pay per X hosting-time, per post, et cetera), does it make money by collecting a fee off payments of paid subscribers or through online advertisements? And so on. </p></li><li><p>Conduct various cohorts tracking metrics &amp; create visualizations / dashboards:</p><ol><li><p>e.g. see tracking publication cohorts and their posting engagement:</p><div class="digest-post-embed" data-attrs="{&quot;nodeId&quot;:&quot;e3ec4c91-33ec-4953-b4b7-62def0a01feb&quot;,&quot;caption&quot;:&quot;Analysts often face criticism for ignoring cost-efficiency, opting for more compute power instead of better solutions. Although there are valid reasons for this, it&#8217;s time to rethink how we handle large datasets, especially with JSON data stored inside engines designed for tabular data.&quot;,&quot;cta&quot;:null,&quot;showBylines&quot;:true,&quot;size&quot;:&quot;sm&quot;,&quot;isEditorNode&quot;:true,&quot;title&quot;:&quot;Point In Time Metadata&quot;,&quot;publishedBylines&quot;:[{&quot;id&quot;:14917183,&quot;name&quot;:&quot;Shahaf Rabi&quot;,&quot;bio&quot;:&quot;Research Data Analyst | Intersection of Data, Product, Decision Making, Innovation &amp; Strategy.&quot;,&quot;photo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F2581c42f-bcbe-441b-b2c9-3f55fae0e750_48x48.png&quot;,&quot;is_guest&quot;:false,&quot;bestseller_tier&quot;:null}],&quot;post_date&quot;:&quot;2024-11-26T16:10:31.139Z&quot;,&quot;cover_image&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png&quot;,&quot;cover_image_alt&quot;:null,&quot;canonical_url&quot;:&quot;https://www.novsto.com/p/point-in-time-metadata&quot;,&quot;section_name&quot;:null,&quot;video_upload_id&quot;:null,&quot;id&quot;:138408753,&quot;type&quot;:&quot;newsletter&quot;,&quot;reaction_count&quot;:0,&quot;comment_count&quot;:0,&quot;publication_id&quot;:null,&quot;publication_name&quot;:&quot;novsto&quot;,&quot;publication_logo_url&quot;:&quot;https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09da10c6-8a16-4b59-ab57-57fa8985a482_1080x1080.png&quot;,&quot;belowTheFold&quot;:true,&quot;youtube_url&quot;:null,&quot;show_links&quot;:null,&quot;feed_url&quot;:null}"></div></li><li><p>track categories&#8217; posting/subscriber(free/paid) etc. trends over time.</p></li><li><p>track the engagement metric rates (likes, shares, comments) for posts cohorts. Add filtering per selected publication category to the dashboard.</p></li></ol></li><li><p>Track the views:subscribers ratio for publications&#8217; posts. Does it help you deduce any useful insights about the users&#8217; ability to convert viewers into subscribers?</p></li><li><p>Review the <em>Subscribers, Posts, Users, </em>etc<em>.</em> tables. Explain what you would improve and why (It&#8217;s key to explain why it matters). Think tracking processes, changes. </p></li><li><p>Re-read the description of the <em>Posts</em>, <em>Emailed_Posts_Stats</em>, and <em>Subscribers</em> tables, paying close attention to the fields <code>posts.new_free/paid_subscribers</code> and <code>emailed_posts_stats.recipients_number</code>. Identify any gaps in how the data is being tracked.</p><p>Use SQL to validate your hypothesis about the gap and craft a concise report to share with the data team. In your report:</p><ol><li><p>Clearly state the identified gap.</p></li><li><p>Propose an engineering solution to address it.</p></li><li><p>Suggest a data recovery plan for cases where past data cannot be retrieved. Include your SQL code for the recovery process and specify the table where the recovered data should be stored.</p><ol><li><p>side-note: Remember- data and software systems are inherently flexible. Basically anything that has been created, modified, or tracked can be adjusted after the fact. For instance:</p><ol><li><p>A user or publication can be created or deleted.</p></li><li><p>Timestamps, such as "post_displayed_datetime," can theoretically be manipulated by users. e.g., to create the appearance of an older, "aged" publication for resale. Not a spoiler in this case ;) Though I thought about it ;)</p></li></ol></li></ol></li></ol></li><li><p>Examine the email domains and their respective types. Evaluate if there are insights worth reporting.</p></li><li><p>Evaluate correlations between different metrics. Remember that correlation does not necessarily mean causation.</p></li><li><p>&#8230; <em>Feel free to drop further interesting ideas in the comments / drop me a message via</em> <a href="https://www.linkedin.com/in/shahaf-rabi/">LinkedIn</a>!</p></li></ol><div><hr></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/e-letters-marketplace-case-study?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/e-letters-marketplace-case-study?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share novsto&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share novsto</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><p></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>Once you find it, you can verify it easily in the raw data. It&#8217;ll eliminate any doubt you might have. You&#8217;ll know where to find that &#8216;golden evidence&#8217;. But worse case scenario, feel free to drop a comment or message via LinkedIn.</p></div></div>]]></content:encoded></item><item><title><![CDATA[Point In Time Metadata]]></title><description><![CDATA[a lesson learned as a Full Stack Product Analyst, unlocking performance and efficiency]]></description><link>https://www.novsto.com/p/point-in-time-metadata</link><guid isPermaLink="false">https://www.novsto.com/p/point-in-time-metadata</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Tue, 26 Nov 2024 16:10:31 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!i0WA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Analysts often face criticism for ignoring cost-efficiency, opting for more compute power instead of better solutions. Although there are valid reasons for this, it&#8217;s time to rethink how we handle large datasets, especially with JSON data stored inside engines designed for tabular data.</p><p>This is a lesson I learned as a Full Stack Product Analyst at Firefly.ai, where I was the Product Analyst, Data Product Manager and Data Engineer.</p><p><strong>Faster results mean more focus and better analysis.</strong></p><p>Here are two examples showcasing how to improve performance and cut costs without sacrificing data accuracy.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i0WA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i0WA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png 424w, https://substackcdn.com/image/fetch/$s_!i0WA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png 848w, https://substackcdn.com/image/fetch/$s_!i0WA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png 1272w, https://substackcdn.com/image/fetch/$s_!i0WA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i0WA!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png" width="1200" height="305.02793296089385" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:364,&quot;width&quot;:1432,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:37602,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!i0WA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png 424w, https://substackcdn.com/image/fetch/$s_!i0WA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png 848w, https://substackcdn.com/image/fetch/$s_!i0WA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png 1272w, https://substackcdn.com/image/fetch/$s_!i0WA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cc9e358-3de4-4028-bdcd-3d9718f3e3c8_1432x364.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/point-in-time-metadata?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/point-in-time-metadata?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.linkedin.com/in/shahaf-rabi/&quot;,&quot;text&quot;:&quot;Connect on LinkedIn&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.linkedin.com/in/shahaf-rabi/"><span>Connect on LinkedIn</span></a></p><div><hr></div><h1><strong>APPLICATION EVENT LOGS: <br>Optimizing Event Log Processing</strong></h1><p><strong>Scenario:</strong> You&#8217;re working with raw JSON data containing event logs. The goal is to transform this into a daily log of active users without vendor lock-in, ensuring cost-effective performance.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></p><p><strong>Challenges:</strong></p><ul><li><p>Large datasets (e.g., 10M+ rows).</p></li><li><p>Avoiding redundant re-processing of rows.</p></li><li><p>Avoiding vendor lock-in.</p></li></ul><p><strong>Solution:</strong></p><ul><li><p>Add a <strong>timestamp column</strong> to the raw table (MiRRor). Every new record automatically includes its creation timestamp.</p></li><li><p>Create a <strong>Point In Time (PIT) Metadata table</strong> (DIMensional) to store key processing details like the last processed date.</p></li></ul><p><strong>Benefits:</strong></p><ul><li><p>No need to re-compute MAX(DATE) for every query (from FACTual table).</p></li><li><p>Process only new rows added after the last run.</p></li><li><p>Significantly faster processing and reduced compute costs.</p></li></ul><p><strong>How the procedure works:</strong></p><ol><li><p>Use PIT Metadata to check the last processed date.</p></li><li><p>Compare it with the timestamp of new records.</p></li><li><p>Parse only the unprocessed rows into a structured table for analysis.</p></li></ol><p>Below, the process flow:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CZT1!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13033d08-5ce4-47bd-868b-708a9282b4b6_1074x591.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CZT1!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13033d08-5ce4-47bd-868b-708a9282b4b6_1074x591.png 424w, https://substackcdn.com/image/fetch/$s_!CZT1!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13033d08-5ce4-47bd-868b-708a9282b4b6_1074x591.png 848w, https://substackcdn.com/image/fetch/$s_!CZT1!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13033d08-5ce4-47bd-868b-708a9282b4b6_1074x591.png 1272w, https://substackcdn.com/image/fetch/$s_!CZT1!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13033d08-5ce4-47bd-868b-708a9282b4b6_1074x591.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CZT1!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13033d08-5ce4-47bd-868b-708a9282b4b6_1074x591.png" width="1200" height="660.3351955307263" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/13033d08-5ce4-47bd-868b-708a9282b4b6_1074x591.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:591,&quot;width&quot;:1074,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:44780,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CZT1!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13033d08-5ce4-47bd-868b-708a9282b4b6_1074x591.png 424w, https://substackcdn.com/image/fetch/$s_!CZT1!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13033d08-5ce4-47bd-868b-708a9282b4b6_1074x591.png 848w, https://substackcdn.com/image/fetch/$s_!CZT1!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13033d08-5ce4-47bd-868b-708a9282b4b6_1074x591.png 1272w, https://substackcdn.com/image/fetch/$s_!CZT1!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F13033d08-5ce4-47bd-868b-708a9282b4b6_1074x591.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Illustrating further, and enabling anyone to test and compare efficiency, follow the process below:</p><pre><code>CREATE DATABASE PIT_METADATA;
USE DATABASE PIT_METADATA;</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://drive.google.com/drive/folders/1hM6AyMQOCHmqgfyqGJQuqBf0P860kGUi?usp=sharing&quot;,&quot;text&quot;:&quot;download the dataset&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://drive.google.com/drive/folders/1hM6AyMQOCHmqgfyqGJQuqBf0P860kGUi?usp=sharing"><span>download the dataset</span></a></p><pre><code>CREATE TABLE PIT_METADATA.dbo.application_event_logs (event_logs NVARCHAR(MAX));

--loading 5 million out of total: 10,104,419 rows (event logs)
---LOAD CSV 
BULK INSERT PIT_METADATA.dbo.application_event_logs
FROM 'C:\Users\userName\Desktop\Documents\novsto\<strong>first_batch_(5m_event_logs).csv</strong>'
WITH (
FORMAT='CSV',
FIRSTROW=0
);</code></pre><pre><code>ALTER TABLE PIT_METADATA.dbo.application_event_logs
ADD TS_MS DATETIME2 NULL;

-- Add a DEFAULT constraint to insert the current system datetime for new rows
ALTER TABLE PIT_METADATA.dbo.application_event_logs
ADD CONSTRAINT DF_TS_MS_DEFAULT
DEFAULT (SYSDATETIME()) FOR TS_MS;
</code></pre><pre><code>CREATE TABLE PIT_METADATA.dbo.application_event_logs_staging (event_logs NVARCHAR(MAX));

--loading remaining 5mln 104,410
BULK INSERT PIT_METADATA.dbo.application_event_logs_staging
FROM 'C:\Users\userName\Desktop\Documents\novsto\<strong>second_batch_(5_1m_event_logs).csv</strong>'
WITH (
    FORMAT = 'CSV',
    FIRSTROW = 1,
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\n'
);</code></pre><pre><code>INSERT INTO PIT_METADATA.dbo.application_event_logs (event_logs)
SELECT event_logs
FROM PIT_METADATA.dbo.application_event_logs_staging;

DROP TABLE PIT_METADATA.dbo.application_event_logs_staging;</code></pre><div><hr></div><h1><strong>DYNAMIC COHORT POSTING ANALYSIS</strong></h1><p><strong>Scenario:</strong> For an e-newsletter platform (e.g., <a href="https://substack.com/">Substack</a>), you want to track monthly posting activity rates. The focus is on how user cohorts evolve over time, comparing their posting habits month-to-month.</p><p><strong>Challenges:</strong></p><ul><li><p>Dynamically handling growing data as new months are added.</p></li><li><p>Calculating accurate rates with no manual updates.</p></li></ul><p><strong>Solution:</strong></p><ul><li><p>Group users by cohorts (e.g., month of account creation).</p></li><li><p>Use a dynamic query to calculate monthly posting rates:</p><ul><li><p><strong>Current Month Posts &#247; Previous Month Posts</strong></p></li><li><p>Handle nulls and zero values to avoid errors.</p></li></ul></li><li><p>Save intermediate results in the PIT Metadata table for reuse.</p></li><li><p>(not in this post: save rates calculations for closed months).</p></li></ul><p><strong>Benefits:</strong></p><ul><li><p>No need to rebuild the entire dataset every time.</p></li><li><p>Scales efficiently with growing data.</p></li><li><p>Provides clear insights into user engagement trends.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!7l0l!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3f951e3-b337-40af-b106-5fdc95ebc719_1123x453.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!7l0l!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3f951e3-b337-40af-b106-5fdc95ebc719_1123x453.png 424w, https://substackcdn.com/image/fetch/$s_!7l0l!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3f951e3-b337-40af-b106-5fdc95ebc719_1123x453.png 848w, https://substackcdn.com/image/fetch/$s_!7l0l!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3f951e3-b337-40af-b106-5fdc95ebc719_1123x453.png 1272w, https://substackcdn.com/image/fetch/$s_!7l0l!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3f951e3-b337-40af-b106-5fdc95ebc719_1123x453.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!7l0l!,w_2400,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3f951e3-b337-40af-b106-5fdc95ebc719_1123x453.png" width="1200" height="484.0605520926091" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b3f951e3-b337-40af-b106-5fdc95ebc719_1123x453.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;large&quot;,&quot;height&quot;:453,&quot;width&quot;:1123,&quot;resizeWidth&quot;:1200,&quot;bytes&quot;:32043,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-large" alt="" srcset="https://substackcdn.com/image/fetch/$s_!7l0l!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3f951e3-b337-40af-b106-5fdc95ebc719_1123x453.png 424w, https://substackcdn.com/image/fetch/$s_!7l0l!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3f951e3-b337-40af-b106-5fdc95ebc719_1123x453.png 848w, https://substackcdn.com/image/fetch/$s_!7l0l!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3f951e3-b337-40af-b106-5fdc95ebc719_1123x453.png 1272w, https://substackcdn.com/image/fetch/$s_!7l0l!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb3f951e3-b337-40af-b106-5fdc95ebc719_1123x453.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>*of course that further formatting such as color-coding for trends is great for yourself and your stakeholders to grasp trends faster (e.g. see top image of this post).</p><pre><code>CREATE DATABASE eletters;
USE DATABASE eletters;</code></pre><pre><code>CREATE TABLE posts (
 publicationID&#9;NVARCHAR(35) NOT NULL,
 postID&#9;NVARCHAR(10) NOT NULL,
 createdAt DATETIME NOT NULL,
 post_title NVARCHAR(110),
 post_displayed_datetime DATETIME NOT NULL,
 views INT NOT NULL,
 new_free_subscribers INT NOT NULL,&#9;
 new_paid_subscribers INT NOT NULL,
 likes INT NOT NULL,
 shares INT NOT NULL,
 comment_counter INT NOT NULL
);

CREATE TABLE publications (
 publicationID NVARCHAR(35) NOT NULL,
 publication_createdDate DATE NOT NULL,
 publication_name NVARCHAR(50) NOT NULL,
 publication_deletedDate DATE
  );</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://drive.google.com/file/d/19FAE1hXIy8oRWNF1WQvIAK3CZ00DyXdC/view?usp=sharing&quot;,&quot;text&quot;:&quot;download Posts table data&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://drive.google.com/file/d/19FAE1hXIy8oRWNF1WQvIAK3CZ00DyXdC/view?usp=sharing"><span>download Posts table data</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://drive.google.com/file/d/1oWva0UGPSZKo7m3Cw49hHxT625dxw1jf/view?usp=sharing&quot;,&quot;text&quot;:&quot;download Publications table data&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://drive.google.com/file/d/1oWva0UGPSZKo7m3Cw49hHxT625dxw1jf/view?usp=sharing"><span>download Publications table data</span></a></p><p>The code below generates all of the output shown above. It calculates it all from start to finish. It is more classic of what an analyst would usually do.</p><pre><code>CREATE OR ALTER PROCEDURE DYNAMIC_RATES AS
BEGIN
    -- step0: declaring variables
    DECLARE @PIVOT_POST_DATE VARCHAR(MAX);
    DECLARE @NULL_TERMINATOR VARCHAR(MAX);
    DECLARE @QUERY NVARCHAR(MAX);

    -- step1: creating distinct YYYY-MM posting date groups
-- step2: saving the posting dates into two kind of string variables:
------2.1: PIVOT POST DATE is for the PIVOT function
------2.2: NULL TERMINATOR is to eliminate nulls in the columns (see distinction in output: "0.00" vs. "0")
    WITH distinct_posting_dates AS (
        SELECT DISTINCT FORMAT(createdAt, 'yyyy-MM') AS POST_DATE
        FROM posts
    )
    SELECT @PIVOT_POST_DATE = STRING_AGG('[' + POST_DATE + ']', ',') WITHIN GROUP (ORDER BY POST_DATE ASC),
        @NULL_TERMINATOR = STRING_AGG(', COALESCE([' + POST_DATE + '], ''0'') AS [' + POST_DATE + ']', '') WITHIN GROUP (ORDER BY POST_DATE ASC)
    FROM distinct_posting_dates;

    -- step3: building the dynamic query.
-------- note how the rates are calculated: 
-------- ensuring fraction ( * 1.00), 
-------- NULLIF to eliminate division by zero errors
-------- COALESCE to handle post-NULLification
-------- Rounding, turning into string for then to truncate fraction length
    SET @QUERY = '
    WITH posts_posted AS (
        SELECT publicationID,
               FORMAT(createdAt, ''yyyy-MM'') AS post_date,
               COUNT(postID) AS posts_amount
        FROM posts
        GROUP BY publicationID, FORMAT(createdAt, ''yyyy-MM'')
    )
    SELECT COHORT ' + @NULL_TERMINATOR + '
    FROM (
        SELECT 
            FORMAT(publication_CreatedDate, ''yyyy-MM'') AS COHORT,
            post_date AS POST_DATE,
            LEFT(
             CAST(
              ROUND(
               COALESCE(
                SUM(posts_amount) * 1.00
                  /
                NULLIF(
                 LAG(SUM(posts_amount)) OVER (
       PARTITION BY FORMAT(publication_CreatedDate, ''yyyy-MM'')
       ORDER BY FORMAT(publication_CreatedDate, ''yyyy-MM'')
             ), 0), 0), 2) AS VARCHAR(20)), 4
            ) AS POSTING_RATE
        FROM publications
        JOIN posts_posted
            ON publications.publicationID = posts_posted.publicationID
        GROUP BY FORMAT(publication_CreatedDate, ''yyyy-MM''), post_date
    ) AS sourceTable
    PIVOT (
        MAX(POSTING_RATE)
        FOR POST_DATE IN (' + @PIVOT_POST_DATE + ')
    ) AS pivoted_table
    ORDER BY COHORT ASC;
    ';

    -- step3: execute the dynamic query
    EXEC sp_executesql @QUERY;
END;</code></pre><pre><code>EXEC DYNAMIC_RATES;</code></pre><p>This current one exemplifies that the PIT_METADATA table can be leveraged in another way compared to the first example. See the code below:</p><pre><code>--create the table
CREATE TABLE eletters.dbo.PIT_METADATA (
&#9;UDF_NAME NVARCHAR(1000),
&#9;TABLE_NAME NVARCHAR(1000),
&#9;VARIABLE_NAME NVARCHAR(1000),
&#9;STRING_VALUE NVARCHAR(MAX),
&#9;TIMESTAMP_VALUE DATETIME2(3),
&#9;DATE_VALUE DATE,
&#9;VALUE_LAST_UPDATED_AT DATETIME2(3)
&#9;)
;
--create temporary table
CREATE TABLE #temp_metadata (
    PIVOT_POST_DATE NVARCHAR(MAX),
    NULL_TERMINATOR NVARCHAR(MAX)
);</code></pre><pre><code>--populate the table
WITH distinct_posting_dates AS (
    SELECT DISTINCT FORMAT(createdAt, 'yyyy-MM') AS POST_DATE
    FROM posts
    WHERE createdAt &lt; '2021-06-01' --- so we can subsequently run and add the next date
)
-- Generate strings for both PIVOT_POST_DATE and NULL_TERMINATOR
INSERT INTO #temp_metadata (PIVOT_POST_DATE, NULL_TERMINATOR)
SELECT 
    STRING_AGG('[' + POST_DATE + ']', ',') WITHIN GROUP (ORDER BY POST_DATE ASC) AS PIVOT_POST_DATE,
    STRING_AGG(', COALESCE([' + POST_DATE + '], ''0'') AS [' + POST_DATE + ']', '') WITHIN GROUP (ORDER BY POST_DATE ASC) AS NULL_TERMINATOR
FROM distinct_posting_dates;</code></pre><pre><code>---insert values into PIT metadata
INSERT INTO eletters.dbo.PIT_METADATA (UDF_NAME, VARIABLE_NAME, STRING_VALUE, VALUE_LAST_UPDATED_AT)
SELECT 'DYNAMIC_RATES', 'PIVOT_POST_DATE', PIVOT_POST_DATE, '2021-05-30 10:10:10.111'
--SYSDATETIME() if it was in Production
FROM #temp_metadata;</code></pre><pre><code>INSERT INTO eletters.dbo.PIT_METADATA (UDF_NAME, VARIABLE_NAME, STRING_VALUE, VALUE_LAST_UPDATED_AT)
SELECT 'DYNAMIC_RATES', 'NULL_TERMINATOR', NULL_TERMINATOR, '2021-05-30 10:10:10.111'
--SYSDATETIME() if it was in Production
FROM #temp_metadata;</code></pre><pre><code>--drop the temporary table
DROP TABLE #temp_metadata;</code></pre><pre><code>CREATE OR ALTER PROCEDURE RECURRING_DYNAMIC_RATES AS
BEGIN
    --delcaring variables
    DECLARE @PIVOT_POST_DATE NVARCHAR(MAX);
    DECLARE @NULL_TERMINATOR NVARCHAR(MAX);
    DECLARE @QUERY NVARCHAR(MAX);
    DECLARE @LAST_UPDATED_AT DATETIME2(3);
--Current Date on Production should be SYSDATETIME(), i.e. not hardcoded like here.
    DECLARE @CURRENT_DATE DATETIME2(3) = CAST('2021-06-06 06:06:06.006' AS DATETIME2);

    --fetch metadata from PIT_METADATA table instead of re-computing it
    SELECT 
        @PIVOT_POST_DATE = STRING_VALUE,
        @LAST_UPDATED_AT = VALUE_LAST_UPDATED_AT
    FROM eletters.dbo.PIT_METADATA
    WHERE UDF_NAME = 'DYNAMIC_RATES'
      AND VARIABLE_NAME = 'PIVOT_POST_DATE';

    SELECT 
        @NULL_TERMINATOR = STRING_VALUE
    FROM eletters.dbo.PIT_METADATA
    WHERE UDF_NAME = 'DYNAMIC_RATES'
      AND VARIABLE_NAME = 'NULL_TERMINATOR';

    --check if metadata is outdated 
--(i.e. checks if need to update the strings because a new month started since last run)
    IF FORMAT(@CURRENT_DATE, 'yyyy-MM') &gt; FORMAT(@LAST_UPDATED_AT, 'yyyy-MM')
    BEGIN
        -- append only the new month
------PIVOT POST DATE is for the PIVOT function
------NULL TERMINATOR is to eliminate nulls in the columns (see distinction in output: "0.00" vs. "0")
        SELECT @PIVOT_POST_DATE = @PIVOT_POST_DATE + ',[' + FORMAT(@CURRENT_DATE, 'yyyy-MM') + ']',
               @NULL_TERMINATOR = @NULL_TERMINATOR + ', COALESCE([' + FORMAT(@CURRENT_DATE, 'yyyy-MM') + '], ''0'') AS [' + FORMAT(@CURRENT_DATE, 'yyyy-MM') + ']'
        ;

        --update the metadata in PIT_METADATA table
        UPDATE eletters.dbo.PIT_METADATA
        SET STRING_VALUE = @PIVOT_POST_DATE,
            VALUE_LAST_UPDATED_AT = @CURRENT_DATE
        WHERE UDF_NAME = 'DYNAMIC_RATES'
          AND VARIABLE_NAME = 'PIVOT_POST_DATE';

        UPDATE eletters.dbo.PIT_METADATA
        SET STRING_VALUE = @NULL_TERMINATOR,
            VALUE_LAST_UPDATED_AT = @CURRENT_DATE
        WHERE UDF_NAME = 'DYNAMIC_RATES'
          AND VARIABLE_NAME = 'NULL_TERMINATOR';
    END

    -- the dynamic query:
-------- note how the rates are calculated: 
-------- ensuring fraction ( * 1.00), 
-------- NULLIF to eliminate division by zero errors
-------- COALESCE to handle post-NULLification
-------- Rounding, turning into string for then to truncate fraction length
    SET @QUERY = '
    WITH posts_posted AS (
        SELECT publicationID,
               FORMAT(createdAt, ''yyyy-MM'') AS post_date,
               COUNT(postID) AS posts_amount
        FROM posts
        GROUP BY publicationID, FORMAT(createdAt, ''yyyy-MM'')
    )
    SELECT COHORT ' + @NULL_TERMINATOR + '
    FROM (
        SELECT 
            FORMAT(publication_CreatedDate, ''yyyy-MM'') AS COHORT,
            post_date AS POST_DATE,
            LEFT(
                CAST(
                    ROUND(
                        COALESCE(
                            SUM(posts_amount) * 1.00
                            / NULLIF(LAG(SUM(posts_amount)) OVER (
                                PARTITION BY FORMAT(publication_CreatedDate, ''yyyy-MM'')
                                ORDER BY FORMAT(publication_CreatedDate, ''yyyy-MM'')
                            ), 0), 0
                        ),
                        2
                    ) AS VARCHAR(20)
                ), 4
            ) AS POSTING_RATE
        FROM publications
        JOIN posts_posted
            ON publications.publicationID = posts_posted.publicationID
        GROUP BY FORMAT(publication_CreatedDate, ''yyyy-MM''), post_date
    ) AS sourceTable
    PIVOT (
        MAX(POSTING_RATE)
        FOR POST_DATE IN (' + @PIVOT_POST_DATE + ')
    ) AS pivoted_table
    ORDER BY COHORT ASC;
    ';

    -- execute the dynamic query
    EXEC sp_executesql @QUERY;
END;</code></pre><pre><code>EXEC RECURRING_DYNAMIC_RATES;</code></pre><p>Moreover, the saving of the rates-data itself isn&#8217;t addressed in this particular code example (though definitely worth it). Yet that&#8217;s definitely something you&#8217;d want to coordinate with your manager / data engineers.</p><div><hr></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/point-in-time-metadata?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/point-in-time-metadata?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.linkedin.com/in/shahaf-rabi/&quot;,&quot;text&quot;:&quot;Connect on LinkedIn&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.linkedin.com/in/shahaf-rabi/"><span>Connect on LinkedIn</span></a></p><h2>Key Takeaways:</h2><ul><li><p>Efficiency Matters: Streamlining processes saves time and costs, improving overall performance.</p></li><li><p>Leverage Metadata: PIT tables store reusable values, reducing redundant computations.</p></li><li><p>Think Dynamically: Design solutions that adapt to growing data without manual intervention.</p></li></ul><p>By applying these techniques, you&#8217;ll not only save costs but also make your workflows more scalable and future-proof. Start small, test often, and refine your approach. <strong>Efficiency is the key to unlocking better insights.</strong></p><p>That said, coordinate such efforts with your manager and the data engineering.</p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>Based on my experience in Snowflake with <a href="https://auth0.com/docs/deploy-monitor/logs/log-event-type-codes">Okta&#8217;s Auth0 data</a>.</p></div></div>]]></content:encoded></item><item><title><![CDATA[When to take a shower during war time]]></title><description><![CDATA[How I created a Tableau dashboard analyzing when rocket alarms are more and less likely to disturb people in Israel, using Pikud HaOref's data, Excel (JSON, Append) and Tableau for visualizations.]]></description><link>https://www.novsto.com/p/when-to-shower-during-war</link><guid isPermaLink="false">https://www.novsto.com/p/when-to-shower-during-war</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Mon, 30 Oct 2023 14:19:21 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The current ongoing October war-time in Israel can cause <strong>anxiety</strong> for some, like <strong>a</strong> <strong>kid living in the same building</strong> as I do. His parents told me he refuses to do the below example activities, in fear of alarms happening during that very same time. </p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ucSZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabed96c1-1534-4b6b-9a47-b3d527f23f41_43x45.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ucSZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabed96c1-1534-4b6b-9a47-b3d527f23f41_43x45.png 424w, https://substackcdn.com/image/fetch/$s_!ucSZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabed96c1-1534-4b6b-9a47-b3d527f23f41_43x45.png 848w, https://substackcdn.com/image/fetch/$s_!ucSZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabed96c1-1534-4b6b-9a47-b3d527f23f41_43x45.png 1272w, https://substackcdn.com/image/fetch/$s_!ucSZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabed96c1-1534-4b6b-9a47-b3d527f23f41_43x45.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ucSZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabed96c1-1534-4b6b-9a47-b3d527f23f41_43x45.png" width="43" height="45" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/abed96c1-1534-4b6b-9a47-b3d527f23f41_43x45.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:45,&quot;width&quot;:43,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:4025,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ucSZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabed96c1-1534-4b6b-9a47-b3d527f23f41_43x45.png 424w, https://substackcdn.com/image/fetch/$s_!ucSZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabed96c1-1534-4b6b-9a47-b3d527f23f41_43x45.png 848w, https://substackcdn.com/image/fetch/$s_!ucSZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabed96c1-1534-4b6b-9a47-b3d527f23f41_43x45.png 1272w, https://substackcdn.com/image/fetch/$s_!ucSZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fabed96c1-1534-4b6b-9a47-b3d527f23f41_43x45.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Bdnp!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc662fe7d-f6d0-405a-bb9f-d1ed4fdaf03b_35x30.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Bdnp!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc662fe7d-f6d0-405a-bb9f-d1ed4fdaf03b_35x30.png 424w, https://substackcdn.com/image/fetch/$s_!Bdnp!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc662fe7d-f6d0-405a-bb9f-d1ed4fdaf03b_35x30.png 848w, https://substackcdn.com/image/fetch/$s_!Bdnp!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc662fe7d-f6d0-405a-bb9f-d1ed4fdaf03b_35x30.png 1272w, https://substackcdn.com/image/fetch/$s_!Bdnp!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc662fe7d-f6d0-405a-bb9f-d1ed4fdaf03b_35x30.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Bdnp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc662fe7d-f6d0-405a-bb9f-d1ed4fdaf03b_35x30.png" width="47" height="40.285714285714285" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c662fe7d-f6d0-405a-bb9f-d1ed4fdaf03b_35x30.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:30,&quot;width&quot;:35,&quot;resizeWidth&quot;:47,&quot;bytes&quot;:1043,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Bdnp!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc662fe7d-f6d0-405a-bb9f-d1ed4fdaf03b_35x30.png 424w, https://substackcdn.com/image/fetch/$s_!Bdnp!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc662fe7d-f6d0-405a-bb9f-d1ed4fdaf03b_35x30.png 848w, https://substackcdn.com/image/fetch/$s_!Bdnp!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc662fe7d-f6d0-405a-bb9f-d1ed4fdaf03b_35x30.png 1272w, https://substackcdn.com/image/fetch/$s_!Bdnp!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc662fe7d-f6d0-405a-bb9f-d1ed4fdaf03b_35x30.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><p>We&#8217;ll try to convince him using data! </p><p>In this piece I briefly describe how I've created a <a href="https://public.tableau.com/app/profile/shahaf.rabi6246/viz/alarmsatIsrael/Dashboard1">Tableau dashboard</a> using alarms data of <a href="https://www.oref.org.il//">Pikud HaOref</a> to help people. </p><p>So find out when you are least/most likely to be disturbed by rocket alerts here:</p><pre><code><a href="https://public.tableau.com/views/alarmsatIsrael/Dashboard1?:language=en-US&amp;:display_count=n&amp;:origin=viz_share_link">https://public.tableau.com/views/alarmsatIsrael/Dashboard1?:language=en-US&amp;:display_count=n&amp;:origin=viz_share_link</a></code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!8xtL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!8xtL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png 424w, https://substackcdn.com/image/fetch/$s_!8xtL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png 848w, https://substackcdn.com/image/fetch/$s_!8xtL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png 1272w, https://substackcdn.com/image/fetch/$s_!8xtL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!8xtL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png" width="641" height="834" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:834,&quot;width&quot;:641,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:66104,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!8xtL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png 424w, https://substackcdn.com/image/fetch/$s_!8xtL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png 848w, https://substackcdn.com/image/fetch/$s_!8xtL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png 1272w, https://substackcdn.com/image/fetch/$s_!8xtL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5cd0c4c8-ccf1-4db7-b9cd-540d41e71101_641x834.png 1456w" sizes="100vw"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/when-to-shower-during-war?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/when-to-shower-during-war?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div><hr></div><h1>Getting the data</h1><p>The source of the data was <a href="https://www.oref.org.il">Pikud HaOref&#8217;s website</a>. So this data is official data.</p><p>Obtain the data effortlessly using this link, adjust the dates as you please, and save as JSON files:</p><pre><code>https://www.oref.org.il//Shared/Ajax/GetAlarmsHistory.aspx?lang=en&amp;fromDate=07.10.2023&amp;toDate=28.10.2023&amp;mode=0</code></pre><p>Note that the data is limited to 2,000 cases per calendar day, which is a possible weakness one has to pay attention to. In this case, it was not an issue since I had no plan to include the first day of the war (October 7th) as it represented an extreme day which was far from representing subsequent days of war-routine.</p><div><hr></div><h1>The Excel Part</h1><p>Load each JSON file, run it through the quick process of instructing Excel to re-organize/structure the data from JSON format to tabular data.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DGm8!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F036d79a9-b5b7-4562-92af-7f44de1778ce_684x447.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DGm8!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F036d79a9-b5b7-4562-92af-7f44de1778ce_684x447.png 424w, https://substackcdn.com/image/fetch/$s_!DGm8!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F036d79a9-b5b7-4562-92af-7f44de1778ce_684x447.png 848w, https://substackcdn.com/image/fetch/$s_!DGm8!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F036d79a9-b5b7-4562-92af-7f44de1778ce_684x447.png 1272w, https://substackcdn.com/image/fetch/$s_!DGm8!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F036d79a9-b5b7-4562-92af-7f44de1778ce_684x447.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DGm8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F036d79a9-b5b7-4562-92af-7f44de1778ce_684x447.png" width="366" height="239.18421052631578" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/036d79a9-b5b7-4562-92af-7f44de1778ce_684x447.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:447,&quot;width&quot;:684,&quot;resizeWidth&quot;:366,&quot;bytes&quot;:34620,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DGm8!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F036d79a9-b5b7-4562-92af-7f44de1778ce_684x447.png 424w, https://substackcdn.com/image/fetch/$s_!DGm8!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F036d79a9-b5b7-4562-92af-7f44de1778ce_684x447.png 848w, https://substackcdn.com/image/fetch/$s_!DGm8!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F036d79a9-b5b7-4562-92af-7f44de1778ce_684x447.png 1272w, https://substackcdn.com/image/fetch/$s_!DGm8!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F036d79a9-b5b7-4562-92af-7f44de1778ce_684x447.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pu3e!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f8d0338-d345-4d0f-8f47-2436f1fe2d14_78x127.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pu3e!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f8d0338-d345-4d0f-8f47-2436f1fe2d14_78x127.png 424w, https://substackcdn.com/image/fetch/$s_!pu3e!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f8d0338-d345-4d0f-8f47-2436f1fe2d14_78x127.png 848w, https://substackcdn.com/image/fetch/$s_!pu3e!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f8d0338-d345-4d0f-8f47-2436f1fe2d14_78x127.png 1272w, https://substackcdn.com/image/fetch/$s_!pu3e!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f8d0338-d345-4d0f-8f47-2436f1fe2d14_78x127.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pu3e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f8d0338-d345-4d0f-8f47-2436f1fe2d14_78x127.png" width="58" height="94.43589743589743" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0f8d0338-d345-4d0f-8f47-2436f1fe2d14_78x127.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:127,&quot;width&quot;:78,&quot;resizeWidth&quot;:58,&quot;bytes&quot;:2262,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pu3e!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f8d0338-d345-4d0f-8f47-2436f1fe2d14_78x127.png 424w, https://substackcdn.com/image/fetch/$s_!pu3e!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f8d0338-d345-4d0f-8f47-2436f1fe2d14_78x127.png 848w, https://substackcdn.com/image/fetch/$s_!pu3e!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f8d0338-d345-4d0f-8f47-2436f1fe2d14_78x127.png 1272w, https://substackcdn.com/image/fetch/$s_!pu3e!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f8d0338-d345-4d0f-8f47-2436f1fe2d14_78x127.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!sFiz!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F201a2a9a-1c56-405f-a417-6bd1e8bbe5a7_197x93.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!sFiz!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F201a2a9a-1c56-405f-a417-6bd1e8bbe5a7_197x93.png 424w, https://substackcdn.com/image/fetch/$s_!sFiz!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F201a2a9a-1c56-405f-a417-6bd1e8bbe5a7_197x93.png 848w, https://substackcdn.com/image/fetch/$s_!sFiz!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F201a2a9a-1c56-405f-a417-6bd1e8bbe5a7_197x93.png 1272w, https://substackcdn.com/image/fetch/$s_!sFiz!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F201a2a9a-1c56-405f-a417-6bd1e8bbe5a7_197x93.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!sFiz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F201a2a9a-1c56-405f-a417-6bd1e8bbe5a7_197x93.png" width="153" height="72.22842639593908" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/201a2a9a-1c56-405f-a417-6bd1e8bbe5a7_197x93.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:93,&quot;width&quot;:197,&quot;resizeWidth&quot;:153,&quot;bytes&quot;:3620,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!sFiz!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F201a2a9a-1c56-405f-a417-6bd1e8bbe5a7_197x93.png 424w, https://substackcdn.com/image/fetch/$s_!sFiz!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F201a2a9a-1c56-405f-a417-6bd1e8bbe5a7_197x93.png 848w, https://substackcdn.com/image/fetch/$s_!sFiz!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F201a2a9a-1c56-405f-a417-6bd1e8bbe5a7_197x93.png 1272w, https://substackcdn.com/image/fetch/$s_!sFiz!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F201a2a9a-1c56-405f-a417-6bd1e8bbe5a7_197x93.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CxNr!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb9403b7-0f1b-405a-b1d0-7ccd62e4284c_90x125.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CxNr!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb9403b7-0f1b-405a-b1d0-7ccd62e4284c_90x125.png 424w, https://substackcdn.com/image/fetch/$s_!CxNr!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb9403b7-0f1b-405a-b1d0-7ccd62e4284c_90x125.png 848w, https://substackcdn.com/image/fetch/$s_!CxNr!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb9403b7-0f1b-405a-b1d0-7ccd62e4284c_90x125.png 1272w, https://substackcdn.com/image/fetch/$s_!CxNr!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb9403b7-0f1b-405a-b1d0-7ccd62e4284c_90x125.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CxNr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb9403b7-0f1b-405a-b1d0-7ccd62e4284c_90x125.png" width="66" height="91.66666666666667" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cb9403b7-0f1b-405a-b1d0-7ccd62e4284c_90x125.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:125,&quot;width&quot;:90,&quot;resizeWidth&quot;:66,&quot;bytes&quot;:2991,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CxNr!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb9403b7-0f1b-405a-b1d0-7ccd62e4284c_90x125.png 424w, https://substackcdn.com/image/fetch/$s_!CxNr!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb9403b7-0f1b-405a-b1d0-7ccd62e4284c_90x125.png 848w, https://substackcdn.com/image/fetch/$s_!CxNr!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb9403b7-0f1b-405a-b1d0-7ccd62e4284c_90x125.png 1272w, https://substackcdn.com/image/fetch/$s_!CxNr!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcb9403b7-0f1b-405a-b1d0-7ccd62e4284c_90x125.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Iterate per JSON file that you have.</p><p>Time to Append the data (i.e. similar to UNION ALL in SQL).</p><p>*Please ensure you have the same amount of columns and in the same order. If you play around with it, you might not be able to properly append the data.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cV31!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65a7207a-982c-470a-bc19-1d2c754a7762_466x484.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cV31!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65a7207a-982c-470a-bc19-1d2c754a7762_466x484.png 424w, https://substackcdn.com/image/fetch/$s_!cV31!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65a7207a-982c-470a-bc19-1d2c754a7762_466x484.png 848w, https://substackcdn.com/image/fetch/$s_!cV31!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65a7207a-982c-470a-bc19-1d2c754a7762_466x484.png 1272w, https://substackcdn.com/image/fetch/$s_!cV31!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65a7207a-982c-470a-bc19-1d2c754a7762_466x484.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cV31!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65a7207a-982c-470a-bc19-1d2c754a7762_466x484.png" width="290" height="301.20171673819743" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/65a7207a-982c-470a-bc19-1d2c754a7762_466x484.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:484,&quot;width&quot;:466,&quot;resizeWidth&quot;:290,&quot;bytes&quot;:28540,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cV31!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65a7207a-982c-470a-bc19-1d2c754a7762_466x484.png 424w, https://substackcdn.com/image/fetch/$s_!cV31!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65a7207a-982c-470a-bc19-1d2c754a7762_466x484.png 848w, https://substackcdn.com/image/fetch/$s_!cV31!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65a7207a-982c-470a-bc19-1d2c754a7762_466x484.png 1272w, https://substackcdn.com/image/fetch/$s_!cV31!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F65a7207a-982c-470a-bc19-1d2c754a7762_466x484.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Alternatively, you may append the tables by &#8220;standing&#8221; on one of the fields in one of the data tables. Then do as in the image below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5BhT!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5b8ba88-8ff8-4468-8307-f25fd07757d7_1017x691.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5BhT!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5b8ba88-8ff8-4468-8307-f25fd07757d7_1017x691.png 424w, https://substackcdn.com/image/fetch/$s_!5BhT!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5b8ba88-8ff8-4468-8307-f25fd07757d7_1017x691.png 848w, https://substackcdn.com/image/fetch/$s_!5BhT!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5b8ba88-8ff8-4468-8307-f25fd07757d7_1017x691.png 1272w, https://substackcdn.com/image/fetch/$s_!5BhT!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5b8ba88-8ff8-4468-8307-f25fd07757d7_1017x691.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5BhT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5b8ba88-8ff8-4468-8307-f25fd07757d7_1017x691.png" width="598" height="406.3107177974435" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/d5b8ba88-8ff8-4468-8307-f25fd07757d7_1017x691.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:691,&quot;width&quot;:1017,&quot;resizeWidth&quot;:598,&quot;bytes&quot;:83488,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5BhT!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5b8ba88-8ff8-4468-8307-f25fd07757d7_1017x691.png 424w, https://substackcdn.com/image/fetch/$s_!5BhT!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5b8ba88-8ff8-4468-8307-f25fd07757d7_1017x691.png 848w, https://substackcdn.com/image/fetch/$s_!5BhT!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5b8ba88-8ff8-4468-8307-f25fd07757d7_1017x691.png 1272w, https://substackcdn.com/image/fetch/$s_!5BhT!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fd5b8ba88-8ff8-4468-8307-f25fd07757d7_1017x691.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now it as if we&#8217;ve stacked the data tables one of top of each other, similar to SQL Union All. But in SQL we&#8217;d use UNION to ensure we have unique rows only. Proceed as in the image below to remove duplicate rows:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zxFl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86677f0a-2703-4bda-906d-5c802f65e124_877x495.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zxFl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86677f0a-2703-4bda-906d-5c802f65e124_877x495.png 424w, https://substackcdn.com/image/fetch/$s_!zxFl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86677f0a-2703-4bda-906d-5c802f65e124_877x495.png 848w, https://substackcdn.com/image/fetch/$s_!zxFl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86677f0a-2703-4bda-906d-5c802f65e124_877x495.png 1272w, https://substackcdn.com/image/fetch/$s_!zxFl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86677f0a-2703-4bda-906d-5c802f65e124_877x495.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zxFl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86677f0a-2703-4bda-906d-5c802f65e124_877x495.png" width="580" height="327.3660205245154" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/86677f0a-2703-4bda-906d-5c802f65e124_877x495.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:495,&quot;width&quot;:877,&quot;resizeWidth&quot;:580,&quot;bytes&quot;:65104,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zxFl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86677f0a-2703-4bda-906d-5c802f65e124_877x495.png 424w, https://substackcdn.com/image/fetch/$s_!zxFl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86677f0a-2703-4bda-906d-5c802f65e124_877x495.png 848w, https://substackcdn.com/image/fetch/$s_!zxFl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86677f0a-2703-4bda-906d-5c802f65e124_877x495.png 1272w, https://substackcdn.com/image/fetch/$s_!zxFl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F86677f0a-2703-4bda-906d-5c802f65e124_877x495.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Now I merely recommend to assign the proper fields format per column in Excel, particularly if you are using the free version of Tableau.</p><div><hr></div><h1>The Tableau Part</h1><p>I explain how I handled key parts in Tableau to create this dashboard. Tableau is ever-evolving and it&#8217;s out of scope to teach it from scratch. <br>I recommend beginners to do a course and then practice with ChatGPT instructions instead of frustrating yourself/wasting time in figuring out how to do stuff.</p><ul><li><p>I chose which visualizations to use, choice of style, colors, et cetera, based on a summary of a book I&#8217;ve read (storytelling with data: a data visualization guide for business professionals). I recommend <a href="https://www.storytellingwithdata.com/blog">Cole Nussbaumer Knaflic&#8217;s website</a>. She even shares some Excel template files!</p></li></ul><h2>Filter</h2><p>Regardless if you work on the Tableau Desktop or via the browser, set the scope of the data, and ensure it is connected/linked or disconnected/not linked as appropriate in adjusting the dashboard, per visualization. </p><p>In this case, I needed all visualizations to be connected and have the same scope.</p><ul><li><p>Excluded October 7th data (extreme outlier).</p></li><li><p> Category Desc set only for &#8216;Missiles&#8217;.</p></li><li><p>Location to include all as-is. Adjustment to happen only on the dashboard itself.</p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!HmvH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e9c3a41-cb89-4413-9dec-c44248ae8b9e_785x497.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!HmvH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e9c3a41-cb89-4413-9dec-c44248ae8b9e_785x497.png 424w, https://substackcdn.com/image/fetch/$s_!HmvH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e9c3a41-cb89-4413-9dec-c44248ae8b9e_785x497.png 848w, https://substackcdn.com/image/fetch/$s_!HmvH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e9c3a41-cb89-4413-9dec-c44248ae8b9e_785x497.png 1272w, https://substackcdn.com/image/fetch/$s_!HmvH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e9c3a41-cb89-4413-9dec-c44248ae8b9e_785x497.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!HmvH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e9c3a41-cb89-4413-9dec-c44248ae8b9e_785x497.png" width="626" height="396.3337579617834" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6e9c3a41-cb89-4413-9dec-c44248ae8b9e_785x497.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:497,&quot;width&quot;:785,&quot;resizeWidth&quot;:626,&quot;bytes&quot;:67942,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!HmvH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e9c3a41-cb89-4413-9dec-c44248ae8b9e_785x497.png 424w, https://substackcdn.com/image/fetch/$s_!HmvH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e9c3a41-cb89-4413-9dec-c44248ae8b9e_785x497.png 848w, https://substackcdn.com/image/fetch/$s_!HmvH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e9c3a41-cb89-4413-9dec-c44248ae8b9e_785x497.png 1272w, https://substackcdn.com/image/fetch/$s_!HmvH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6e9c3a41-cb89-4413-9dec-c44248ae8b9e_785x497.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>Calculated Fields</h2><p><strong>(1) &#8220;5minIntervals&#8221;</strong>: Since Tableau&#8217;s CASE WHEN is different from what I&#8217;m used to, I opted for the following code in the calculated field:</p><pre><code>IF DATEPART('minute', [Alert Date]) &gt;= 0 
 AND DATEPART('minute', [Alert Date]) &lt; 5 THEN '00-04'
ELSEIF DATEPART('minute', [Alert Date]) &gt;= 5 
 AND DATEPART('minute', [Alert Date]) &lt; 10 THEN '05-09'
ELSEIF DATEPART('minute', [Alert Date]) &gt;= 10 
 AND DATEPART('minute', [Alert Date]) &lt; 15 THEN '10-14'
ELSEIF DATEPART('minute', [Alert Date]) &gt;= 15 
 AND DATEPART('minute', [Alert Date]) &lt; 20 THEN '15-19'
ELSEIF DATEPART('minute', [Alert Date]) &gt;= 20 
 AND DATEPART('minute', [Alert Date]) &lt; 25 THEN '20-24'
ELSEIF DATEPART('minute', [Alert Date]) &gt;= 25 
 AND DATEPART('minute', [Alert Date]) &lt; 30 THEN '25-29'
ELSEIF DATEPART('minute', [Alert Date]) &gt;= 30 
 AND DATEPART('minute', [Alert Date]) &lt; 35 THEN '30-34'
ELSEIF DATEPART('minute', [Alert Date]) &gt;= 35 
 AND DATEPART('minute', [Alert Date]) &lt; 40 THEN '35-39'
ELSEIF DATEPART('minute', [Alert Date]) &gt;= 40 
 AND DATEPART('minute', [Alert Date]) &lt; 45 THEN '40-44'
ELSEIF DATEPART('minute', [Alert Date]) &gt;= 45 
 AND DATEPART('minute', [Alert Date]) &lt; 50 THEN '45-49'
ELSEIF DATEPART('minute', [Alert Date]) &gt;= 50 
 AND DATEPART('minute', [Alert Date]) &lt; 55 THEN '50-54'
ELSE '55-59'
END</code></pre><p><strong>(2) Formatted Hour of Alert</strong>: (Hours alerts happened - &#1492;&#1513;&#1506;&#1493;&#1514; &#1489;&#1492;&#1503; &#1492;&#1497;&#1493; &#1488;&#1494;&#1506;&#1511;&#1493;&#1514;)</p><pre><code>STR(DATEPART('hour', [Alert Date])) + 
IF DATEPART('hour', [Alert Date]) &lt; 12 THEN " AM" ELSE " PM" END</code></pre><p><strong>(3) Choosing the right filter, showing legends, and choosing proper titles is key.</strong> <br>I&#8217;m not saying mine are perfect, but it&#8217;s always better to invest time into thinking about those stuff than cracking how to do something on your own instead of getting guidance from ChatGPT etc. Keep it in mind.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://public.tableau.com/views/alarmsatIsrael/Dashboard1?:language=en-US&amp;:display_count=n&amp;:origin=viz_share_link" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2Pyy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3ebde-ed51-47ef-b5ba-1e992ca6fa50_641x845.png 424w, https://substackcdn.com/image/fetch/$s_!2Pyy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3ebde-ed51-47ef-b5ba-1e992ca6fa50_641x845.png 848w, https://substackcdn.com/image/fetch/$s_!2Pyy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3ebde-ed51-47ef-b5ba-1e992ca6fa50_641x845.png 1272w, https://substackcdn.com/image/fetch/$s_!2Pyy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3ebde-ed51-47ef-b5ba-1e992ca6fa50_641x845.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2Pyy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3ebde-ed51-47ef-b5ba-1e992ca6fa50_641x845.png" width="423" height="557.6209048361934" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/56a3ebde-ed51-47ef-b5ba-1e992ca6fa50_641x845.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:845,&quot;width&quot;:641,&quot;resizeWidth&quot;:423,&quot;bytes&quot;:90603,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:&quot;https://public.tableau.com/views/alarmsatIsrael/Dashboard1?:language=en-US&amp;:display_count=n&amp;:origin=viz_share_link&quot;,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2Pyy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3ebde-ed51-47ef-b5ba-1e992ca6fa50_641x845.png 424w, https://substackcdn.com/image/fetch/$s_!2Pyy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3ebde-ed51-47ef-b5ba-1e992ca6fa50_641x845.png 848w, https://substackcdn.com/image/fetch/$s_!2Pyy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3ebde-ed51-47ef-b5ba-1e992ca6fa50_641x845.png 1272w, https://substackcdn.com/image/fetch/$s_!2Pyy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F56a3ebde-ed51-47ef-b5ba-1e992ca6fa50_641x845.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/when-to-shower-during-war?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/when-to-shower-during-war?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share novsto&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share novsto</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.linkedin.com/in/shahaf-rabi/&quot;,&quot;text&quot;:&quot;Feel free to connect via LinkedIn :)&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.linkedin.com/in/shahaf-rabi/"><span>Feel free to connect via LinkedIn :)</span></a></p><ul><li><p><a href="https://public.tableau.com/views/alarmsatIsrael/Dashboard1?:language=en-US&amp;:display_count=n&amp;:origin=viz_share_link">The dashboard</a></p></li><li><p>Please keep in mind that the terrorists may change their modus operandi and then the dashboard&#8217;s assessment would no longer be relevant.</p></li></ul>]]></content:encoded></item><item><title><![CDATA[Account Takeover: Fraud Series #1]]></title><description><![CDATA[Pattern Analysis; Bonus- SQL: DATEDIFF, TIME ZONE, LAG & more.]]></description><link>https://www.novsto.com/p/account-takeover-fraud-series-1</link><guid isPermaLink="false">https://www.novsto.com/p/account-takeover-fraud-series-1</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Mon, 16 Oct 2023 14:48:09 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F09da10c6-8a16-4b59-ab57-57fa8985a482_1080x1080.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>This one is for analysts preparing for interviews at the various fraud detection and prevention companies and roles, in which analysts are often examined concerning their approach to investigating a case study via data.</p><p><strong>Key points:</strong></p><ul><li><p><em>Approach the data analytically</em>. I recommend starting vertically (per variable/column), then horizontally (per row), and then looking at the entire story.</p></li><li><p><em>Be verbal</em>- Clarifications &amp; assumptions. Explain your methodology, thoughts. <br>It&#8217;s a good opportunity to show creativity and critical thinking skills.</p></li><li><p>The data itself is neither good nor bad- <em>Compose good and bad story/stories</em> per set of data. Then decide on your final answer if the account has been taken over or not, degree of confidence, et cetera (as the format may change per interviewer).</p></li><li><p><em>Think outside the box</em>- Consider what would you say in case you&#8217;d be asked, for example, &#8220;what other data/variables would&#8217;ve helped you assess the situation?&#8221;, <br>or &#8220;what manipulations/calculations to the existing data/variables would assist you in making a better assessment?&#8221;</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/account-takeover-fraud-series-1?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/account-takeover-fraud-series-1?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div><hr></div><p><em>Side note</em>: For an introduction to the world of fraud detection and prevention, I highly recommend the book of <a href="https://www.linkedin.com/in/gilit/">Gilit Saporta</a> and <a href="https://www.linkedin.com/in/shoshana-karin-maraney-26758736/">Shoshana Maraney</a>, &#8220;<a href="https://www.oreilly.com/library/view/practical-fraud-prevention/9781492093312/">Practical Fraud Prevention: Fraud and AML Analytics for FinTech and eCommerce Using SQL and Python</a>&#8221; (O&#8217;Reilly, 2022). The book also has a chapter dealing with the subject of Account Takeovers.</p><div><hr></div><p>Note that you can create for yourself additional practice sets precisely like I did here: <br>(1) I got data samples, (2) structured some scenarios to teach ChatGPT, and then (3) instructed it to generate new cases for me to practice. Make sure you instruct it to get creative in building a stories behind each case to facilitate better results.</p><div><hr></div><p>If done face to face, or given space to leave text, you may ask for clarifications / note  your assumptions. In this case, let&#8217;s say you may assume:</p><ul><li><p>All records refer to bank/financial institutions accounts.</p></li><li><p>All of the records start from the first login of the users to their accounts.</p></li><li><p>Each case is for one user, one account, and no account has more than one user.</p></li><li><p>LoginDateTime was localized (see <em>Bonus</em> part); format: MM/DD/YYYY HH:MM.</p></li></ul><div><hr></div><h4><strong>Case Study #1: Tina</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wmyi!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766d0e5e-ea78-413f-a2c4-66762d2ee147_1805x241.png" data-component-name="Image2ToDOM"><div class="image2-inset image2-full-screen"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wmyi!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766d0e5e-ea78-413f-a2c4-66762d2ee147_1805x241.png 424w, https://substackcdn.com/image/fetch/$s_!wmyi!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766d0e5e-ea78-413f-a2c4-66762d2ee147_1805x241.png 848w, https://substackcdn.com/image/fetch/$s_!wmyi!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766d0e5e-ea78-413f-a2c4-66762d2ee147_1805x241.png 1272w, https://substackcdn.com/image/fetch/$s_!wmyi!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766d0e5e-ea78-413f-a2c4-66762d2ee147_1805x241.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wmyi!,w_5760,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766d0e5e-ea78-413f-a2c4-66762d2ee147_1805x241.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/766d0e5e-ea78-413f-a2c4-66762d2ee147_1805x241.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;full&quot;,&quot;height&quot;:194,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:73103,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-fullscreen" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wmyi!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766d0e5e-ea78-413f-a2c4-66762d2ee147_1805x241.png 424w, https://substackcdn.com/image/fetch/$s_!wmyi!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766d0e5e-ea78-413f-a2c4-66762d2ee147_1805x241.png 848w, https://substackcdn.com/image/fetch/$s_!wmyi!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766d0e5e-ea78-413f-a2c4-66762d2ee147_1805x241.png 1272w, https://substackcdn.com/image/fetch/$s_!wmyi!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766d0e5e-ea78-413f-a2c4-66762d2ee147_1805x241.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p><div><hr></div><h4><strong>Case Study #2: Alice</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Tb2z!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af0579e-e660-412e-99ad-101d5b4df98a_1888x260.png" data-component-name="Image2ToDOM"><div class="image2-inset image2-full-screen"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Tb2z!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af0579e-e660-412e-99ad-101d5b4df98a_1888x260.png 424w, https://substackcdn.com/image/fetch/$s_!Tb2z!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af0579e-e660-412e-99ad-101d5b4df98a_1888x260.png 848w, https://substackcdn.com/image/fetch/$s_!Tb2z!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af0579e-e660-412e-99ad-101d5b4df98a_1888x260.png 1272w, https://substackcdn.com/image/fetch/$s_!Tb2z!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af0579e-e660-412e-99ad-101d5b4df98a_1888x260.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Tb2z!,w_5760,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af0579e-e660-412e-99ad-101d5b4df98a_1888x260.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1af0579e-e660-412e-99ad-101d5b4df98a_1888x260.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;full&quot;,&quot;height&quot;:201,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:67162,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-fullscreen" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Tb2z!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af0579e-e660-412e-99ad-101d5b4df98a_1888x260.png 424w, https://substackcdn.com/image/fetch/$s_!Tb2z!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af0579e-e660-412e-99ad-101d5b4df98a_1888x260.png 848w, https://substackcdn.com/image/fetch/$s_!Tb2z!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af0579e-e660-412e-99ad-101d5b4df98a_1888x260.png 1272w, https://substackcdn.com/image/fetch/$s_!Tb2z!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1af0579e-e660-412e-99ad-101d5b4df98a_1888x260.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p><div><hr></div><h4><strong>Case Study #3: Osher</strong></h4><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3eB5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca5643c-9536-4cc0-8324-e3affac4dc70_1887x202.png" data-component-name="Image2ToDOM"><div class="image2-inset image2-full-screen"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3eB5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca5643c-9536-4cc0-8324-e3affac4dc70_1887x202.png 424w, https://substackcdn.com/image/fetch/$s_!3eB5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca5643c-9536-4cc0-8324-e3affac4dc70_1887x202.png 848w, https://substackcdn.com/image/fetch/$s_!3eB5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca5643c-9536-4cc0-8324-e3affac4dc70_1887x202.png 1272w, https://substackcdn.com/image/fetch/$s_!3eB5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca5643c-9536-4cc0-8324-e3affac4dc70_1887x202.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3eB5!,w_5760,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca5643c-9536-4cc0-8324-e3affac4dc70_1887x202.png" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cca5643c-9536-4cc0-8324-e3affac4dc70_1887x202.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;full&quot;,&quot;height&quot;:156,&quot;width&quot;:1456,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:59321,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-fullscreen" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3eB5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca5643c-9536-4cc0-8324-e3affac4dc70_1887x202.png 424w, https://substackcdn.com/image/fetch/$s_!3eB5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca5643c-9536-4cc0-8324-e3affac4dc70_1887x202.png 848w, https://substackcdn.com/image/fetch/$s_!3eB5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca5643c-9536-4cc0-8324-e3affac4dc70_1887x202.png 1272w, https://substackcdn.com/image/fetch/$s_!3eB5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcca5643c-9536-4cc0-8324-e3affac4dc70_1887x202.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p><div><hr></div><h1><strong>My approach and some thoughts:</strong></h1><p>In general, I recommend - particularly when given to do it on Excel, paper, or white board - to start vertically, then horizontally, then entire case.</p><ul><li><p>Vertically: Understand the variables &amp; mark any unique part in the data itself <br>(e.g. the tiny change in user agent because later it&#8217;s easier to think, for instance, if a tiny change in user agent is possibly an upgrade of same device or different device, etc.).</p></li><li><p>Horizontally, row by row, begin seeing how the combination of the different variables connect with one another and what you can make of it. That&#8217;s a good time to think of manipulations/calculations with minimal biases and heuristics.</p></li><li><p>Evaluate the story as a whole to reach the final decision.</p></li></ul><div><hr></div><h3><strong>Case Study #1: Tina - </strong></h3><p>Bottom-line: Good story triumphed over bad story. </p><p></p><p>I imagined Tina traveled with her laptop (user agent showed it was the same device throughout the records), and the login pattern seemed consistent in terms of 1 login per day at around same time frame, except for when she enjoyed her vacation.</p><p></p><h3><strong>Case Study #2: Alice - </strong></h3><p>Bottom-line: Bad story triumphed over good story. Row 8 was when she had her details exposed (her device was probably hacked too), suspecting row 13 was the fraudster logged into her account to sniff around.</p><p></p><p>I imagined Alice owning two devices, iPhone and iPad, which she routinely used from the same place (always connection from the same place). </p><p>Her routine: daily account-check, aside from when she wanted to install the official application on a new device. She then seemed to first, log into her account via web, and only then used the direct link to get to download, install, and log into the bank&#8217;s official application that she used thereon.</p><p>The 7 days of the week was also an indicator worth keeping in mind when I realized I was looking at consecutive days. In Alice&#8217;s case, the logins&#8217; hour/time of the day had a pattern relevant to whether it was a work day or weekend. This was much easier to see and verify using SQL (though if such a test is on a white board or paper - just say it!).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TnCy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaf9e5f6-6d4e-4357-b8fb-063c14107893_244x247.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TnCy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaf9e5f6-6d4e-4357-b8fb-063c14107893_244x247.png 424w, https://substackcdn.com/image/fetch/$s_!TnCy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaf9e5f6-6d4e-4357-b8fb-063c14107893_244x247.png 848w, https://substackcdn.com/image/fetch/$s_!TnCy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaf9e5f6-6d4e-4357-b8fb-063c14107893_244x247.png 1272w, https://substackcdn.com/image/fetch/$s_!TnCy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaf9e5f6-6d4e-4357-b8fb-063c14107893_244x247.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TnCy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaf9e5f6-6d4e-4357-b8fb-063c14107893_244x247.png" width="244" height="247" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/daf9e5f6-6d4e-4357-b8fb-063c14107893_244x247.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:247,&quot;width&quot;:244,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:9092,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TnCy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaf9e5f6-6d4e-4357-b8fb-063c14107893_244x247.png 424w, https://substackcdn.com/image/fetch/$s_!TnCy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaf9e5f6-6d4e-4357-b8fb-063c14107893_244x247.png 848w, https://substackcdn.com/image/fetch/$s_!TnCy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaf9e5f6-6d4e-4357-b8fb-063c14107893_244x247.png 1272w, https://substackcdn.com/image/fetch/$s_!TnCy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdaf9e5f6-6d4e-4357-b8fb-063c14107893_244x247.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><pre><code>SELECT CASE WHEN DATENAME(DW,LoginDateTime) IN ('Saturday', 'Sunday') 
 THEN 'weekend'
 ELSE 'workday'
 END AS isWeekend
 , DATENAME(DW,LoginDateTime) AS [DayName]
 , FORMAT(LoginDateTime, 'HH:mm') AS [HourMinute]
 , *
FROM ATO
WHERE userID = 'N26'</code></pre><p>Note the &#8220;LastSiteVisited&#8221; on row 8 provided a strong indication that the fraudster used an <em>overlay</em> as the modus operandi. This cue helped interpret the rest of the data too.</p><p>Moreover,  I suspected row 13 was the fraudster logged into the account because it imitated Alice&#8217;s activity and data. But it didn&#8217;t fit in her routine: not using application once installed on device; 2nd login that day; hour would fit during the week (when account was compromised), not weekend. </p><p>Furthermore, while I believe faking device data is possible, I don&#8217;t think it&#8217;s possible to fake IP. To the best of my knowledge, it&#8217;d require access to the network. That was why I thought her device/network were hacked and not just the credentials stolen.</p><p></p><div><hr></div><h3><strong>Case Study #3: Osher - </strong></h3><p>Bottom-line: Good story triumphed over bad story. Always lean towards the good story unless the bad story overwhelmingly beats the good/plausible story. In short, no clear indication of ATO or strong suspicion of one.</p><p></p><p>Osher checked the account once per 3 days from a number of different devices (1 phone, 1 tablet, 3 computers). 3 computers made me imagine some high tech employee with his own personal computer, work computer and possibly old PC or spouse&#8217;s or so computer. Hybrid work. It may also mean one of the different locations and IPs result from logging in from the company office (likely earlier logins from his own house due to the variety of devices).</p><p>With the exception of two times, he usually logged in around lunch break. Yet I see no reason to suspect the deviation from this pattern when it was around the same location, pattern of 1 check per 3 days remained, same way to login, and device was not new.</p><p>Last login could have many good explanations as well (2nd office, change of apartment, change of ISP of same apartment, etc.).</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GAhP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F780f4e26-cf98-445d-8dc4-e8f1b53ca479_627x194.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GAhP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F780f4e26-cf98-445d-8dc4-e8f1b53ca479_627x194.png 424w, https://substackcdn.com/image/fetch/$s_!GAhP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F780f4e26-cf98-445d-8dc4-e8f1b53ca479_627x194.png 848w, https://substackcdn.com/image/fetch/$s_!GAhP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F780f4e26-cf98-445d-8dc4-e8f1b53ca479_627x194.png 1272w, https://substackcdn.com/image/fetch/$s_!GAhP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F780f4e26-cf98-445d-8dc4-e8f1b53ca479_627x194.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GAhP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F780f4e26-cf98-445d-8dc4-e8f1b53ca479_627x194.png" width="627" height="194" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/780f4e26-cf98-445d-8dc4-e8f1b53ca479_627x194.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:194,&quot;width&quot;:627,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:21005,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GAhP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F780f4e26-cf98-445d-8dc4-e8f1b53ca479_627x194.png 424w, https://substackcdn.com/image/fetch/$s_!GAhP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F780f4e26-cf98-445d-8dc4-e8f1b53ca479_627x194.png 848w, https://substackcdn.com/image/fetch/$s_!GAhP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F780f4e26-cf98-445d-8dc4-e8f1b53ca479_627x194.png 1272w, https://substackcdn.com/image/fetch/$s_!GAhP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F780f4e26-cf98-445d-8dc4-e8f1b53ca479_627x194.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><pre><code>SELECT userID
 , FORMAT(LoginDateTime, 'yyyy-MM-dd HH:mm') AS LoginDateTime
 , CASE WHEN DATENAME(DW,LoginDateTime) IN ('Friday', 'Saturday') 
  THEN 'weekend'
  ELSE 'workday'
  END AS isWeekend
 , DATENAME(DW,LoginDateTime) AS [DayName]
 , FORMAT(LoginDateTime, 'HH:mm') AS [HourMinute]
 , COALESCE(
   DATEDIFF(DAY, 
   LAG(LoginDateTime) OVER (ORDER BY LoginDateTime ASC)
   , LoginDateTime)
   ,0) AS DaysBetweenLogins
 , COALESCE(
   DATEDIFF(HOUR, 
   LAG(LoginDateTime) OVER (ORDER BY LoginDateTime)
   , LoginDateTime)
   ,0) AS HoursBetweenLogins
 , Device
 , DeviceGroup
 , Browser
 , OS
 , UserAgent
 , [IP]
 , ISP
 , CountryLevel
 , StateRegionLevel
 , CityLevel
 , LastSiteVisited
FROM ATO
WHERE userID = 'N31'</code></pre><p></p><p>Thinking outside of the box: What additional data could be useful here? Perhaps&#8230;</p><ul><li><p>VPN used- Boolean</p></li><li><p>Name of network connected from</p></li><li><p>Amount of time logged into the account (and calculate average)</p></li><li><p>Pages viewed inside account / number of pages viewed</p></li><li><p>Any &#8216;biometric-behavior&#8217; data of the user</p><p></p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p></p><div><hr></div><h2>Bonus</h2><p>Built in time zone converters are smarter and easier to use, and it is worth to know such options exist, particularly when trying to immerse yourself in the case, finding the anomaly and indicators someone other than the rightful owner accessed the account.</p><pre><code><strong>AT TIME ZONE</strong> is a feature in T-SQL that allows for the <strong>conversion of datetime values between different time zones</strong>. It automatically <strong>accounts for Daylight Saving Time</strong> adjustments based on the specified time zone and the date of the datetime value.

Use <strong>SELECT * FROM sys.time_zone_info</strong> to know the exact time zone names SQL Server uses.</code></pre><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AHXl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F749a9168-97e1-4d38-8ec8-6791cf1e28f1_529x628.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AHXl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F749a9168-97e1-4d38-8ec8-6791cf1e28f1_529x628.png 424w, https://substackcdn.com/image/fetch/$s_!AHXl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F749a9168-97e1-4d38-8ec8-6791cf1e28f1_529x628.png 848w, https://substackcdn.com/image/fetch/$s_!AHXl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F749a9168-97e1-4d38-8ec8-6791cf1e28f1_529x628.png 1272w, https://substackcdn.com/image/fetch/$s_!AHXl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F749a9168-97e1-4d38-8ec8-6791cf1e28f1_529x628.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AHXl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F749a9168-97e1-4d38-8ec8-6791cf1e28f1_529x628.png" width="529" height="628" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/749a9168-97e1-4d38-8ec8-6791cf1e28f1_529x628.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:628,&quot;width&quot;:529,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:68743,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AHXl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F749a9168-97e1-4d38-8ec8-6791cf1e28f1_529x628.png 424w, https://substackcdn.com/image/fetch/$s_!AHXl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F749a9168-97e1-4d38-8ec8-6791cf1e28f1_529x628.png 848w, https://substackcdn.com/image/fetch/$s_!AHXl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F749a9168-97e1-4d38-8ec8-6791cf1e28f1_529x628.png 1272w, https://substackcdn.com/image/fetch/$s_!AHXl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F749a9168-97e1-4d38-8ec8-6791cf1e28f1_529x628.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><pre><code>SELECT userID
, CountryLevel
, StateRegionLevel
, CASE 
-- Convert from Israel time zone to UTC
WHEN CountryLevel = 'Israel' THEN 
CONVERT(DATETIME, LoginDateTimeLocalized <strong>AT TIME ZONE</strong> 'Israel Standard Time' <strong>AT TIME ZONE</strong> 'UTC')
-- Convert from USA - California time zone to UTC
WHEN CountryLevel = 'USA' AND StateRegionLevel = 'California' THEN 
CONVERT(DATETIME, LoginDateTimeLocalized <strong>AT TIME ZONE</strong> 'Pacific Standard Time' <strong>AT TIME ZONE</strong> 'UTC')
-- Convert from USA - Hawaii time zone to UTC
WHEN CountryLevel = 'USA' AND StateRegionLevel = 'Hawaii' THEN 
CONVERT(DATETIME, LoginDateTimeLocalized <strong>AT TIME ZONE</strong> 'Hawaiian Standard Time' <strong>AT TIME ZONE</strong> 'UTC')
-- Convert from USA - Hawaii time zone to UTC
WHEN CountryLevel = 'USA' AND StateRegionLevel = 'Maryland' THEN 
CONVERT(DATETIME, LoginDateTimeLocalized <strong>AT TIME ZONE</strong> 'Eastern Standard Time' <strong>AT TIME ZONE</strong> 'UTC')
-- Add more conditions for other states/regions as needed
ELSE null -- Default behavior (quick indicator of missing combination)
END AS LoginDateTimeUTC
, LoginDateTimeLocalized
FROM step1</code></pre><p></p><div><hr></div><h5>Create ATO table &amp; case studies data</h5><p>If you want to run the SQL code on your own.</p><pre><code>CREATE TABLE ATO (
    userID NVARCHAR(50) NOT NULL,
    LoginDateTime DATETIME NOT NULL,
    Device NVARCHAR(100),
    DeviceGroup NVARCHAR(100),
    Browser NVARCHAR(100),
    OS NVARCHAR(100),
    UserAgent NVARCHAR(MAX),
    IP NVARCHAR(50),
    ISP NVARCHAR(100),
    CountryLevel NVARCHAR(100),
    StateRegionLevel NVARCHAR(100),
    CityLevel NVARCHAR(100),
    LastSiteVisited NVARCHAR(255)
);</code></pre><pre><code>-- Alice data
INSERT INTO ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/01/2021  18:30:00 PM', 'Apple iPhone', 'Smart Phone', 'Safari', 'iOS', 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', '203.0.113.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', 'https://www.google.com');
INSERT INTO alice_ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/01/2021  18:45:51 PM', 'Apple iPhone', 'Smart Phone', NULL, 'iOS', 'AppleApp_bankOfAmerica/23.10 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X)', '203.0.113.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', NULL);
INSERT INTO alice_ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/02/2021  14:01:11 PM', 'Apple iPhone', 'Smart Phone', NULL, 'iOS', 'AppleApp_bankOfAmerica/23.10 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X)', '203.0.113.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', NULL);
INSERT INTO alice_ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/03/2021  14:05:22 PM', 'Apple iPhone', 'Smart Phone', NULL, 'iOS', 'AppleApp_bankOfAmerica/23.10 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X)', '203.0.113.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', NULL);
INSERT INTO alice_ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/04/2021  18:12:34 PM', 'Apple iPhone', 'Smart Phone', NULL, 'iOS', 'AppleApp_bankOfAmerica/23.10 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X)', '203.0.113.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', NULL);
INSERT INTO alice_ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/05/2021  18:07:18 PM', 'Apple iPhone', 'Smart Phone', NULL, 'iOS', 'AppleApp_bankOfAmerica/23.10 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X)', '203.0.113.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', NULL);
INSERT INTO alice_ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/06/2021  18:40:18 PM', 'Apple iPad', 'Tablet and iPad', 'Chrome', 'iOS', 'Mozilla/5.0 (iPad; CPU OS 12_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/76.0.3809.81 Mobile/15E148 Safari/605.1', '203.0.113.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', 'https://www.bankofameri.ca/redirecter');
INSERT INTO alice_ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/06/2021  18:43:37 PM', 'Apple iPad', 'Tablet and iPad', NULL, 'iOS', 'AppleApp_bankOfAmerica/23.10 (iPad; CPU OS 12_3 like Mac OS X)', '203.0.113.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', NULL);
INSERT INTO alice_ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/07/2021  18:06:06 PM', 'Apple iPad', 'Tablet and iPad', NULL, 'iOS', 'AppleApp_bankOfAmerica/23.10 (iPad; CPU OS 12_3 like Mac OS X)', '203.0.113.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', NULL);
INSERT INTO alice_ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/08/2021  18:20:16 PM', 'Apple iPad', 'Tablet and iPad', NULL, 'iOS', 'AppleApp_bankOfAmerica/23.10 (iPad; CPU OS 12_3 like Mac OS X)', '203.0.113.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', NULL);
INSERT INTO alice_ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/09/2021  14:14:14 PM', 'Apple iPad', 'Tablet and iPad', NULL, 'iOS', 'AppleApp_bankOfAmerica/23.10 (iPad; CPU OS 12_3 like Mac OS X)', '203.0.113.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', NULL);
INSERT INTO alice_ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES ('N26', '10/09/2021  19:31:01 PM', 'Apple iPad', 'Tablet and iPad', 'Chrome', 'iOS', 'Mozilla/5.0 (iPad; CPU OS 12_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/76.0.3809.81 Mobile/15E148 Safari/605.1', '203.0.118.45', 'Verizon', 'USA', 'Maryland', 'Baltimore', 'https://www.google.com');</code></pre><pre><code>--- Osher data
INSERT INTO ATO (userID, LoginDateTime, Device, DeviceGroup, Browser, OS, UserAgent, IP, ISP, CountryLevel, StateRegionLevel, CityLevel, LastSiteVisited) VALUES 
('N31', '9/2/2023 13:27', 'iPhone', 'iPhone', 'Safari', 'iOS', 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', '212.143.19.183', 'Bezeq', 'Israel', 'Tel Aviv', 'Tel Aviv', 'https://www.google.com'),
('N31', '9/5/2023 14:24', 'Desktop', 'Desktop', 'Safari', 'Mac', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15', '212.143.19.183', 'Bezeq', 'Israel', 'Tel Aviv', 'Tel Aviv', 'https://www.google.com'),
('N31', '9/8/2023 13:16', 'Desktop', 'Desktop', 'Chrome', 'Windows', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36', '212.143.19.183', 'Bezeq', 'Israel', 'Tel Aviv', 'Tel Aviv', 'https://www.google.com'),
('N31', '9/11/2023 14:30', 'Samsung Galaxy Tab S4', 'Tablet', 'Other', 'Android', 'Mozilla/5.0 (Linux; Android 9; SM-T830 Build/PPR1.180610.011; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.89 Safari/537.36', '212.143.19.184', 'Bezeq', 'Israel', 'Tel Aviv', 'Tel Aviv', 'https://www.google.com'),
('N31', '9/14/2023 14:35', 'Desktop', 'Desktop', 'Safari', 'Mac', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15', '212.143.1.100', 'Bezeq', 'Israel', 'Tel Aviv', 'Tel Aviv', 'https://www.google.com'),
('N31', '9/17/2023 22:35', 'iPhone', 'iPhone', 'Safari', 'iOS', 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', '212.143.19.184', 'Bezeq', 'Israel', 'Tel Aviv', 'Tel Aviv', 'https://www.google.com'),
('N31', '9/20/2023 19:20', 'iPhone', 'iPhone', 'Safari', 'iOS', 'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1', '909.303.1.505', 'Cellcom', 'Israel', 'Tel Aviv', 'Ramat Gan', 'https://www.google.com'),
('N31', '9/23/2023 13:16', 'Desktop', 'Desktop', 'Safari', 'Mac', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15', '212.143.19.184', 'Bezeq', 'Israel', 'Tel Aviv', 'Tel Aviv', 'https://www.google.com'),
('N31', '9/26/2023 14:14', 'Desktop', 'Desktop', 'Safari', 'Mac', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.4 Safari/605.1.15', '909.303.17.777', 'Cellcom', 'Israel', 'Tel Aviv', 'Tel Aviv', 'https://www.google.com');</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/account-takeover-fraud-series-1?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/account-takeover-fraud-series-1?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share novsto&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share novsto</span></a></p>]]></content:encoded></item><item><title><![CDATA[The ultimate office space playlist: The data way]]></title><description><![CDATA[SQL: INTERSECT (and how UNION is different); Excel: Get data from JSON file]]></description><link>https://www.novsto.com/p/ultimate-office-space-playlist-data-sql</link><guid isPermaLink="false">https://www.novsto.com/p/ultimate-office-space-playlist-data-sql</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Tue, 12 Sep 2023 09:59:48 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/c5deb0bc-c70f-4b83-a4c9-1b18c6fc942d_494x297.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>TL;DR:</strong></p><ol><li><p><strong>Technically:</strong> </p><ol><li><p>Excel: Get Data From file &#8594; JSON</p></li><li><p>SQL: INTERSECT; REPLACE(); LOWER()</p></li></ol></li><li><p><strong>Story Summary:</strong> <br>December 2022, we experienced another round of layoffs at the startup I used to work in. Empty space. Sad atmosphere. We wanted to create a mutually loved playlist to be listened to for all of the remaining team members to sing along to. This meant for both, YouTube Music and Spotify users. <br>So I took it on myself to run a <a href="https://en.wikipedia.org/wiki/Minimum_viable_product">MVP</a> style project. I created the ultimate, the grooviest, of shared office space all-liked playlist! (well, with English bias&#8230;). Something quick and dirty to raise our spirits.<br>This is a re-creation of what I&#8217;ve done back then.</p></li></ol><div><hr></div><h4>Quick introduction to INTERSECT (and how it&#8217;s different to UNION)</h4><pre><code><strong>INTERSECT</strong> returns the <em>common records</em> that exist in both of the result sets produced by two or more SELECT queries. The resulting dataset <em>only includes unique rows that appear in the tables</em>, and the column structures must match.
Importantly, INTERSECT happens after the SELECT in terms of order of operations.

For example, if you have two tables listing songs liked by different employees, you can use INTERSECT to quickly find songs that are liked by both, helping you curate a mutual playlist for the office.

<strong>Let's clarify how INTERSECT is different to UNION:</strong>
UNION combines the result sets of two or more SELECT queries into a single result set, eliminating duplicate rows. <em>Unlike INTERSECT, which only returns rows common to each table, UNION returns all unique rows from both tables</em>.

For example, if you have two lists of songs names from different albums, using UNION would give you a single list containing all unique songs across both albums.</code></pre><p>Quick illustration for folks who need less abstract and more visualized example:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!2aS5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff06ecdc1-f487-4be0-851f-21b1108c0d06_401x271.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!2aS5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff06ecdc1-f487-4be0-851f-21b1108c0d06_401x271.png 424w, https://substackcdn.com/image/fetch/$s_!2aS5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff06ecdc1-f487-4be0-851f-21b1108c0d06_401x271.png 848w, https://substackcdn.com/image/fetch/$s_!2aS5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff06ecdc1-f487-4be0-851f-21b1108c0d06_401x271.png 1272w, https://substackcdn.com/image/fetch/$s_!2aS5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff06ecdc1-f487-4be0-851f-21b1108c0d06_401x271.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!2aS5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff06ecdc1-f487-4be0-851f-21b1108c0d06_401x271.png" width="401" height="271" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f06ecdc1-f487-4be0-851f-21b1108c0d06_401x271.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:271,&quot;width&quot;:401,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:15787,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!2aS5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff06ecdc1-f487-4be0-851f-21b1108c0d06_401x271.png 424w, https://substackcdn.com/image/fetch/$s_!2aS5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff06ecdc1-f487-4be0-851f-21b1108c0d06_401x271.png 848w, https://substackcdn.com/image/fetch/$s_!2aS5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff06ecdc1-f487-4be0-851f-21b1108c0d06_401x271.png 1272w, https://substackcdn.com/image/fetch/$s_!2aS5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff06ecdc1-f487-4be0-851f-21b1108c0d06_401x271.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vkvR!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50b05895-b47b-424e-a933-7d5bc8569f9e_449x207.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vkvR!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50b05895-b47b-424e-a933-7d5bc8569f9e_449x207.png 424w, https://substackcdn.com/image/fetch/$s_!vkvR!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50b05895-b47b-424e-a933-7d5bc8569f9e_449x207.png 848w, https://substackcdn.com/image/fetch/$s_!vkvR!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50b05895-b47b-424e-a933-7d5bc8569f9e_449x207.png 1272w, https://substackcdn.com/image/fetch/$s_!vkvR!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50b05895-b47b-424e-a933-7d5bc8569f9e_449x207.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vkvR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50b05895-b47b-424e-a933-7d5bc8569f9e_449x207.png" width="449" height="207" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/50b05895-b47b-424e-a933-7d5bc8569f9e_449x207.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:207,&quot;width&quot;:449,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:12627,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vkvR!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50b05895-b47b-424e-a933-7d5bc8569f9e_449x207.png 424w, https://substackcdn.com/image/fetch/$s_!vkvR!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50b05895-b47b-424e-a933-7d5bc8569f9e_449x207.png 848w, https://substackcdn.com/image/fetch/$s_!vkvR!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50b05895-b47b-424e-a933-7d5bc8569f9e_449x207.png 1272w, https://substackcdn.com/image/fetch/$s_!vkvR!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F50b05895-b47b-424e-a933-7d5bc8569f9e_449x207.png 1456w" sizes="100vw"></picture><div></div></div></a></figure></div><div><hr></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/ultimate-office-space-playlist-data-sql?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/ultimate-office-space-playlist-data-sql?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h3>Google Takeout: Get your YouTube Music data</h3><p>Do a <a href="https://support.google.com/accounts/answer/3024190?hl=en">quick googling</a> and you&#8217;ll find <a href="https://takeout.google.com/">Google Takeout</a> where you are easily instructed how to request to have your data prepared for you to download. Make sure you choose to get it in CSV format and choose just what&#8217;s relevant for you.</p><p>We&#8217;ll be working with the &#8220;music-library-songs&#8221; csv.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QI2V!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d603521-485d-452e-8377-c716956b0cef_693x687.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QI2V!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d603521-485d-452e-8377-c716956b0cef_693x687.png 424w, https://substackcdn.com/image/fetch/$s_!QI2V!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d603521-485d-452e-8377-c716956b0cef_693x687.png 848w, https://substackcdn.com/image/fetch/$s_!QI2V!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d603521-485d-452e-8377-c716956b0cef_693x687.png 1272w, https://substackcdn.com/image/fetch/$s_!QI2V!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d603521-485d-452e-8377-c716956b0cef_693x687.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QI2V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d603521-485d-452e-8377-c716956b0cef_693x687.png" width="389" height="385.6320346320346" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/3d603521-485d-452e-8377-c716956b0cef_693x687.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:687,&quot;width&quot;:693,&quot;resizeWidth&quot;:389,&quot;bytes&quot;:41157,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QI2V!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d603521-485d-452e-8377-c716956b0cef_693x687.png 424w, https://substackcdn.com/image/fetch/$s_!QI2V!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d603521-485d-452e-8377-c716956b0cef_693x687.png 848w, https://substackcdn.com/image/fetch/$s_!QI2V!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d603521-485d-452e-8377-c716956b0cef_693x687.png 1272w, https://substackcdn.com/image/fetch/$s_!QI2V!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F3d603521-485d-452e-8377-c716956b0cef_693x687.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!bFhI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5353ee7c-e60b-41af-b3fc-923ee9bcd662_699x521.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!bFhI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5353ee7c-e60b-41af-b3fc-923ee9bcd662_699x521.png 424w, https://substackcdn.com/image/fetch/$s_!bFhI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5353ee7c-e60b-41af-b3fc-923ee9bcd662_699x521.png 848w, https://substackcdn.com/image/fetch/$s_!bFhI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5353ee7c-e60b-41af-b3fc-923ee9bcd662_699x521.png 1272w, https://substackcdn.com/image/fetch/$s_!bFhI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5353ee7c-e60b-41af-b3fc-923ee9bcd662_699x521.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!bFhI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5353ee7c-e60b-41af-b3fc-923ee9bcd662_699x521.png" width="395" height="294.4134477825465" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5353ee7c-e60b-41af-b3fc-923ee9bcd662_699x521.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:521,&quot;width&quot;:699,&quot;resizeWidth&quot;:395,&quot;bytes&quot;:22732,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!bFhI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5353ee7c-e60b-41af-b3fc-923ee9bcd662_699x521.png 424w, https://substackcdn.com/image/fetch/$s_!bFhI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5353ee7c-e60b-41af-b3fc-923ee9bcd662_699x521.png 848w, https://substackcdn.com/image/fetch/$s_!bFhI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5353ee7c-e60b-41af-b3fc-923ee9bcd662_699x521.png 1272w, https://substackcdn.com/image/fetch/$s_!bFhI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5353ee7c-e60b-41af-b3fc-923ee9bcd662_699x521.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Google prepares this data fast. You&#8217;ll soon enough have it ready. Just download it.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DhjC!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfd62781-c0ea-4a5d-b8e1-9c802b3ee711_673x516.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DhjC!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfd62781-c0ea-4a5d-b8e1-9c802b3ee711_673x516.png 424w, https://substackcdn.com/image/fetch/$s_!DhjC!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfd62781-c0ea-4a5d-b8e1-9c802b3ee711_673x516.png 848w, https://substackcdn.com/image/fetch/$s_!DhjC!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfd62781-c0ea-4a5d-b8e1-9c802b3ee711_673x516.png 1272w, https://substackcdn.com/image/fetch/$s_!DhjC!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfd62781-c0ea-4a5d-b8e1-9c802b3ee711_673x516.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DhjC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfd62781-c0ea-4a5d-b8e1-9c802b3ee711_673x516.png" width="399" height="305.9197622585438" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/dfd62781-c0ea-4a5d-b8e1-9c802b3ee711_673x516.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:516,&quot;width&quot;:673,&quot;resizeWidth&quot;:399,&quot;bytes&quot;:25835,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DhjC!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfd62781-c0ea-4a5d-b8e1-9c802b3ee711_673x516.png 424w, https://substackcdn.com/image/fetch/$s_!DhjC!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfd62781-c0ea-4a5d-b8e1-9c802b3ee711_673x516.png 848w, https://substackcdn.com/image/fetch/$s_!DhjC!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfd62781-c0ea-4a5d-b8e1-9c802b3ee711_673x516.png 1272w, https://substackcdn.com/image/fetch/$s_!DhjC!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fdfd62781-c0ea-4a5d-b8e1-9c802b3ee711_673x516.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h3>Get your Spotify Music data</h3><p>You have to be a premium Spotify user for getting the desired <strong>&#8220;yourLibrary&#8221; data file</strong> (all your liked songs, albums, playlists, etc.). </p><p>As I am no longer one, in here I re-read how the structure of their JSON is and instructed ChatGPT to generate data accordingly (though I told it to go wild and create input as it pleases when it comes to songs etc.). </p><p>But making a request to get the data from Spotify is pretty straightforward:</p><ul><li><p>You go online to their website <a href="https://www.spotify.com/">www.spotify.com</a> &#8594; </p></li><li><p>login to your user &#8594; </p></li><li><p>Privacy Settings &#8594; </p></li><li><p>There you have a sub section called &#8220;Download your data.&#8221; </p></li></ul><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!SM9L!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d272aa5-7a95-4fa9-8850-a7393521bc7d_819x802.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!SM9L!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d272aa5-7a95-4fa9-8850-a7393521bc7d_819x802.png 424w, https://substackcdn.com/image/fetch/$s_!SM9L!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d272aa5-7a95-4fa9-8850-a7393521bc7d_819x802.png 848w, https://substackcdn.com/image/fetch/$s_!SM9L!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d272aa5-7a95-4fa9-8850-a7393521bc7d_819x802.png 1272w, https://substackcdn.com/image/fetch/$s_!SM9L!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d272aa5-7a95-4fa9-8850-a7393521bc7d_819x802.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!SM9L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d272aa5-7a95-4fa9-8850-a7393521bc7d_819x802.png" width="364" height="356.44444444444446" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6d272aa5-7a95-4fa9-8850-a7393521bc7d_819x802.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:802,&quot;width&quot;:819,&quot;resizeWidth&quot;:364,&quot;bytes&quot;:72442,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!SM9L!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d272aa5-7a95-4fa9-8850-a7393521bc7d_819x802.png 424w, https://substackcdn.com/image/fetch/$s_!SM9L!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d272aa5-7a95-4fa9-8850-a7393521bc7d_819x802.png 848w, https://substackcdn.com/image/fetch/$s_!SM9L!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d272aa5-7a95-4fa9-8850-a7393521bc7d_819x802.png 1272w, https://substackcdn.com/image/fetch/$s_!SM9L!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6d272aa5-7a95-4fa9-8850-a7393521bc7d_819x802.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>The data is not ready as fast as Google sends it but you will not be waiting long before it gets to you.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!T45i!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11e5c19-4658-4d25-9c14-201efa4a34fc_494x297.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!T45i!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11e5c19-4658-4d25-9c14-201efa4a34fc_494x297.png 424w, https://substackcdn.com/image/fetch/$s_!T45i!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11e5c19-4658-4d25-9c14-201efa4a34fc_494x297.png 848w, https://substackcdn.com/image/fetch/$s_!T45i!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11e5c19-4658-4d25-9c14-201efa4a34fc_494x297.png 1272w, https://substackcdn.com/image/fetch/$s_!T45i!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11e5c19-4658-4d25-9c14-201efa4a34fc_494x297.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!T45i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11e5c19-4658-4d25-9c14-201efa4a34fc_494x297.png" width="368" height="221.24696356275302" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c11e5c19-4658-4d25-9c14-201efa4a34fc_494x297.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:297,&quot;width&quot;:494,&quot;resizeWidth&quot;:368,&quot;bytes&quot;:12850,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!T45i!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11e5c19-4658-4d25-9c14-201efa4a34fc_494x297.png 424w, https://substackcdn.com/image/fetch/$s_!T45i!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11e5c19-4658-4d25-9c14-201efa4a34fc_494x297.png 848w, https://substackcdn.com/image/fetch/$s_!T45i!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11e5c19-4658-4d25-9c14-201efa4a34fc_494x297.png 1272w, https://substackcdn.com/image/fetch/$s_!T45i!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11e5c19-4658-4d25-9c14-201efa4a34fc_494x297.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Note: as you may notice, there will likely be a bias against non-English texts. Hebrew, for instance, often ends up as a weird gibberish style text.</p><h3>Excel: Prepare the Spotify data from JSON to CSV</h3><p>Although it&#8217;s possible to load into Microsoft SSMS the JSON files right away, I&#8217;ve found it more useful to generally know how to handle JSON files using Excel.</p><p>Data &#8594; Get Data &#8594; From File &#8594; From JSON</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vFey!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8832e984-bda1-4aa9-b09f-eaf7aa17fe9e_451x502.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vFey!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8832e984-bda1-4aa9-b09f-eaf7aa17fe9e_451x502.png 424w, https://substackcdn.com/image/fetch/$s_!vFey!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8832e984-bda1-4aa9-b09f-eaf7aa17fe9e_451x502.png 848w, https://substackcdn.com/image/fetch/$s_!vFey!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8832e984-bda1-4aa9-b09f-eaf7aa17fe9e_451x502.png 1272w, https://substackcdn.com/image/fetch/$s_!vFey!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8832e984-bda1-4aa9-b09f-eaf7aa17fe9e_451x502.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vFey!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8832e984-bda1-4aa9-b09f-eaf7aa17fe9e_451x502.png" width="451" height="502" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8832e984-bda1-4aa9-b09f-eaf7aa17fe9e_451x502.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:502,&quot;width&quot;:451,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:28018,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vFey!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8832e984-bda1-4aa9-b09f-eaf7aa17fe9e_451x502.png 424w, https://substackcdn.com/image/fetch/$s_!vFey!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8832e984-bda1-4aa9-b09f-eaf7aa17fe9e_451x502.png 848w, https://substackcdn.com/image/fetch/$s_!vFey!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8832e984-bda1-4aa9-b09f-eaf7aa17fe9e_451x502.png 1272w, https://substackcdn.com/image/fetch/$s_!vFey!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8832e984-bda1-4aa9-b09f-eaf7aa17fe9e_451x502.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Click the green text to dig deeper into the data. In the below image, it&#8217;s &#8220;Record&#8221;.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!pOlP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80cfdc30-790e-4319-8fdc-f0dc8af34a14_502x352.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!pOlP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80cfdc30-790e-4319-8fdc-f0dc8af34a14_502x352.png 424w, https://substackcdn.com/image/fetch/$s_!pOlP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80cfdc30-790e-4319-8fdc-f0dc8af34a14_502x352.png 848w, https://substackcdn.com/image/fetch/$s_!pOlP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80cfdc30-790e-4319-8fdc-f0dc8af34a14_502x352.png 1272w, https://substackcdn.com/image/fetch/$s_!pOlP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80cfdc30-790e-4319-8fdc-f0dc8af34a14_502x352.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!pOlP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80cfdc30-790e-4319-8fdc-f0dc8af34a14_502x352.png" width="502" height="352" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/80cfdc30-790e-4319-8fdc-f0dc8af34a14_502x352.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:352,&quot;width&quot;:502,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:15774,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!pOlP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80cfdc30-790e-4319-8fdc-f0dc8af34a14_502x352.png 424w, https://substackcdn.com/image/fetch/$s_!pOlP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80cfdc30-790e-4319-8fdc-f0dc8af34a14_502x352.png 848w, https://substackcdn.com/image/fetch/$s_!pOlP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80cfdc30-790e-4319-8fdc-f0dc8af34a14_502x352.png 1272w, https://substackcdn.com/image/fetch/$s_!pOlP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F80cfdc30-790e-4319-8fdc-f0dc8af34a14_502x352.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Choose each time which you&#8217;d like to expand as their structures are different. Later combine. Also, the Convert Into Table is a useful feature that needs clicking on to allow multi-expansions of arrays/objects.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Pobj!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07de56d5-61ae-4a02-b6f1-4012086c0395_385x241.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Pobj!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07de56d5-61ae-4a02-b6f1-4012086c0395_385x241.png 424w, https://substackcdn.com/image/fetch/$s_!Pobj!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07de56d5-61ae-4a02-b6f1-4012086c0395_385x241.png 848w, https://substackcdn.com/image/fetch/$s_!Pobj!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07de56d5-61ae-4a02-b6f1-4012086c0395_385x241.png 1272w, https://substackcdn.com/image/fetch/$s_!Pobj!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07de56d5-61ae-4a02-b6f1-4012086c0395_385x241.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Pobj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07de56d5-61ae-4a02-b6f1-4012086c0395_385x241.png" width="385" height="241" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/07de56d5-61ae-4a02-b6f1-4012086c0395_385x241.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:241,&quot;width&quot;:385,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:8334,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Pobj!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07de56d5-61ae-4a02-b6f1-4012086c0395_385x241.png 424w, https://substackcdn.com/image/fetch/$s_!Pobj!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07de56d5-61ae-4a02-b6f1-4012086c0395_385x241.png 848w, https://substackcdn.com/image/fetch/$s_!Pobj!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07de56d5-61ae-4a02-b6f1-4012086c0395_385x241.png 1272w, https://substackcdn.com/image/fetch/$s_!Pobj!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F07de56d5-61ae-4a02-b6f1-4012086c0395_385x241.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Clicking the Convert to Table, you can expand each Record within likedSongs.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!f4FM!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3fc9f-be2f-47a2-8898-d68ae60fae70_440x396.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!f4FM!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3fc9f-be2f-47a2-8898-d68ae60fae70_440x396.png 424w, https://substackcdn.com/image/fetch/$s_!f4FM!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3fc9f-be2f-47a2-8898-d68ae60fae70_440x396.png 848w, https://substackcdn.com/image/fetch/$s_!f4FM!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3fc9f-be2f-47a2-8898-d68ae60fae70_440x396.png 1272w, https://substackcdn.com/image/fetch/$s_!f4FM!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3fc9f-be2f-47a2-8898-d68ae60fae70_440x396.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!f4FM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3fc9f-be2f-47a2-8898-d68ae60fae70_440x396.png" width="440" height="396" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6aa3fc9f-be2f-47a2-8898-d68ae60fae70_440x396.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:396,&quot;width&quot;:440,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:14288,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!f4FM!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3fc9f-be2f-47a2-8898-d68ae60fae70_440x396.png 424w, https://substackcdn.com/image/fetch/$s_!f4FM!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3fc9f-be2f-47a2-8898-d68ae60fae70_440x396.png 848w, https://substackcdn.com/image/fetch/$s_!f4FM!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3fc9f-be2f-47a2-8898-d68ae60fae70_440x396.png 1272w, https://substackcdn.com/image/fetch/$s_!f4FM!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6aa3fc9f-be2f-47a2-8898-d68ae60fae70_440x396.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>You may change the name of the first column to easily identify the source being expanded. Note the difference in signs which columns can be expanded and which cannot, as shown in the image.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!dWqG!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe67aa0-f00f-46be-8fba-d3a1933d9467_845x527.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!dWqG!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe67aa0-f00f-46be-8fba-d3a1933d9467_845x527.png 424w, https://substackcdn.com/image/fetch/$s_!dWqG!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe67aa0-f00f-46be-8fba-d3a1933d9467_845x527.png 848w, https://substackcdn.com/image/fetch/$s_!dWqG!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe67aa0-f00f-46be-8fba-d3a1933d9467_845x527.png 1272w, https://substackcdn.com/image/fetch/$s_!dWqG!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe67aa0-f00f-46be-8fba-d3a1933d9467_845x527.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!dWqG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe67aa0-f00f-46be-8fba-d3a1933d9467_845x527.png" width="845" height="527" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9fe67aa0-f00f-46be-8fba-d3a1933d9467_845x527.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:527,&quot;width&quot;:845,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:97217,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!dWqG!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe67aa0-f00f-46be-8fba-d3a1933d9467_845x527.png 424w, https://substackcdn.com/image/fetch/$s_!dWqG!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe67aa0-f00f-46be-8fba-d3a1933d9467_845x527.png 848w, https://substackcdn.com/image/fetch/$s_!dWqG!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe67aa0-f00f-46be-8fba-d3a1933d9467_845x527.png 1272w, https://substackcdn.com/image/fetch/$s_!dWqG!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9fe67aa0-f00f-46be-8fba-d3a1933d9467_845x527.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Then click the Close &amp; Load button.</p><p>After I finished with linkedSongs, I did the same for the likedAlbums and likedPlaylists due to their different structures. I chose to open only the relevant columns/variables.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!G-a4!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6b97f9-89bb-4e4d-9283-606447ec39b1_709x368.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!G-a4!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6b97f9-89bb-4e4d-9283-606447ec39b1_709x368.png 424w, https://substackcdn.com/image/fetch/$s_!G-a4!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6b97f9-89bb-4e4d-9283-606447ec39b1_709x368.png 848w, https://substackcdn.com/image/fetch/$s_!G-a4!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6b97f9-89bb-4e4d-9283-606447ec39b1_709x368.png 1272w, https://substackcdn.com/image/fetch/$s_!G-a4!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6b97f9-89bb-4e4d-9283-606447ec39b1_709x368.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!G-a4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6b97f9-89bb-4e4d-9283-606447ec39b1_709x368.png" width="709" height="368" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5e6b97f9-89bb-4e4d-9283-606447ec39b1_709x368.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:368,&quot;width&quot;:709,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:26422,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!G-a4!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6b97f9-89bb-4e4d-9283-606447ec39b1_709x368.png 424w, https://substackcdn.com/image/fetch/$s_!G-a4!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6b97f9-89bb-4e4d-9283-606447ec39b1_709x368.png 848w, https://substackcdn.com/image/fetch/$s_!G-a4!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6b97f9-89bb-4e4d-9283-606447ec39b1_709x368.png 1272w, https://substackcdn.com/image/fetch/$s_!G-a4!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5e6b97f9-89bb-4e4d-9283-606447ec39b1_709x368.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>I then combined them all into one table. If there were many rows, it would&#8217;ve been easier to import each to SQL using INSERT BULK and then using UNION.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!JaTS!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b20c6e-21c1-4943-8c13-1cc900a8a1f9_536x262.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!JaTS!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b20c6e-21c1-4943-8c13-1cc900a8a1f9_536x262.png 424w, https://substackcdn.com/image/fetch/$s_!JaTS!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b20c6e-21c1-4943-8c13-1cc900a8a1f9_536x262.png 848w, https://substackcdn.com/image/fetch/$s_!JaTS!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b20c6e-21c1-4943-8c13-1cc900a8a1f9_536x262.png 1272w, https://substackcdn.com/image/fetch/$s_!JaTS!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b20c6e-21c1-4943-8c13-1cc900a8a1f9_536x262.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!JaTS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b20c6e-21c1-4943-8c13-1cc900a8a1f9_536x262.png" width="536" height="262" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/11b20c6e-21c1-4943-8c13-1cc900a8a1f9_536x262.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:262,&quot;width&quot;:536,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:18832,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!JaTS!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b20c6e-21c1-4943-8c13-1cc900a8a1f9_536x262.png 424w, https://substackcdn.com/image/fetch/$s_!JaTS!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b20c6e-21c1-4943-8c13-1cc900a8a1f9_536x262.png 848w, https://substackcdn.com/image/fetch/$s_!JaTS!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b20c6e-21c1-4943-8c13-1cc900a8a1f9_536x262.png 1272w, https://substackcdn.com/image/fetch/$s_!JaTS!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F11b20c6e-21c1-4943-8c13-1cc900a8a1f9_536x262.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>That&#8217;s it for the Spotify data, taken from JSON file into Excel. I later converted it into CSV as I imported it to Microsoft&#8217;s SSMS (SQL Server Management Studio).</p><p>*For the record, I did not run due diligence on the correctness of the data that ChatGPT created.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/ultimate-office-space-playlist-data-sql?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/ultimate-office-space-playlist-data-sql?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h2>Create &amp; insert the data</h2><p>You can download the data I used for this example:</p><ul><li><p><a href="https://drive.google.com/file/d/1bvswnuxK_d5qh7mPQXilTEMoXempxPEo/view?usp=sharing">&#8220;</a><strong><a href="https://drive.google.com/file/d/1bvswnuxK_d5qh7mPQXilTEMoXempxPEo/view?usp=sharing">myChatGPTlikedSpotifyLibrary&#8221; JSON</a> <br>(</strong>or<strong>, </strong>in case you want to skip the JSON &amp; Excel part, <strong><a href="https://drive.google.com/file/d/1yaaEAW9tEXmKP-2IZteo7KyM-WmtIkKU/view?usp=sharing">click here for the spotify_liked_library CSV</a>)</strong>; </p></li><li><p><a href="https://drive.google.com/file/d/1qVzHraMbi2hmxgBCWvYZcBi0wIgktgeo/view?usp=sharing">&#8220;</a><strong><a href="https://drive.google.com/file/d/1qVzHraMbi2hmxgBCWvYZcBi0wIgktgeo/view?usp=sharing">myRedactedYouTubeMusic&#8221; CSV</a>. </strong></p></li></ul><p>&#8230; or even better, get from Google &amp; Spotify your own data with your friends &amp; colleagues. Enjoy some tunes together :)</p><pre><code>CREATE DATABASE mutual_office_music;
GO

USE mutual_office_music;
GO
-------------------------------------
--drop table spotify_music_emp1
CREATE TABLE spotify_music_emp1 (
    artistName NVARCHAR(255),
    trackName NVARCHAR(255),
    albumName NVARCHAR(255)
);
GO

BULK INSERT spotify_music_emp1
FROM 'C:\Users\....\Desktop\spotify_liked_library.csv' 
WITH (
    FIRSTROW = 2,
    FIELDTERMINATOR = ',', 
    ROWTERMINATOR = '\n',
    TABLOCK
);
GO
---
--drop table YouTube_music_emp2
--pay attention that you might need to remove the space between
--the words (variables/columns) if you've downloaded your own data
-- or alternatively, use [Song URL] etc. when you create the tables.
CREATE TABLE YouTube_music_emp2 (
    SongURL NVARCHAR(MAX),
    SongTitle NVARCHAR(MAX),
    AlbumTitle NVARCHAR(MAX),
    ArtistNames NVARCHAR(MAX)
);
GO

BULK INSERT YouTube_music_emp2
FROM 'C:\Users\....\Desktop\music-library-songs.csv' --name of YouTubeMusicFile
WITH (
    FIRSTROW = 2,
    FIELDTERMINATOR = ',', 
    ROWTERMINATOR = '\n',
    TABLOCK
);
GO</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><h2>Creating the shared playlist with SQL</h2><p>The order of operations means we can first clean a bit the data to try and increase matches (i.e. the SELECT clause runs first and after it the INTERSECT). </p><p>As far as I can remember, I quickly glanced at the data and removed some capitalization variances as well as: &#8216;, commas, dots, question, exclamation and quotation marks in the data which could easily be cleaned out. </p><p>However, I did not handle the gibberish created by non-English/Latin letters and the diacritic marks (e.g. &#228;, &#246;, &#252;, &#229;). The idea was to invest minimal time into this playlist &amp; we had non-Hebrew folks at the office too, so a bias against Hebrew songs was actually welcomed.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></p><p>Originally, I&#8217;ve had about 5-7 different files provided by different employees, but the concept is the same.</p><pre><code>SELECT [artist names] = REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;LOWER(ArtistNames)
&#9;, '''','')
&#9;,',','')
&#9;,'.','')
&#9;,'?','')
&#9;,'!','')
&#9;,'"','')
, [song name] = REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;LOWER(SongTitle)
&#9;, '''','')
&#9;,',','')
&#9;,'.','')
&#9;,'?','')
&#9;,'!','')
&#9;,'"','')
, [album name] = REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;LOWER(AlbumTitle)
&#9;, '''','')
&#9;,',','')
&#9;,'.','')
&#9;,'?','')
&#9;,'!','')
&#9;,'"','')
FROM YouTube_music_emp2
INTERSECT
SELECT [artist names] = REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;LOWER(artistName)
&#9;, '''','')
&#9;,',','')
&#9;,'.','')
&#9;,'?','')
&#9;,'!','')
&#9;,'"','')
, [song name] = REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;LOWER(trackName)
&#9;, '''','')
&#9;,',','')
&#9;,'.','')
&#9;,'?','')
&#9;,'!','')
&#9;,'"','')
, [album name] = REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;REPLACE(
&#9;LOWER(albumName)
&#9;, '''','')
&#9;,',','')
&#9;,'.','')
&#9;,'?','')
&#9;,'!','')
&#9;,'"','')
FROM spotify_music_emp1</code></pre><p>The output based on the example set:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!ddsK!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2030681f-ec28-48a3-bdac-11657de225d0_457x367.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!ddsK!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2030681f-ec28-48a3-bdac-11657de225d0_457x367.png 424w, https://substackcdn.com/image/fetch/$s_!ddsK!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2030681f-ec28-48a3-bdac-11657de225d0_457x367.png 848w, https://substackcdn.com/image/fetch/$s_!ddsK!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2030681f-ec28-48a3-bdac-11657de225d0_457x367.png 1272w, https://substackcdn.com/image/fetch/$s_!ddsK!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2030681f-ec28-48a3-bdac-11657de225d0_457x367.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!ddsK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2030681f-ec28-48a3-bdac-11657de225d0_457x367.png" width="457" height="367" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/2030681f-ec28-48a3-bdac-11657de225d0_457x367.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:367,&quot;width&quot;:457,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:24077,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!ddsK!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2030681f-ec28-48a3-bdac-11657de225d0_457x367.png 424w, https://substackcdn.com/image/fetch/$s_!ddsK!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2030681f-ec28-48a3-bdac-11657de225d0_457x367.png 848w, https://substackcdn.com/image/fetch/$s_!ddsK!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2030681f-ec28-48a3-bdac-11657de225d0_457x367.png 1272w, https://substackcdn.com/image/fetch/$s_!ddsK!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2030681f-ec28-48a3-bdac-11657de225d0_457x367.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/ultimate-office-space-playlist-data-sql?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/ultimate-office-space-playlist-data-sql?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share novsto&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share novsto</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p>I hope you enjoyed from this quick introduction to INTERSECT. </p><p>Feel free to comment and to connect :)</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.linkedin.com/in/shahaf-rabi/&quot;,&quot;text&quot;:&quot;Connect on LinkedIn&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.linkedin.com/in/shahaf-rabi/"><span>Connect on LinkedIn</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>If I&#8217;d wanted to enhance the analysis nowadays then I&#8217;d likely just add a user-defined function to handle all the non a-z A-Z 0-9 letters or so and add a condition to remove matches of nulls (of artist names, songs, albums, which weren&#8217;t originally matching).</p></div></div>]]></content:encoded></item><item><title><![CDATA[SQL Tic Tac Toe Challenge]]></title><description><![CDATA[Find the winning move with SQL, for any combination!]]></description><link>https://www.novsto.com/p/sql-tic-tac-toe-challenge</link><guid isPermaLink="false">https://www.novsto.com/p/sql-tic-tac-toe-challenge</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Sat, 02 Sep 2023 18:15:18 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/50048955-3fda-4710-96b8-1ed7a1c127a2_82x102.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The famous game of <a href="https://en.wikipedia.org/wiki/Tic-tac-toe">Tic Tac Toe</a> provides a nice opportunity to practice some SQL =)</p><h1>The Tic Tac Toe SQL Challenge</h1><p>The challenge is to write SQL code which can indicate <strong>X</strong>&#8217;s next move - <strong>the winning move</strong>. This is for <strong>any combination</strong> on the table - horizontal, vertical or diagonal.</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9XY5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cab7ed6-7740-48f7-8f6d-6cd75c054568_86x108.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9XY5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cab7ed6-7740-48f7-8f6d-6cd75c054568_86x108.png 424w, https://substackcdn.com/image/fetch/$s_!9XY5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cab7ed6-7740-48f7-8f6d-6cd75c054568_86x108.png 848w, https://substackcdn.com/image/fetch/$s_!9XY5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cab7ed6-7740-48f7-8f6d-6cd75c054568_86x108.png 1272w, https://substackcdn.com/image/fetch/$s_!9XY5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cab7ed6-7740-48f7-8f6d-6cd75c054568_86x108.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9XY5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cab7ed6-7740-48f7-8f6d-6cd75c054568_86x108.png" width="86" height="108" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7cab7ed6-7740-48f7-8f6d-6cd75c054568_86x108.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:108,&quot;width&quot;:86,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1304,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9XY5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cab7ed6-7740-48f7-8f6d-6cd75c054568_86x108.png 424w, https://substackcdn.com/image/fetch/$s_!9XY5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cab7ed6-7740-48f7-8f6d-6cd75c054568_86x108.png 848w, https://substackcdn.com/image/fetch/$s_!9XY5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cab7ed6-7740-48f7-8f6d-6cd75c054568_86x108.png 1272w, https://substackcdn.com/image/fetch/$s_!9XY5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7cab7ed6-7740-48f7-8f6d-6cd75c054568_86x108.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><h3>Gist</h3><p>Some of the stuff you may expect to find in two optional solutions below:</p><h4>Solution #1 uses:</h4><ul><li><p>CTE; Subquery; CONCAT; UNION.</p></li></ul><p>It&#8217;s the simplest, most basic solution. Probably something one could be given to write during a job interview under limited time. Feel free to give yourself some 20-30 minutes to solve it if you wish to practice solving SQL question under time pressure.</p><h4>Solution #2 uses:</h4><ul><li><p>ISNULL(); STRING_AGG(/group_concat); GROUP WITHIN; CHARINDEX; GROUP BY. </p></li></ul><pre><code><strong>What is...?</strong>
* <strong>CHARINDEX</strong>: The CHARINDEX function searches for a substring inside a string and returns the starting position of the substring if it is found. If the substring is not found, it returns 0.

Syntax:
CHARINDEX ( substring , string [ , start_location ] )

- substring: The substring to find.
- string: The string to search within.
- start_location: Optional. The position to start searching for the substring within string.

Example: SELECT CHARINDEX('cat', 'con<strong>cat</strong>enation');  -- Output: 4</code></pre><pre><code><strong>What is...?</strong>
* <strong>STRING_AGG</strong>: In Transact-SQL (Microsoft SQL Server). In MySQL, it's group_concat. This function takes a column of values and concatenates them into a single string. It's useful for aggregation queries.

Syntax:
STRING_AGG ( expression, separator ) [ WITHIN GROUP ( &lt;order_by_clause&gt; ) ]
- expression: The expression to be concatenated.
- separator: The separator to be used between concatenated values.
- WITHIN GROUP: Optional. Sorts the values that are concatenated.</code></pre><pre><code><strong>What is...?</strong>
* <strong>WITHIN GROUP</strong>: The clause is used to specify an order for an ordered-set aggregate function. This is often used in conjunction with aggregation functions like STRING_AGG to specify the order in which the aggregated strings should appear.

Syntax: 
WITHIN GROUP ( ORDER BY expression [ ASC | DESC ] )</code></pre><h2>Create &amp; insert the data</h2><p>This is the data you can use to check your code with. You may create your own as well.</p><p>As always, I use Microsoft&#8217;s SSMS (SQL Server Management Studio), so it&#8217;s in Transact SQL.</p><pre><code>-- Create the database
CREATE DATABASE tic_tac_toe_challenge;
USE tic_tac_toe_challenge;
--
--drop table horizontal_win_1
-- Create the horizontal_win_1 table
CREATE TABLE horizontal_win_1 (
    row_num INT PRIMARY KEY,
    A VARCHAR(5),
    B VARCHAR(5),
    C VARCHAR(5)
);
-- Insert data into horizontal_win_1
INSERT INTO horizontal_win_1 (row_num, A, B, C) VALUES
(1, 'O', 'X', NULL),
(2, 'X', 'X', NULL),
(3, 'O', 'O', NULL)
--
--drop table vertical_win_1
-- Create the vertical_win_1 table
CREATE TABLE vertical_win_1 (
    row_num INT PRIMARY KEY,
    A VARCHAR(5),
    B VARCHAR(5),
    C VARCHAR(5)
);
-- Insert data into vertical_win_1
INSERT INTO vertical_win_1 (row_num, A, B, C) VALUES
(1, 'X', 'O', NULL),
(2, 'X', 'O', 'O'),
(3, NULL, NULL, 'X')
--
--
--drop table vertical_win_2
-- Create the vertical_win_2 table
CREATE TABLE vertical_win_2 (
    row_num INT PRIMARY KEY,
    A VARCHAR(5),
    B VARCHAR(5),
    C VARCHAR(5)
);
-- Insert data into vertical_win_2
INSERT INTO vertical_win_2 (row_num, A, B, C) VALUES
(1, 'O', 'O', NULL),
(2, NULL, 'O', 'X'),
(3, 'X', NULL, 'X')
--
--drop table diagonal_win_1
-- Create the diagonal_win_1 table
CREATE TABLE diagonal_win_1 (
    row_num INT PRIMARY KEY,
    A VARCHAR(5),
    B VARCHAR(5),
    C VARCHAR(5)
);
-- Insert data into diagonol_win_1
INSERT INTO diagonol_win_1 (row_num, A, B, C) VALUES
(1, 'X', 'O', NULL),
(2, 'X', 'X', 'O'),
(3, 'O', NULL, NULL)
--
--drop table diagonal_win_2
-- Create the diagonal_win_2 table
CREATE TABLE diagonal_win_2 (
    row_num INT PRIMARY KEY,
    A VARCHAR(5),
    B VARCHAR(5),
    C VARCHAR(5)
);
-- Insert data into diagonal_win_2
INSERT INTO diagonal_win_2 (row_num, A, B, C) VALUES
(1, 'O', NULL, 'X'),
(2, NULL, 'X', NULL),
(3, NULL, NULL, 'O')
--
--drop table double_win_vertical_and_diagonal
-- Create the double_win_vertical_and_diagonal table
CREATE TABLE double_win_vertical_and_diagonal (
    row_num INT PRIMARY KEY,
    A VARCHAR(5),
    B VARCHAR(5),
    C VARCHAR(5)
);
-- Insert data into double_win_vertical_and_diagonal
INSERT INTO double_win_vertical_and_diagonal (row_num, A, B, C) VALUES
(1, 'X', 'X', 'O'),
(2, 'O', 'X', NULL),
(3, 'O', NULL, NULL)
;
----</code></pre><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!wH04!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210d18a2-810c-4488-bae8-d922c0cc6bc1_82x102.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!wH04!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210d18a2-810c-4488-bae8-d922c0cc6bc1_82x102.png 424w, https://substackcdn.com/image/fetch/$s_!wH04!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210d18a2-810c-4488-bae8-d922c0cc6bc1_82x102.png 848w, https://substackcdn.com/image/fetch/$s_!wH04!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210d18a2-810c-4488-bae8-d922c0cc6bc1_82x102.png 1272w, https://substackcdn.com/image/fetch/$s_!wH04!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210d18a2-810c-4488-bae8-d922c0cc6bc1_82x102.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!wH04!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210d18a2-810c-4488-bae8-d922c0cc6bc1_82x102.png" width="82" height="102" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/210d18a2-810c-4488-bae8-d922c0cc6bc1_82x102.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:102,&quot;width&quot;:82,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:1528,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!wH04!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210d18a2-810c-4488-bae8-d922c0cc6bc1_82x102.png 424w, https://substackcdn.com/image/fetch/$s_!wH04!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210d18a2-810c-4488-bae8-d922c0cc6bc1_82x102.png 848w, https://substackcdn.com/image/fetch/$s_!wH04!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210d18a2-810c-4488-bae8-d922c0cc6bc1_82x102.png 1272w, https://substackcdn.com/image/fetch/$s_!wH04!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F210d18a2-810c-4488-bae8-d922c0cc6bc1_82x102.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><h2>SQL Solution #1</h2><p>I suppose the thing about this solution is that it&#8217;s simple stupid. All you have to do is understand there are 3 options: horizontal wins, vertical wins, and diagonals. Then, there are 3 horizontal rows with 3 different options within each, and similarly same situation for the vertical ones. Finally, 2 diagonals, 3 scenarios each. </p><p>So once you write the solution for one horizontal solution, one vertical and one diagonal, you can copy paste the code and do minor edits to wrap it all up. </p><p>It&#8217;s doable for <em>sharp cookies</em>. Yet it would also allow managers to evaluate progress and planning, attention to details, thoroughness, cleanness of code (or &#8216;readability&#8217;, which could be a major factor in not making a silly mistake here), et cetera, for folks who wouldn&#8217;t necessarily finish it all up by the allotted time.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><pre><code>--CTE for solution breakdown and comfort
WITH tic_tac_toe AS (
SELECT *
FROM <strong>TABLE_NAME</strong> -- change name here once for chosen game table
)
, winning_move_checks AS (
-- Horizontal wins
SELECT CONCAT('PLAY ', row_num, 'A') AS WinningMove
FROM tic_tac_toe
WHERE A IS NULL AND B = 'X' AND C = 'X'
UNION
SELECT CONCAT('PLAY ', row_num, 'B') AS WinningMove
FROM tic_tac_toe
WHERE A = 'X' AND B IS NULL AND C = 'X'
UNION
SELECT CONCAT('PLAY ', row_num, 'C') AS WinningMove
FROM tic_tac_toe
WHERE A = 'X' AND B = 'X' AND C IS NULL
---- Vertical wins
-- for A column
UNION
SELECT 'PLAY 1A' AS WinningMove
FROM tic_tac_toe
WHERE A IS NULL AND 
&#9;(SELECT A FROM tic_tac_toe WHERE row_num = 2) = 'X' AND 
&#9;(SELECT A FROM tic_tac_toe WHERE row_num = 3) = 'X'
UNION
SELECT 'PLAY 2A' AS WinningMove
FROM tic_tac_toe
WHERE A = 'X' AND 
&#9;(SELECT A FROM tic_tac_toe WHERE row_num = 2) IS NULL AND 
&#9;(SELECT A FROM tic_tac_toe WHERE row_num = 2) = 'X'
UNION
SELECT 'PLAY 3A' AS WinningMove
FROM tic_tac_toe
WHERE (SELECT A FROM tic_tac_toe WHERE row_num = 1) = 'X' AND 
&#9;(SELECT A FROM tic_tac_toe WHERE row_num = 2) = 'X' AND 
&#9;(SELECT A FROM tic_tac_toe WHERE row_num = 3) IS NULL
-- for B column
UNION
SELECT 'PLAY 1B' AS WinningMove
FROM tic_tac_toe
WHERE B IS NULL AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 2) = 'X' AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 3) = 'X'
UNION
SELECT 'PLAY 2B' AS WinningMove
FROM tic_tac_toe
WHERE B = 'X' AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 2) IS NULL AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 2) = 'X'
UNION
SELECT 'PLAY 3B' AS WinningMove
FROM tic_tac_toe
WHERE (SELECT B FROM tic_tac_toe WHERE row_num = 1) = 'X' AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 2) = 'X' AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 3) IS NULL
-- for C column
UNION
SELECT 'PLAY 1C' AS WinningMove
FROM tic_tac_toe
WHERE C IS NULL AND 
&#9;(SELECT C FROM tic_tac_toe WHERE row_num = 2) = 'X' AND 
&#9;(SELECT C FROM tic_tac_toe WHERE row_num = 3) = 'X'
UNION
SELECT 'PLAY 2C' AS WinningMove
FROM tic_tac_toe
WHERE C = 'X' AND 
&#9;(SELECT C FROM tic_tac_toe WHERE row_num = 2) IS NULL AND 
&#9;(SELECT C FROM tic_tac_toe WHERE row_num = 2) = 'X'
UNION
SELECT 'PLAY 3C' AS WinningMove
FROM tic_tac_toe
WHERE (SELECT C FROM tic_tac_toe WHERE row_num = 1) = 'X' AND 
&#9;(SELECT C FROM tic_tac_toe WHERE row_num = 2) = 'X' AND 
&#9;(SELECT C FROM tic_tac_toe WHERE row_num = 3) IS NULL
---- Diagonal wins
-- first diagonal
-- |[_]| ~ | ~ |
-- | ~ |[_]| ~ |
-- | ~ | ~ |[_]|
UNION
SELECT 'PLAY 1A' AS WinningMove
FROM tic_tac_toe
WHERE (SELECT A FROM tic_tac_toe WHERE row_num = 1) IS NULL AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 2) = 'X' AND 
&#9;(SELECT C FROM tic_tac_toe WHERE row_num = 3) = 'X'
UNION
SELECT 'PLAY 2B' AS WinningMove
FROM tic_tac_toe
WHERE (SELECT A FROM tic_tac_toe WHERE row_num = 1) = 'X' AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 2) IS NULL AND 
&#9;(SELECT C FROM tic_tac_toe WHERE row_num = 3) = 'X'
UNION
SELECT 'PLAY 3C' AS WinningMove
FROM tic_tac_toe
WHERE (SELECT A FROM tic_tac_toe WHERE row_num = 1) = 'X' AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 2) = 'X' AND 
&#9;(SELECT C FROM tic_tac_toe WHERE row_num = 3) IS NULL
-- second diagonal
-- | ~ | ~ |[_]|
-- | ~ |[_]| ~ |
-- |[_]| ~ | ~ |
UNION
SELECT 'PLAY 1C' AS WinningMove
FROM tic_tac_toe
WHERE (SELECT C FROM tic_tac_toe WHERE row_num = 1) IS NULL AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 2) = 'X' AND
&#9;(SELECT A FROM tic_tac_toe WHERE row_num = 3) = 'X'
UNION
SELECT 'PLAY 2B' AS WinningMove
FROM tic_tac_toe
WHERE (SELECT C FROM tic_tac_toe WHERE row_num = 1) = 'X' AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 2) IS NULL AND 
&#9;(SELECT A FROM tic_tac_toe WHERE row_num = 3) = 'X'
UNION
SELECT 'PLAY 3A' AS WinningMove
FROM tic_tac_toe
WHERE (SELECT C FROM tic_tac_toe WHERE row_num = 1) = 'X' AND 
&#9;(SELECT B FROM tic_tac_toe WHERE row_num = 2) = 'X' AND
&#9;(SELECT A FROM tic_tac_toe WHERE row_num = 3) IS NULL
)
SELECT *
FROM winning_move_checks
;</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/sql-tic-tac-toe-challenge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/sql-tic-tac-toe-challenge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h2>SQL Solution #2</h2><pre><code>--CTE for solution breakdown and comfort
WITH tic_tac_toe AS (
SELECT *
FROM <strong>TableName</strong> -- change name here once for chosen game table
)
-- For horizontal wins
, RowStrings AS (
    SELECT row_num,
           CONCAT(ISNULL(A, 'N'), ISNULL(B, 'N'), ISNULL(C, 'N')) AS row_string
    FROM tic_tac_toe
), horizontal_check AS (
SELECT 
    CASE 
        WHEN CHARINDEX('XXN', row_string) &gt; 0 
         THEN CONCAT('PLAY ', row_num, 'C (horizontal)')
        WHEN CHARINDEX('XNX', row_string) &gt; 0 
         THEN CONCAT('PLAY ', row_num, 'B (horizontal)')
        WHEN CHARINDEX('NXX', row_string) &gt; 0 
         THEN CONCAT('PLAY ', row_num, 'A (horizontal)')
    END AS WinningMove
FROM RowStrings
WHERE row_string LIKE '%XXN%' OR 
&#9;row_string LIKE '%XNX%' OR 
&#9;row_string LIKE '%NXX%'
)
-- For vertical wins
, ColStrings AS (
    SELECT col_name
           ,STRING_AGG(CASE WHEN col IS NULL THEN 'N' ELSE col END, '') 
&#9;&#9;WITHIN GROUP (ORDER BY row_num) AS col_string
    FROM (
        SELECT row_num, A as col, 'A' as col_name FROM tic_tac_toe
        UNION ALL
        SELECT row_num, B, 'B' FROM tic_tac_toe
        UNION ALL
        SELECT row_num, C, 'C' FROM tic_tac_toe
    ) AS subq
    GROUP BY col_name
)
, vertical_check AS (
SELECT CASE 
        WHEN CHARINDEX('XXN', col_string) &gt; 0 
         THEN CONCAT('PLAY 3', col_name, ' (vertical)')
        WHEN CHARINDEX('XNX', col_string) &gt; 0 
         THEN CONCAT('PLAY 2', col_name, ' (vertical)')
        WHEN CHARINDEX('NXX', col_string) &gt; 0 
         THEN CONCAT('PLAY 1', col_name, ' (vertical)')
    END AS WinningMove
FROM ColStrings
WHERE col_string LIKE '%XXN%' OR 
&#9;col_string LIKE '%XNX%' OR 
&#9;col_string LIKE '%NXX%'
)
-- For diagonal wins
, DiagStrings AS (
-- MAIN diagonal
-- |[_]| ~ | ~ |
-- | ~ |[_]| ~ |
-- | ~ | ~ |[_]|
-- counter diagonal
-- | ~ | ~ |[_]|
-- | ~ |[_]| ~ |
-- |[_]| ~ | ~ |
SELECT 'Main' AS diag_type
, STRING_AGG(CASE WHEN col IS NULL THEN 'N' ELSE col END, '') 
&#9;WITHIN GROUP (ORDER BY row_num) AS diag_string
    FROM (
        SELECT row_num, A as col FROM tic_tac_toe WHERE row_num = 1
        UNION ALL
        SELECT row_num, B FROM tic_tac_toe WHERE row_num = 2
        UNION ALL
        SELECT row_num, C FROM tic_tac_toe WHERE row_num = 3
    ) AS subq
    UNION ALL
SELECT 'Counter' AS diag_type
, STRING_AGG(CASE WHEN col IS NULL THEN 'N' ELSE col END, '') 
&#9;WITHIN GROUP (ORDER BY row_num) AS diag_string
    FROM (
        SELECT row_num, C as col FROM tic_tac_toe WHERE row_num = 1
        UNION ALL
        SELECT row_num, B FROM tic_tac_toe WHERE row_num = 2
        UNION ALL
        SELECT row_num, A FROM tic_tac_toe WHERE row_num = 3
    ) AS subquery
)
, diagonal_check AS (
SELECT 
    CASE 
        WHEN diag_type = 'Main' AND CHARINDEX('XXN', diag_string) &gt; 0 
         THEN 'PLAY 3C (main diagonal)'
        WHEN diag_type = 'Main' AND CHARINDEX('XNX', diag_string) &gt; 0 
         THEN 'PLAY 2B (main diagonal)'
        WHEN diag_type = 'Main' AND CHARINDEX('NXX', diag_string) &gt; 0 
         THEN 'PLAY 1A (main diagonal)'
        WHEN diag_type = 'Counter' AND CHARINDEX('XXN', diag_string) &gt; 0 
         THEN 'PLAY 3A (counter diagonal)'
        WHEN diag_type = 'Counter' AND CHARINDEX('XNX', diag_string) &gt; 0 
         THEN 'PLAY 2B (counter diagonal)'
        WHEN diag_type = 'Counter' AND CHARINDEX('NXX', diag_string) &gt; 0 
         THEN 'PLAY 1C (counter diagonal)'
    END AS WinningMove
FROM DiagStrings
WHERE diag_string LIKE '%XXN%' OR 
&#9;diag_string LIKE '%XNX%' OR 
&#9;diag_string LIKE '%NXX%'
)
, winning_moves_checks AS (
SELECT *
FROM horizontal_check
union
SELECT *
FROM vertical_check
union
SELECT *
FROM diagonal_check
)
SELECT DISTINCT *
FROM winning_moves_checks
;</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/sql-tic-tac-toe-challenge?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/sql-tic-tac-toe-challenge?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share novsto&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share novsto</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p>That&#8217;s it :) I hope you enjoyed it. Feel free to leave a comment if you&#8217;ve found an issue or got a suggestion. Alternatively, contact me via <a href="https://www.linkedin.com/in/shahaf-rabi/">LinkedIn</a> if you wish.</p><p></p>]]></content:encoded></item><item><title><![CDATA[Tibia SQL Data Analysis: Practice #3]]></title><description><![CDATA[SQL, Excel, Tableau]]></description><link>https://www.novsto.com/p/tibia-sql-data-analysis-practice-3</link><guid isPermaLink="false">https://www.novsto.com/p/tibia-sql-data-analysis-practice-3</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Fri, 09 Jun 2023 16:07:00 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/203a188a-8dd5-420a-850f-15eb55c783b9_445x159.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Practice some SQL, data analysis and visualizations! This is going to be split into a series of practices. </p><p>Practice #1 and #2 are quite easy. This practice, #3, is more advanced. I suppose this might be considered like an assignment a company may give with 1-2 days to return, perhaps with the last question as a bonus question.</p><ul><li><p>UPDATE; SET; CASE WHEN; CTE; UNION ALL; DATE FUNCTIONS; COUNT(); GROUP BY; HAVING; JOIN; FULL OUTER JOIN; COALESCE; SUM; WINDOW FUNCTIONS; WHERE; ORDER BY; CAST; FLOOR; NULLIF; TEMPORARY TABLE; ROUND; And more.</p></li></ul><p>You can download the datasets below.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share novsto&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share novsto</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!v8AX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144129cc-c8d1-4b38-b8d9-78aed0ed450c_445x159.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!v8AX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144129cc-c8d1-4b38-b8d9-78aed0ed450c_445x159.png 424w, https://substackcdn.com/image/fetch/$s_!v8AX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144129cc-c8d1-4b38-b8d9-78aed0ed450c_445x159.png 848w, https://substackcdn.com/image/fetch/$s_!v8AX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144129cc-c8d1-4b38-b8d9-78aed0ed450c_445x159.png 1272w, https://substackcdn.com/image/fetch/$s_!v8AX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144129cc-c8d1-4b38-b8d9-78aed0ed450c_445x159.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!v8AX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144129cc-c8d1-4b38-b8d9-78aed0ed450c_445x159.png" width="445" height="159" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/144129cc-c8d1-4b38-b8d9-78aed0ed450c_445x159.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:159,&quot;width&quot;:445,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!v8AX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144129cc-c8d1-4b38-b8d9-78aed0ed450c_445x159.png 424w, https://substackcdn.com/image/fetch/$s_!v8AX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144129cc-c8d1-4b38-b8d9-78aed0ed450c_445x159.png 848w, https://substackcdn.com/image/fetch/$s_!v8AX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144129cc-c8d1-4b38-b8d9-78aed0ed450c_445x159.png 1272w, https://substackcdn.com/image/fetch/$s_!v8AX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F144129cc-c8d1-4b38-b8d9-78aed0ed450c_445x159.png 1456w" sizes="100vw" fetchpriority="high"></picture><div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/tibia-sql-data-analysis-practice-3?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/tibia-sql-data-analysis-practice-3?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h1>The Data</h1><p>Download the three datasets (CSV):</p><ol><li><p><a href="https://drive.google.com/file/d/16YIMzz6Wtcm0h7163ptQUHmMQ09BjIAq/view?usp=sharing">Tibia Kill Statistics</a>.</p></li><li><p><a href="https://drive.google.com/file/d/16PHh93eYxmrI_REPA6t4kMI20q8C58I_/view?usp=sharing">Tibia Game World Servers</a>.</p></li><li><p><a href="https://drive.google.com/file/d/1VpzkEH-6OdNdqBRenARUn8l_rh2UpqL0/view?usp=sharing">Tibia Deprecated Servers</a>.&nbsp;</p></li></ol><p>You may copy the table creation and data loading from <a href="https://www.novsto.com/p/tibia-sql-data-analysis-practice1">Practice #1</a>.</p><h1>Practice #3: </h1><p>You&#8217;ll be using all datasets. Decide which to use on your own.</p><h3>The Questions</h3><p>Question #1:&nbsp;&nbsp;<strong>The deprecated servers (old servers dataset) are missing server location. Analyze the &#8220;worlds&#8221; dataset to figure out which (old) server was located where. The server world name has a structure matching with server location.&nbsp;</strong></p><p><strong>Then, update the &#8220;oldservers&#8221; dataset accordingly.</strong></p><ul><li><p>If you need, see hints at &#8220;The Answers&#8221; section below. Scroll slowly if you don&#8217;t want to be exposed to both hints/the answer at once.</p></li></ul><p></p><p>Question #2:&nbsp;<strong>Create a single visualization which presents the journey of expansion of CipSoft's Tibia to new geographical areas via the server locations throughout the game's existence.</strong></p><p><strong>Although there is no one "correct" answer, ensure that with your query/queries, the visualization is clear about how many servers Tibia had at least per year throughout its existence and the geographical locations.</strong></p><p><strong>Note:</strong> I propose two versions for this question. One, visualizing with Tableau, and the other, visualizing using Excel. The required output for fast visualization with Excel essentially warrants a somewhat more thoughtful query in my opinion. So consider tackling both versions.</p><p></p><p>Question #3: <strong>Find out how many (regular) creatures and how many (unique monsters) bosses there are, given that all "races" are either Creatures, Bosses or Players.</strong></p><p><strong>Note that you can distinguish between Creatures and Bosses based on the fact Bosses' names start with Capitalized letters while the rest do not.</strong></p><p>Desired output:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!84PX!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143f84ad-fcf7-42fa-865e-3256c80ebd52_177x47.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!84PX!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143f84ad-fcf7-42fa-865e-3256c80ebd52_177x47.png 424w, https://substackcdn.com/image/fetch/$s_!84PX!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143f84ad-fcf7-42fa-865e-3256c80ebd52_177x47.png 848w, https://substackcdn.com/image/fetch/$s_!84PX!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143f84ad-fcf7-42fa-865e-3256c80ebd52_177x47.png 1272w, https://substackcdn.com/image/fetch/$s_!84PX!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143f84ad-fcf7-42fa-865e-3256c80ebd52_177x47.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!84PX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143f84ad-fcf7-42fa-865e-3256c80ebd52_177x47.png" width="177" height="47" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/143f84ad-fcf7-42fa-865e-3256c80ebd52_177x47.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:47,&quot;width&quot;:177,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!84PX!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143f84ad-fcf7-42fa-865e-3256c80ebd52_177x47.png 424w, https://substackcdn.com/image/fetch/$s_!84PX!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143f84ad-fcf7-42fa-865e-3256c80ebd52_177x47.png 848w, https://substackcdn.com/image/fetch/$s_!84PX!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143f84ad-fcf7-42fa-865e-3256c80ebd52_177x47.png 1272w, https://substackcdn.com/image/fetch/$s_!84PX!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F143f84ad-fcf7-42fa-865e-3256c80ebd52_177x47.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Question 4#: <strong>Find the 15 most lethal races (from most to least lethal), by their rank, displaying their Lethality Rank, Race name, and Lethality Rate (players killed per race killed). Adjust the Lethality Rate as shown in the desired output image.</strong></p><p>Desired output:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!zj1E!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe81fd3bb-d87b-464a-8cd9-7742f822d1db_299x320.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!zj1E!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe81fd3bb-d87b-464a-8cd9-7742f822d1db_299x320.png 424w, https://substackcdn.com/image/fetch/$s_!zj1E!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe81fd3bb-d87b-464a-8cd9-7742f822d1db_299x320.png 848w, https://substackcdn.com/image/fetch/$s_!zj1E!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe81fd3bb-d87b-464a-8cd9-7742f822d1db_299x320.png 1272w, https://substackcdn.com/image/fetch/$s_!zj1E!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe81fd3bb-d87b-464a-8cd9-7742f822d1db_299x320.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!zj1E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe81fd3bb-d87b-464a-8cd9-7742f822d1db_299x320.png" width="299" height="320" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e81fd3bb-d87b-464a-8cd9-7742f822d1db_299x320.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:320,&quot;width&quot;:299,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!zj1E!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe81fd3bb-d87b-464a-8cd9-7742f822d1db_299x320.png 424w, https://substackcdn.com/image/fetch/$s_!zj1E!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe81fd3bb-d87b-464a-8cd9-7742f822d1db_299x320.png 848w, https://substackcdn.com/image/fetch/$s_!zj1E!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe81fd3bb-d87b-464a-8cd9-7742f822d1db_299x320.png 1272w, https://substackcdn.com/image/fetch/$s_!zj1E!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe81fd3bb-d87b-464a-8cd9-7742f822d1db_299x320.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><p>Question #5: <strong>Produce the output as shown below. It is a table which displays the Amount of, and overall Percentage in the population, the lethality rate of, the different races once classified into groups.&nbsp;</strong></p><ul><li><p><strong>Arrange the&nbsp;data into six different Lethality Group categories as shown.</strong></p></li><li><p><strong>Pay attention that your output produces LethalityGroup E.&nbsp;</strong></p></li><li><p><strong>Perform the following data cleaning steps as well, and account for it in your calculations:</strong></p><ul><li><p><strong>Some bosses evolve in stages during the boss fight and thus, require to merge the different names they appear under into one. Use the following list to handle it:<br><br>- 'Urmahlullu the Immaculate', 'Wisdom of Urmahlullu', 'Urmahlullu the Tamed', 'Wildness of Urmahlullu' = 'Urmahlullu the Weakened'<br><br>-&nbsp; 'Dragonking Zyrtarch' = 'Soul of Dragonking Zyrtarch'<br><br>- 'Channeling Earl Osam' = 'Earl Osam'<br><br>-&nbsp; 'Charged Anomaly' = 'Anomaly'<br><br>- 'glooth powered minotaurs' = 'Depowered Minotaur'<br><br>- 'The Fire Empowered Duke' = 'The Duke Of The Depths'<br></strong></p></li><li><p><strong>Remove races which are game mechanisms, and therefore, cannot be killed (e.g. elements such as fire or magic pillars). You can spot them by the fact they cannot, and therefore never are, killed.</strong></p></li></ul></li><li><p><strong>Consider a minimum threshold of 30 "encounters" in your evaluation (encounter being one of the parties is killed- players or creatures)</strong></p></li></ul><p>Desired output:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e1-Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d158688-9995-4eec-bd12-58bb5be54cc1_200x134.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e1-Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d158688-9995-4eec-bd12-58bb5be54cc1_200x134.png 424w, https://substackcdn.com/image/fetch/$s_!e1-Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d158688-9995-4eec-bd12-58bb5be54cc1_200x134.png 848w, https://substackcdn.com/image/fetch/$s_!e1-Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d158688-9995-4eec-bd12-58bb5be54cc1_200x134.png 1272w, https://substackcdn.com/image/fetch/$s_!e1-Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d158688-9995-4eec-bd12-58bb5be54cc1_200x134.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e1-Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d158688-9995-4eec-bd12-58bb5be54cc1_200x134.png" width="200" height="134" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4d158688-9995-4eec-bd12-58bb5be54cc1_200x134.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:134,&quot;width&quot;:200,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!e1-Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d158688-9995-4eec-bd12-58bb5be54cc1_200x134.png 424w, https://substackcdn.com/image/fetch/$s_!e1-Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d158688-9995-4eec-bd12-58bb5be54cc1_200x134.png 848w, https://substackcdn.com/image/fetch/$s_!e1-Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d158688-9995-4eec-bd12-58bb5be54cc1_200x134.png 1272w, https://substackcdn.com/image/fetch/$s_!e1-Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4d158688-9995-4eec-bd12-58bb5be54cc1_200x134.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p></p><p>Question #6: <strong>Produce the same final output of the previous question (question #5), but this time, in the formation as shown at the desired output.</strong></p><ul><li><p>General note: <br>SQL does not have Transpose. If you want to convert data for more than 2 columns, it's usually easiest to export the output to e.g. Excel or use Python. <br>Yet consider the following challenge here and try it out. I found it to be an interesting thought-exercise and a way to instill stronger understanding of some concepts.<br>That noted, I&#8217;m sure in the future I&#8217;ll find out there was some easier/smarter way to do this :) A way I simply don&#8217;t know/haven&#8217;t thought of at this very moment.<br>But if you know of a better way, please leave a comment!</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/tibia-sql-data-analysis-practice-3/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/tibia-sql-data-analysis-practice-3/comments"><span>Leave a comment</span></a></p></li></ul><p>Desired output:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3Geh!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa92b0f5e-2066-4c6e-9833-ffa3b40dded0_640x87.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3Geh!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa92b0f5e-2066-4c6e-9833-ffa3b40dded0_640x87.png 424w, https://substackcdn.com/image/fetch/$s_!3Geh!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa92b0f5e-2066-4c6e-9833-ffa3b40dded0_640x87.png 848w, https://substackcdn.com/image/fetch/$s_!3Geh!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa92b0f5e-2066-4c6e-9833-ffa3b40dded0_640x87.png 1272w, https://substackcdn.com/image/fetch/$s_!3Geh!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa92b0f5e-2066-4c6e-9833-ffa3b40dded0_640x87.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3Geh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa92b0f5e-2066-4c6e-9833-ffa3b40dded0_640x87.png" width="640" height="87" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a92b0f5e-2066-4c6e-9833-ffa3b40dded0_640x87.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:87,&quot;width&quot;:640,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3Geh!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa92b0f5e-2066-4c6e-9833-ffa3b40dded0_640x87.png 424w, https://substackcdn.com/image/fetch/$s_!3Geh!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa92b0f5e-2066-4c6e-9833-ffa3b40dded0_640x87.png 848w, https://substackcdn.com/image/fetch/$s_!3Geh!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa92b0f5e-2066-4c6e-9833-ffa3b40dded0_640x87.png 1272w, https://substackcdn.com/image/fetch/$s_!3Geh!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa92b0f5e-2066-4c6e-9833-ffa3b40dded0_640x87.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>or if you prefer to see how it looks in Excel:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9oso!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ecfd43-4226-432f-8c38-a1ea557d1d8b_400x71.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9oso!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ecfd43-4226-432f-8c38-a1ea557d1d8b_400x71.png 424w, https://substackcdn.com/image/fetch/$s_!9oso!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ecfd43-4226-432f-8c38-a1ea557d1d8b_400x71.png 848w, https://substackcdn.com/image/fetch/$s_!9oso!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ecfd43-4226-432f-8c38-a1ea557d1d8b_400x71.png 1272w, https://substackcdn.com/image/fetch/$s_!9oso!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ecfd43-4226-432f-8c38-a1ea557d1d8b_400x71.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9oso!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ecfd43-4226-432f-8c38-a1ea557d1d8b_400x71.png" width="400" height="71" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c9ecfd43-4226-432f-8c38-a1ea557d1d8b_400x71.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:71,&quot;width&quot;:400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9oso!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ecfd43-4226-432f-8c38-a1ea557d1d8b_400x71.png 424w, https://substackcdn.com/image/fetch/$s_!9oso!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ecfd43-4226-432f-8c38-a1ea557d1d8b_400x71.png 848w, https://substackcdn.com/image/fetch/$s_!9oso!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ecfd43-4226-432f-8c38-a1ea557d1d8b_400x71.png 1272w, https://substackcdn.com/image/fetch/$s_!9oso!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc9ecfd43-4226-432f-8c38-a1ea557d1d8b_400x71.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>(Bonus?) Question 7#: <strong>Examine players' deaths at different servers (PvP Type &amp; Location). Provide one or two interesting insight(s).</strong></p><ul><li><p>No specific desired output.</p></li><li><p>No specific solution code.</p></li></ul><div class="subscription-widget-wrap-editor" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe&quot;,&quot;language&quot;:&quot;en&quot;}" data-component-name="SubscribeWidgetToDOM"><div class="subscription-widget show-subscribe"><div class="preamble"><p class="cta-caption">you can automatically unsubscribe whenever you wish!</p></div><form class="subscription-widget-subscribe"><input type="email" class="email-input" name="email" placeholder="Type your email&#8230;" tabindex="-1"><input type="submit" class="button primary" value="Subscribe"><div class="fake-input-wrapper"><div class="fake-input"></div><div class="fake-button"></div></div></form></div></div><h3>The Answers</h3><p>Hint #1 for Question #1:</p><ul><li><p>Hint 1: The pattern is most clear for the South America ones, then North America ones, and least for the European servers.</p></li></ul><p>Hint #2 for Question #1:</p><ul><li><p>Focus on the name ending.</p></li></ul><p></p><p>Answer #1:&nbsp;&nbsp;<strong>The deprecated servers (old servers dataset) are missing server location. Analyze the &#8220;worlds&#8221; dataset to figure out which (old) server was located where. The server world name has a structure matching with server location.&nbsp;</strong></p><pre><code>~bra = South America (servers located in Brazil)
~era = North America (servers located in North America)
~a = Europe (servers located in Europe; names ending with A which don't end with BRA nor ERA)</code></pre><pre><code>UPDATE oldservers&#9;
SET located = &#9;
    CASE&#9;
        WHEN servName LIKE '%bra' THEN 'South America'&#9;
        WHEN servName LIKE '%era' THEN 'North America'&#9;
        ELSE 'Europe'&#9;
    END</code></pre><p></p><p>Answer #2:&nbsp;<strong>Create a single visualization which presents the journey of expansion of CipSoft's Tibia to new geographical areas via the server locations throughout the game's existence.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!6WRv!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6035620a-6e5f-41c5-a966-e81c7674c172_640x354.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!6WRv!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6035620a-6e5f-41c5-a966-e81c7674c172_640x354.png 424w, https://substackcdn.com/image/fetch/$s_!6WRv!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6035620a-6e5f-41c5-a966-e81c7674c172_640x354.png 848w, https://substackcdn.com/image/fetch/$s_!6WRv!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6035620a-6e5f-41c5-a966-e81c7674c172_640x354.png 1272w, https://substackcdn.com/image/fetch/$s_!6WRv!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6035620a-6e5f-41c5-a966-e81c7674c172_640x354.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!6WRv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6035620a-6e5f-41c5-a966-e81c7674c172_640x354.png" width="640" height="354" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6035620a-6e5f-41c5-a966-e81c7674c172_640x354.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:354,&quot;width&quot;:640,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!6WRv!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6035620a-6e5f-41c5-a966-e81c7674c172_640x354.png 424w, https://substackcdn.com/image/fetch/$s_!6WRv!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6035620a-6e5f-41c5-a966-e81c7674c172_640x354.png 848w, https://substackcdn.com/image/fetch/$s_!6WRv!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6035620a-6e5f-41c5-a966-e81c7674c172_640x354.png 1272w, https://substackcdn.com/image/fetch/$s_!6WRv!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6035620a-6e5f-41c5-a966-e81c7674c172_640x354.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><strong>Tableau version</strong> - desired output example:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!RChL!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F027706d2-8c34-4a4c-81f6-56a43922f06e_116x640.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!RChL!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F027706d2-8c34-4a4c-81f6-56a43922f06e_116x640.png 424w, https://substackcdn.com/image/fetch/$s_!RChL!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F027706d2-8c34-4a4c-81f6-56a43922f06e_116x640.png 848w, https://substackcdn.com/image/fetch/$s_!RChL!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F027706d2-8c34-4a4c-81f6-56a43922f06e_116x640.png 1272w, https://substackcdn.com/image/fetch/$s_!RChL!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F027706d2-8c34-4a4c-81f6-56a43922f06e_116x640.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!RChL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F027706d2-8c34-4a4c-81f6-56a43922f06e_116x640.png" width="134" height="739.3103448275862" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/027706d2-8c34-4a4c-81f6-56a43922f06e_116x640.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:640,&quot;width&quot;:116,&quot;resizeWidth&quot;:134,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!RChL!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F027706d2-8c34-4a4c-81f6-56a43922f06e_116x640.png 424w, https://substackcdn.com/image/fetch/$s_!RChL!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F027706d2-8c34-4a4c-81f6-56a43922f06e_116x640.png 848w, https://substackcdn.com/image/fetch/$s_!RChL!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F027706d2-8c34-4a4c-81f6-56a43922f06e_116x640.png 1272w, https://substackcdn.com/image/fetch/$s_!RChL!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F027706d2-8c34-4a4c-81f6-56a43922f06e_116x640.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">tableau output version</figcaption></figure></div><p>Solution code below:</p><pre><code>WITH old_and_current AS (&#9;&#9;
  select servName&#9;&#9;
  , located&#9;&#9;
  , YEAR(onlineSince) AS startYear&#9;&#9;
  , YEAR(offlineSince) AS endYear&#9;&#9;
  from oldservers&#9;&#9;
    union all&#9;&#9;
  select worldName&#9;&#9;
  , servLocation&#9;&#9;
  , YEAR(serverCETCreatedDate) AS startYear&#9;&#9;
  , CASE WHEN serverCETCreatedDate is not null THEN '0000' END AS endYear&#9;&#9;
  from worlds&#9;&#9;
  )&#9;&#9;
  , start_year AS (&#9;&#9;
  SELECT &#9;&#9;
  startYear&#9;&#9;
  , located&#9;&#9;
  , COUNT(servName) AS sYcounter&#9;&#9;
  FROM old_and_current&#9;&#9;
  GROUP BY &#9;&#9;
  startYear&#9;&#9;
  , located&#9;&#9;
  )&#9;&#9;
  , end_year AS (&#9;&#9;
  SELECT &#9;&#9;
  endYear&#9;&#9;
  , located&#9;&#9;
  , COUNT(servName) AS eYcounter&#9;&#9;
  FROM old_and_current&#9;&#9;
  GROUP BY &#9;&#9;
  endYear&#9;&#9;
  , located&#9;&#9;
  )&#9;&#9;
 , yearly_status AS (&#9;&#9;
  SELECT &#9;&#9;
  startYear AS "Year"&#9;&#9;
  , start_year.located AS located&#9;&#9;
  , COALESCE((sYcounter - eYcounter), sYcounter) AS NumStatus&#9;&#9;
  FROM start_year&#9;&#9;
  FULL OUTER JOIN end_year&#9;&#9;
  ON start_year.startYear = end_year.endYear &#9;&#9;
  AND start_year.located = end_year.located&#9;&#9;
  )&#9;&#9;
  SELECT &#9;&#9;
  "Year"&#9;&#9;
  , located&#9;&#9;
  , SUM(NumStatus) OVER (PARTITION BY located ORDER BY "Year") AS Total&#9;&#9;
  FROM yearly_status&#9;&#9;
  WHERE "Year" IS NOT NULL&#9;&#9;
  ORDER BY 2, 1</code></pre><p><strong>Excel version</strong> - desired output example:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!f_HQ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ba44c-cd78-4385-b15c-dc1f7b79bfe1_297x400.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!f_HQ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ba44c-cd78-4385-b15c-dc1f7b79bfe1_297x400.png 424w, https://substackcdn.com/image/fetch/$s_!f_HQ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ba44c-cd78-4385-b15c-dc1f7b79bfe1_297x400.png 848w, https://substackcdn.com/image/fetch/$s_!f_HQ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ba44c-cd78-4385-b15c-dc1f7b79bfe1_297x400.png 1272w, https://substackcdn.com/image/fetch/$s_!f_HQ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ba44c-cd78-4385-b15c-dc1f7b79bfe1_297x400.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!f_HQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ba44c-cd78-4385-b15c-dc1f7b79bfe1_297x400.png" width="297" height="400" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c11ba44c-cd78-4385-b15c-dc1f7b79bfe1_297x400.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:400,&quot;width&quot;:297,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!f_HQ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ba44c-cd78-4385-b15c-dc1f7b79bfe1_297x400.png 424w, https://substackcdn.com/image/fetch/$s_!f_HQ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ba44c-cd78-4385-b15c-dc1f7b79bfe1_297x400.png 848w, https://substackcdn.com/image/fetch/$s_!f_HQ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ba44c-cd78-4385-b15c-dc1f7b79bfe1_297x400.png 1272w, https://substackcdn.com/image/fetch/$s_!f_HQ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc11ba44c-cd78-4385-b15c-dc1f7b79bfe1_297x400.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">excel output version</figcaption></figure></div><p>Solution code below:</p><pre><code>WITH old_and_current AS (
  SELECT servName&#9;&#9;&#9;
  , located&#9;&#9;&#9;
  , YEAR(onlineSince) AS startYear&#9;&#9;&#9;
  , COALESCE(YEAR(offlineSince), 0) AS endYear&#9;&#9;&#9;
  FROM oldservers&#9;&#9;&#9;
  UNION ALL&#9;&#9;&#9;
  SELECT worldName&#9;&#9;&#9;
  , servLocation&#9;&#9;&#9;
  , YEAR(serverCETCreatedDate) AS startYear&#9;&#9;&#9;
  , 0 AS endYear&#9;&#9;&#9;
  FROM worlds&#9;&#9;&#9;
),&#9;&#9;&#9;
addition AS (&#9;&#9;&#9;
  SELECT startYear&#9;&#9;&#9;
  , SUM(CASE WHEN located = 'Europe' THEN 1 ELSE 0 END) AS EuropePlus&#9;&#9;&#9;
  , SUM(CASE WHEN located = 'North America' THEN 1 ELSE 0 END) AS NorthAmericaPlus&#9;&#9;&#9;
  , SUM(CASE WHEN located = 'South America' THEN 1 ELSE 0 END) AS SouthAmericaPlus&#9;&#9;&#9;
  FROM old_and_current&#9;&#9;&#9;
  GROUP BY startYear&#9;&#9;&#9;
  ),&#9;&#9;&#9;
subtraction AS (&#9;&#9;&#9;
  SELECT endYear&#9;&#9;&#9;
  , SUM(CASE WHEN located = 'Europe' THEN 1 ELSE 0 END) AS EuropeMinus&#9;&#9;&#9;
  , SUM(CASE WHEN located = 'North America' THEN 1 ELSE 0 END) AS NorthAmericaMinus&#9;&#9;&#9;
  , SUM(CASE WHEN located = 'South America' THEN 1 ELSE 0 END) AS SouthAmericaMinus&#9;&#9;&#9;
  FROM old_and_current&#9;&#9;&#9;
  WHERE endYear != 0&#9;&#9;&#9;
  GROUP BY endYear&#9;&#9;&#9;
  ), &#9;&#9;&#9;
trendPerYear AS ( &#9;&#9;&#9;
  SELECT &#9;&#9;&#9;
  startYear AS "Year"&#9;&#9;&#9;
  , COALESCE((EuropePlus - EuropeMinus), EuropePlus) AS EuropeTrend&#9;&#9;&#9;
  , COALESCE((NorthAmericaPlus - NorthAmericaMinus), NorthAmericaPlus) AS NorthAmericaTrend&#9;&#9;&#9;
  , COALESCE((SouthAmericaPlus - SouthAmericaMinus), SouthAmericaPlus) AS SouthAmericaTrend&#9;&#9;&#9;
  FROM addition&#9;&#9;&#9;
  FULL OUTER JOIN subtraction&#9;&#9;&#9;
  ON addition.startYear = subtraction.endYear&#9;&#9;&#9;
 ),&#9;&#9;&#9;
statusPerYear AS (&#9;&#9;&#9;
 SELECT &#9;&#9;&#9;
 "Year"&#9;&#9;&#9;
 , SUM(EuropeTrend) OVER (ORDER BY "Year") AS Europe&#9;&#9;&#9;
 , SUM(NorthAmericaTrend) OVER (ORDER BY "Year") AS NorthAmerica&#9;&#9;&#9;
 , SUM(SouthAmericaTrend) OVER (ORDER BY "Year") AS SouthAmerica&#9;&#9;&#9;
 FROM trendPerYear&#9;&#9;&#9;
 )&#9;&#9;&#9;&#9;&#9;
 SELECT "Year"&#9;&#9;
 , Europe&#9;&#9;&#9;
 , NorthAmerica&#9;&#9;&#9;
 , SouthAmerica
 , (Europe + NorthAmerica + SouthAmerica) AS Total&#9;&#9;&#9;&#9;
 FROM statusPerYear</code></pre><p></p><p>Answer 3#: <strong>Find out how many (regular) creatures and how many (unique monsters) bosses there are, given that all "races" are either Creatures, Bosses or Players.</strong></p><p>Solution code below:</p><pre><code>SELECT &#9;&#9;
 COUNT(CASE WHEN ASCII(LEFT(race, 1)) BETWEEN 65 AND 90 THEN 1 END ) AS 'Boss'&#9;&#9;
 , COUNT(CASE WHEN ASCII(LEFT(race, 1)) NOT BETWEEN 65 AND 90 THEN 1 END ) AS 'Creature'&#9;&#9;
FROM (SELECT distinct race &#9;&#9;
      FROM killstats&#9;&#9;
&#9;  WHERE race != 'players'&#9;
&#9;  ) source</code></pre><p></p><p>Answer: 4#: <strong>Find the 15 most lethal races (from most to least lethal), by their rank, displaying their Lethality Rank, Race name, and Lethality Rate (players killed per race killed). Adjust the Lethality Rate as shown in the desired output image.</strong></p><p>Solution code below:</p><pre><code>WITH LethalityTable AS (&#9;&#9;
    SELECT &#9;&#9;
    race&#9;&#9;
    , COALESCE(&#9;&#9;
        CAST(&#9;&#9;
           FLOOR(&#9;&#9;
              CAST(SUM(lastWeekKilledPlayers) AS DECIMAL(18, 6)) &#9;&#9;
&#9;       / &#9;
&#9;       NULLIF&#9;
&#9;         (CAST(SUM(lastWeekKilledbyPlayers) AS DECIMAL(18, 6))&#9;
&#9;          , 0) --nullIF &#9;
&#9;        * 1000 --for FLOOR&#9;
                ) / 1000 --for FLOOR&#9;&#9;
            AS DECIMAL(18, 3))&#9;&#9;
&#9;, 0) -- coalesce&#9;
&#9;AS LethalityRate&#9;
    FROM killstats&#9;&#9;
    GROUP BY race&#9;&#9;
)&#9;&#9;
SELECT &#9;&#9;
    TOP 16 &#9;&#9;
    DENSE_RANK() OVER (ORDER BY LethalityRate DESC) AS LethalityRank&#9;&#9;
    , Race&#9;&#9;
    , LethalityRate&#9;&#9;
FROM LethalityTable&#9;&#9;
ORDER BY LethalityRate DESC</code></pre><p></p><p>Answer #5: <strong>Produce the output as shown below. It is a table which displays the Amount of, and overall Percentage in the population, the lethality rate of, the different races once classified into groups.&nbsp;i.e. according to the described details.</strong></p><p>Solution code below:</p><pre><code>DROP TABLE IF EXISTS #all_categories;&#9;&#9;&#9;
CREATE TABLE #all_categories&#9;&#9;&#9;
(&#9;&#9;&#9;
    LethalityGroup VARCHAR(50)&#9;&#9;&#9;
);&#9;&#9;&#9;
INSERT INTO #all_categories(LethalityGroup)&#9;&#9;&#9;
VALUES ('(A) 0-0.99'), ('(B) 1-9.99'), ('(C) 10-49.99'), ('(D) 50-89.99'), ('(E) 90-99.99'), ('(F) 100+');&#9;&#9;&#9;
&#9;&#9;&#9;
WITH AggregatedTable AS (--Grouped for aggregation, changed integer into decimal for rates&#9;&#9;&#9;
    SELECT &#9;&#9;&#9;
        serverName&#9;&#9;&#9;
        , race&#9;&#9;&#9;
        , CAST(SUM(lastWeekKilledPlayers) AS DECIMAL(13,3)) AS sumKilledPlayers&#9;&#9;&#9;
        , CAST(SUM(lastWeekKilledbyPlayers) AS DECIMAL(13,3)) AS sumPlayersKilled&#9;&#9;&#9;
    FROM killstats&#9;&#9;&#9;
    GROUP BY &#9;&#9;&#9;
        serverName&#9;&#9;&#9;
        , race&#9;&#9;&#9;
)&#9;&#9;&#9;
, StagedBossesMerger AS (--sumPlayersKilled equal zero reveals list of creatures which &#9;&#9;&#9;
    --cannot be killed at all or that got different forms before they can be killed in their final form.&#9;&#9;&#9;
   --the CASE WHEN merged the different forms into the Killable-form.&#9;&#9;&#9;
   --the HAVING part removed the UnKillable Creatures.&#9;&#9;&#9;
   --And yes, to figure it out, there was a need to manual check on wiki-fandom website.&#9;&#9;&#9;
  SELECT &#9;&#9;&#9;
    CASE&#9;&#9;&#9;
        WHEN race IN ('Urmahlullu the Immaculate', 'Wisdom of Urmahlullu', 'Urmahlullu the Tamed', 'Wildness of Urmahlullu') THEN 'Urmahlullu the Weakened'&#9;&#9;&#9;
        WHEN race IN ('Dragonking Zyrtarch') THEN 'Soul of Dragonking Zyrtarch'&#9;&#9;&#9;
        WHEN race IN ('Channeling Earl Osam') THEN 'Earl Osam'&#9;&#9;&#9;
        WHEN race IN ('Charged Anomaly') THEN 'Anomaly'&#9;&#9;&#9;
        WHEN race IN ('glooth powered minotaurs') THEN 'Depowered Minotaur'&#9;&#9;&#9;
        WHEN race IN ('The Fire Empowered Duke') THEN 'The Duke Of The Depths'&#9;&#9;&#9;
        ELSE race&#9;&#9;&#9;
    END AS race&#9;&#9;&#9;
    , SUM(sumKilledPlayers) AS sumKilledPlayers&#9;&#9;&#9;
&#9;, SUM(sumPlayersKilled) AS sumPlayersKilled&#9;&#9;
FROM AggregatedTable&#9;&#9;&#9;
GROUP BY&#9;&#9;&#9;
    CASE&#9;&#9;&#9;
        WHEN race IN ('Urmahlullu the Immaculate', 'Wisdom of Urmahlullu', 'Urmahlullu the Tamed', 'Wildness of Urmahlullu') THEN 'Urmahlullu the Weakened'&#9;&#9;&#9;
        WHEN race IN ('Dragonking Zyrtarch') THEN 'Soul of Dragonking Zyrtarch'&#9;&#9;&#9;
        WHEN race IN ('Channeling Earl Osam') THEN 'Earl Osam'&#9;&#9;&#9;
        WHEN race IN ('Charged Anomaly') THEN 'Anomaly'&#9;&#9;&#9;
        WHEN race IN ('glooth powered minotaurs') THEN 'Depowered Minotaur'&#9;&#9;&#9;
        WHEN race IN ('The Fire Empowered Duke') THEN 'The Duke Of The Depths'&#9;&#9;&#9;
        ELSE race&#9;&#9;&#9;
    END &#9;&#9;&#9;
&#9;HAVING SUM(sumPlayersKilled) &gt; 0&#9;&#9;
&#9;)&#9;&#9;
&#9;, LethalityTable AS (&#9;&#9;
&#9;SELECT race&#9;&#9;
&#9;, ROUND((sumKilledPlayers/sumPlayersKilled)*100,2) AS Lethality&#9;&#9;
    FROM StagedBossesMerger&#9;&#9;&#9;
    WHERE sumKilledPlayers+sumPlayersKilled &gt;= 30 ---threshold&#9;&#9;&#9;
    )&#9;&#9;&#9;
&#9;, LethalityTable2 AS (&#9;&#9;
    SELECT&#9;&#9;&#9;
      cate.LethalityGroup&#9;&#9;&#9;
&#9;  , ISNULL(COUNT(l.race), 0) AS Amount&#9;&#9;
    FROM LethalityTable l&#9;&#9;&#9;
    RIGHT JOIN #all_categories cate&#9;&#9;&#9;
    ON cate.LethalityGroup = &#9;&#9;&#9;
      CASE WHEN l.Lethality BETWEEN 0 AND 0.99 THEN '(A) 0-0.99'&#9;&#9;&#9;
&#9;    WHEN l.Lethality BETWEEN 1 AND 9.99 THEN '(B) 1-9.99'&#9;&#9;
&#9;    WHEN l.Lethality BETWEEN 10 AND 49.99 THEN '(C) 10-49.99'&#9;&#9;
&#9;    WHEN l.Lethality BETWEEN 50 AND 89.99 THEN '(D) 50-89.99'&#9;&#9;
&#9;    WHEN l.Lethality BETWEEN 90 AND 99.99 THEN '(E) 90-99.99'&#9;&#9;
&#9;    WHEN l.Lethality &gt;= 100 THEN '(F) 100+'&#9;&#9;
      END &#9;&#9;&#9;
    GROUP BY&#9;&#9;&#9;
      cate.LethalityGroup&#9;&#9;&#9;
&#9;  ),&#9;&#9;
&#9;  LethalityTable3 AS (&#9;&#9;
&#9;  SELECT LethalityGroup&#9;&#9;
&#9;       , Amount&#9;&#9;
&#9;   , CAST(Amount AS DECIMAL(10,4))&#9;&#9;
&#9;     /&#9;&#9;
&#9; (SELECT CAST(SUM(Amount) AS DECIMAL(10,4))&#9;&#9;
&#9;      FROM LethalityTable2)*100&#9;&#9;
&#9;  AS "Percent"&#9;&#9;
       FROM LethalityTable2&#9;&#9;&#9;
&#9;   )&#9;&#9;
SELECT LethalityGroup&#9;&#9;&#9;
&#9;   , Amount&#9;&#9;
&#9;   , ROUND("Percent",2) AS "Percent"&#9;&#9;
FROM LethalityTable3</code></pre><p></p><p>Answer #6: <strong>Produce the same final output of the previous question (question #5), but this time, in the formation as shown at the desired output.</strong></p><p>Solution code below:</p><pre><code>WITH AggregatedTable AS ( --Grouped for aggregation and changed integer into decimal for rates&#9;&#9;
    SELECT &#9;&#9;
        serverName&#9;&#9;
        , race&#9;&#9;
        , CAST(SUM(lastWeekKilledPlayers) AS DECIMAL(13,3)) AS sumKilledPlayers&#9;&#9;
        , CAST(SUM(lastWeekKilledbyPlayers) AS DECIMAL(13,3)) AS sumPlayersKilled&#9;&#9;
    FROM killstats&#9;&#9;
    GROUP BY &#9;&#9;
        serverName&#9;&#9;
        , race&#9;&#9;
)&#9;&#9;
, StagedBossesMerger AS (--sumPlayersKilled equal zero reveals list of creatures which &#9;&#9;
    --cannot be killed at all or that got different forms before they can be killed in their final form.&#9;&#9;
   --the CASE WHEN merged the different forms into the Killable-form.&#9;&#9;
   --the HAVING part removed the UnKillable Creatures.&#9;&#9;
   --And yes, to figure it out, there was a need to manual check on wiki-fandom website.&#9;&#9;
  SELECT &#9;&#9;
    CASE&#9;&#9;
        WHEN race IN ('Urmahlullu the Immaculate', 'Wisdom of Urmahlullu', 'Urmahlullu the Tamed', 'Wildness of Urmahlullu') THEN 'Urmahlullu the Weakened'&#9;&#9;
        WHEN race IN ('Dragonking Zyrtarch') THEN 'Soul of Dragonking Zyrtarch'&#9;&#9;
        WHEN race IN ('Channeling Earl Osam') THEN 'Earl Osam'&#9;&#9;
        WHEN race IN ('Charged Anomaly') THEN 'Anomaly'&#9;&#9;
        WHEN race IN ('glooth powered minotaurs') THEN 'Depowered Minotaur'&#9;&#9;
        WHEN race IN ('The Fire Empowered Duke') THEN 'The Duke Of The Depths'&#9;&#9;
        ELSE race&#9;&#9;
    END AS race&#9;&#9;
    , SUM(sumKilledPlayers) AS sumKilledPlayers&#9;&#9;
&#9;, SUM(sumPlayersKilled) AS sumPlayersKilled&#9;
FROM AggregatedTable&#9;&#9;
GROUP BY&#9;&#9;
    CASE&#9;&#9;
        WHEN race IN ('Urmahlullu the Immaculate', 'Wisdom of Urmahlullu', 'Urmahlullu the Tamed', 'Wildness of Urmahlullu') THEN 'Urmahlullu the Weakened'&#9;&#9;
        WHEN race IN ('Dragonking Zyrtarch') THEN 'Soul of Dragonking Zyrtarch'&#9;&#9;
        WHEN race IN ('Channeling Earl Osam') THEN 'Earl Osam'&#9;&#9;
        WHEN race IN ('Charged Anomaly') THEN 'Anomaly'&#9;&#9;
        WHEN race IN ('glooth powered minotaurs') THEN 'Depowered Minotaur'&#9;&#9;
        WHEN race IN ('The Fire Empowered Duke') THEN 'The Duke Of The Depths'&#9;&#9;
        ELSE race&#9;&#9;
    END &#9;&#9;
&#9;HAVING SUM(sumPlayersKilled) &gt; 0&#9;
&#9;)&#9;
&#9;, LethalityTable AS (&#9;
&#9;SELECT race&#9;
&#9;, ROUND((sumKilledPlayers/sumPlayersKilled)*100,2) AS Lethality&#9;
    FROM StagedBossesMerger&#9;&#9;
    WHERE sumKilledPlayers+sumPlayersKilled &gt;= 30 ---threshold&#9;&#9;
    ),&#9;&#9;
&#9;LethalityAmount AS (&#9;
&#9;SELECT&#9;
    COUNT(CASE WHEN Lethality BETWEEN 0 AND 0.99 THEN 1 END) 
    AS '(A) 0-0.99'&#9;&#9;
&#9;, COUNT(CASE WHEN Lethality BETWEEN 1 AND 9.99 THEN 1 END) 
    AS '(B) 1-9.99'&#9;
&#9;, COUNT(CASE WHEN Lethality BETWEEN 10 AND 49.99 THEN 1 END) 
    AS '(C) 10-49.99'&#9;
&#9;, COUNT(CASE WHEN Lethality BETWEEN 50 AND 89.99 THEN 1 END) 
    AS '(D) 50-89.99'&#9;
&#9;, COUNT(CASE WHEN Lethality BETWEEN 90 AND 99.99 THEN 1 END) 
    AS '(E) 90-99.99'&#9;
&#9;, COUNT(CASE WHEN Lethality &gt;= 100 THEN 1 END) 
    AS '(F) 100+'&#9;
&#9;FROM LethalityTable&#9;
&#9;),&#9;
&#9;LethalityPercent AS (&#9;
&#9;SELECT &#9;
&#9; (SELECT CAST(COUNT(CASE WHEN Lethality BETWEEN 0 AND 0.99 THEN 1 END) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  /&#9;
&#9; (SELECT CAST(COUNT(race) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  AS '(A) 0-0.99'&#9;
&#9; ,&#9;
&#9; (SELECT CAST(COUNT(CASE WHEN Lethality BETWEEN 1 AND 9.99 THEN 1 END) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  /&#9;
&#9; (SELECT CAST(COUNT(race) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  AS '(B) 1-9.99'&#9;
&#9; ,&#9;
&#9; (SELECT CAST(COUNT(CASE WHEN Lethality BETWEEN 10 AND 49.99 THEN 1 END) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  /&#9;
&#9; (SELECT CAST(COUNT(race) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  AS '(C) 10-49.99'&#9;
&#9; ,&#9;
&#9; (SELECT CAST(COUNT(CASE WHEN Lethality BETWEEN 50 AND 89.99 THEN 1 END) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  /&#9;
&#9; (SELECT CAST(COUNT(race) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  AS '(D) 50-89.99'&#9;
&#9;  ,&#9;
&#9; (SELECT CAST(COUNT(CASE WHEN Lethality BETWEEN 90 AND 99.99 THEN 1 END) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  /&#9;
&#9; (SELECT CAST(COUNT(race) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  AS '(E) 90-99.99'&#9;
&#9; ,&#9;
&#9; (SELECT CAST(COUNT(CASE WHEN Lethality &gt;= 100 THEN 1 END) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  /&#9;
&#9; (SELECT CAST(COUNT(race) AS DECIMAL(8,2)) FROM LethalityTable)&#9;
&#9;  AS '(F) 100+'&#9;
 )&#9;&#9;
SELECT *&#9;&#9;
FROM LethalityAmount&#9;&#9;
UNION ALL&#9;&#9;
SELECT *&#9;&#9;
FROM LethalityPercent</code></pre><p></p><p>(Bonus?) Answer 7#: <strong>Examine players' deaths at different servers (PvP Type &amp; Location). Provide one or two interesting insight(s).</strong></p><p>The insight I chose to show was that players on South American servers die to PvE (Player versus the Environment) significantly more than players on North American &amp; European servers. This can be seen at Open PvP, Retro Open PvP and Retro Hardcore PvP. But I chose to illustrate this with the Open PvP servers:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!iiVl!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9e1f65b-e2a3-45fc-9876-ea120bf14af2_445x159.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!iiVl!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9e1f65b-e2a3-45fc-9876-ea120bf14af2_445x159.png 424w, https://substackcdn.com/image/fetch/$s_!iiVl!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9e1f65b-e2a3-45fc-9876-ea120bf14af2_445x159.png 848w, https://substackcdn.com/image/fetch/$s_!iiVl!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9e1f65b-e2a3-45fc-9876-ea120bf14af2_445x159.png 1272w, https://substackcdn.com/image/fetch/$s_!iiVl!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9e1f65b-e2a3-45fc-9876-ea120bf14af2_445x159.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!iiVl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9e1f65b-e2a3-45fc-9876-ea120bf14af2_445x159.png" width="445" height="159" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/e9e1f65b-e2a3-45fc-9876-ea120bf14af2_445x159.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:159,&quot;width&quot;:445,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!iiVl!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9e1f65b-e2a3-45fc-9876-ea120bf14af2_445x159.png 424w, https://substackcdn.com/image/fetch/$s_!iiVl!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9e1f65b-e2a3-45fc-9876-ea120bf14af2_445x159.png 848w, https://substackcdn.com/image/fetch/$s_!iiVl!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9e1f65b-e2a3-45fc-9876-ea120bf14af2_445x159.png 1272w, https://substackcdn.com/image/fetch/$s_!iiVl!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fe9e1f65b-e2a3-45fc-9876-ea120bf14af2_445x159.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">results for open pvp servers</figcaption></figure></div><p>I wonder if the reason for it is a bad internet infrastructure.</p><p>Anyhow, below is most of the SQL code used for the evaluation:</p><ul><li><p>Question #E</p></li><li><p>And \/</p></li></ul><pre><code>WITH step1 AS (&#9;
SELECT servLocation&#9;
, pvpType&#9;
, CASE WHEN (race = 'players') THEN 'PvP' --P for Players&#9;
  ELSE 'PvE' --E for Environment &#9;
  END AS DeathType&#9;
, SUM(lastWeekKilledPlayers) AS Total_Players_Killed_TYPE&#9;
, CONCAT(&#9;
   CAST(&#9;
    FORMAT(&#9;
&#9; ROUND(
          (&#9;
          CAST(SUM(lastWeekKilledPlayers) AS DECIMAL(18,2))&#9;
          / &#9;
          CAST(SUM(SUM(lastWeekKilledPlayers)) OVER (PARTITION BY pvpType, servLocation) AS DECIMAL(18,2))&#9;
           )*100 --multiply by 100 for Percent&#9;
     , 2) --round to 2 digits past period&#9;
    , 'F' --to Format the digit in a way which eliminates the 0 trailing after the 2 rounded digits  &#9;
   ) AS VARCHAR --turn to String for CONCAT to work &#9;
   ), '%' --added % sign with CONCAT to signal percent   &#9;
   ) AS Percent_Players_Killed_TYPE&#9;
FROM killstats&#9;
JOIN worlds&#9;
ON killstats.serverName = worlds.worldName&#9;
GROUP BY servLocation&#9;
  , pvpType&#9;
  , CASE WHEN (race = 'players') THEN 'PvP'&#9;
  ELSE 'PvE' END&#9;
)&#9;
SELECT pvpType&#9;
      , servLocation&#9;
&#9;  , DeathType
&#9;  , Percent_Players_Killed_TYPE
FROM step1&#9;
ORDER BY pvpType DESC</code></pre><div><hr></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share novsto&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share novsto</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/tibia-sql-data-analysis-practice-3?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/tibia-sql-data-analysis-practice-3?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p>That&#8217;s it for the Tibia SQL Data Analysis Practice. I hope you enjoyed the questions and this practice. </p><p>The data gives ways to do more interesting analysis, I&#8217;m sure of it. Feel free to drop suggestions at the comments or contact me directly via e-mail or LinkedIn.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.linkedin.com/in/shahaf-rabi/&quot;,&quot;text&quot;:&quot;LinkedIn&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.linkedin.com/in/shahaf-rabi/"><span>LinkedIn</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/tibia-sql-data-analysis-practice-3/comments&quot;,&quot;text&quot;:&quot;Leave a comment&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/tibia-sql-data-analysis-practice-3/comments"><span>Leave a comment</span></a></p>]]></content:encoded></item><item><title><![CDATA[Tibia SQL Data Analysis: Practice #2]]></title><description><![CDATA[SQL, Excel, Tableau]]></description><link>https://www.novsto.com/p/tibia-sql-data-analysis-practice-2</link><guid isPermaLink="false">https://www.novsto.com/p/tibia-sql-data-analysis-practice-2</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Wed, 07 Jun 2023 15:15:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hPWA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Practice some SQL, data analysis and visualizations! This is going to be split into a series of practices. Practice #1 and #2 are quite easy, serving as warm-ups.</p><p>You can download the datasets below.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share novsto&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share novsto</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/tibia-sql-data-analysis-practice-2?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.novsto.com/p/tibia-sql-data-analysis-practice-2?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hPWA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hPWA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 424w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 848w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 1272w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hPWA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png" width="884" height="477" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:477,&quot;width&quot;:884,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hPWA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 424w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 848w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 1272w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1: Tibia Server Growth Throughout The Years</figcaption></figure></div><ul><li><p>1997: The start</p></li><li><p>2002: Expansion to&nbsp;North America</p></li><li><p>until 2005: Experiencing meteoric&nbsp;growth</p></li><li><p>until 2013: Slower steady growth</p></li><li><p>2014: The big shrink</p></li><li><p>2016: Introduction of South American servers; slow recovery starts</p></li><li><p>2018: South America grows; Europe and North America continues to shrink</p></li><li><p>2021: South America outgrows Europe and North America</p></li><li><p>2023: All times high</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:&quot;button-wrapper&quot;}" data-component-name="ButtonCreateButton"><a class="button primary button-wrapper" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><h1>The Data</h1><p>Download the three datasets (CSV):</p><ol><li><p><a href="https://drive.google.com/file/d/16YIMzz6Wtcm0h7163ptQUHmMQ09BjIAq/view?usp=sharing">Tibia Kill Statistics</a>.</p></li><li><p><a href="https://drive.google.com/file/d/16PHh93eYxmrI_REPA6t4kMI20q8C58I_/view?usp=sharing">Tibia Game World Servers</a>.</p></li><li><p><a href="https://drive.google.com/file/d/1VpzkEH-6OdNdqBRenARUn8l_rh2UpqL0/view?usp=sharing">Tibia Deprecated Servers</a>.&nbsp;</p></li></ol><p>You may copy the table creation and data loading from <a href="https://www.novsto.com/p/tibia-sql-data-analysis-practice1">Practice #1</a>.</p><h1>Practice #2: Second SQL warm-up</h1><p>For this warm up, use the dataset: <em>Tibia Game Worlds Server</em></p><h3>The Questions</h3><p>(the answers are provided at the bottom,  section called &#8220;The Answers&#8221;)</p><p>Question #F:&nbsp;<strong>What's the oldest server? Show: worldname, date, servLocation, pvpType.</strong></p><p>Desired output:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!njUU!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7381c8af-412c-4b12-b373-dee9389b5a15_383x37.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!njUU!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7381c8af-412c-4b12-b373-dee9389b5a15_383x37.png 424w, https://substackcdn.com/image/fetch/$s_!njUU!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7381c8af-412c-4b12-b373-dee9389b5a15_383x37.png 848w, https://substackcdn.com/image/fetch/$s_!njUU!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7381c8af-412c-4b12-b373-dee9389b5a15_383x37.png 1272w, https://substackcdn.com/image/fetch/$s_!njUU!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7381c8af-412c-4b12-b373-dee9389b5a15_383x37.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!njUU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7381c8af-412c-4b12-b373-dee9389b5a15_383x37.png" width="383" height="37" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/7381c8af-412c-4b12-b373-dee9389b5a15_383x37.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:37,&quot;width&quot;:383,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!njUU!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7381c8af-412c-4b12-b373-dee9389b5a15_383x37.png 424w, https://substackcdn.com/image/fetch/$s_!njUU!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7381c8af-412c-4b12-b373-dee9389b5a15_383x37.png 848w, https://substackcdn.com/image/fetch/$s_!njUU!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7381c8af-412c-4b12-b373-dee9389b5a15_383x37.png 1272w, https://substackcdn.com/image/fetch/$s_!njUU!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F7381c8af-412c-4b12-b373-dee9389b5a15_383x37.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Question #G:&nbsp;<strong>Which are the three newest servers? Show: worldname, date, location, pvpType.</strong></p><p>Desired output:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!gJPt!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7ebb464-919c-4c1a-904a-b719e6de3f40_397x75.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!gJPt!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7ebb464-919c-4c1a-904a-b719e6de3f40_397x75.png 424w, https://substackcdn.com/image/fetch/$s_!gJPt!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7ebb464-919c-4c1a-904a-b719e6de3f40_397x75.png 848w, https://substackcdn.com/image/fetch/$s_!gJPt!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7ebb464-919c-4c1a-904a-b719e6de3f40_397x75.png 1272w, https://substackcdn.com/image/fetch/$s_!gJPt!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7ebb464-919c-4c1a-904a-b719e6de3f40_397x75.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!gJPt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7ebb464-919c-4c1a-904a-b719e6de3f40_397x75.png" width="397" height="75" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c7ebb464-919c-4c1a-904a-b719e6de3f40_397x75.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:75,&quot;width&quot;:397,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!gJPt!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7ebb464-919c-4c1a-904a-b719e6de3f40_397x75.png 424w, https://substackcdn.com/image/fetch/$s_!gJPt!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7ebb464-919c-4c1a-904a-b719e6de3f40_397x75.png 848w, https://substackcdn.com/image/fetch/$s_!gJPt!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7ebb464-919c-4c1a-904a-b719e6de3f40_397x75.png 1272w, https://substackcdn.com/image/fetch/$s_!gJPt!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc7ebb464-919c-4c1a-904a-b719e6de3f40_397x75.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Question #H:&nbsp;<strong>What is the newest and oldest server for each server location? Show: worldname, location, date. Display from the oldest to the newest.</strong></p><p>Desired output:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!R5oH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0490815-0fb7-46b9-898a-aeb9ff238825_332x155.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!R5oH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0490815-0fb7-46b9-898a-aeb9ff238825_332x155.png 424w, https://substackcdn.com/image/fetch/$s_!R5oH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0490815-0fb7-46b9-898a-aeb9ff238825_332x155.png 848w, https://substackcdn.com/image/fetch/$s_!R5oH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0490815-0fb7-46b9-898a-aeb9ff238825_332x155.png 1272w, https://substackcdn.com/image/fetch/$s_!R5oH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0490815-0fb7-46b9-898a-aeb9ff238825_332x155.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!R5oH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0490815-0fb7-46b9-898a-aeb9ff238825_332x155.png" width="332" height="155" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a0490815-0fb7-46b9-898a-aeb9ff238825_332x155.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:155,&quot;width&quot;:332,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!R5oH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0490815-0fb7-46b9-898a-aeb9ff238825_332x155.png 424w, https://substackcdn.com/image/fetch/$s_!R5oH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0490815-0fb7-46b9-898a-aeb9ff238825_332x155.png 848w, https://substackcdn.com/image/fetch/$s_!R5oH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0490815-0fb7-46b9-898a-aeb9ff238825_332x155.png 1272w, https://substackcdn.com/image/fetch/$s_!R5oH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa0490815-0fb7-46b9-898a-aeb9ff238825_332x155.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Question #I: <strong>What's the newest and oldest server for each server location and PvP type? Show: server location ASC, PvO type DESC, date ASC, worldname.</strong></p><p>Desired output:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TcQf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfe5b4d0-672b-4441-ac2a-67150e44ef68_474x560.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TcQf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfe5b4d0-672b-4441-ac2a-67150e44ef68_474x560.png 424w, https://substackcdn.com/image/fetch/$s_!TcQf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfe5b4d0-672b-4441-ac2a-67150e44ef68_474x560.png 848w, https://substackcdn.com/image/fetch/$s_!TcQf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfe5b4d0-672b-4441-ac2a-67150e44ef68_474x560.png 1272w, https://substackcdn.com/image/fetch/$s_!TcQf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfe5b4d0-672b-4441-ac2a-67150e44ef68_474x560.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TcQf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfe5b4d0-672b-4441-ac2a-67150e44ef68_474x560.png" width="474" height="560" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/cfe5b4d0-672b-4441-ac2a-67150e44ef68_474x560.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:560,&quot;width&quot;:474,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TcQf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfe5b4d0-672b-4441-ac2a-67150e44ef68_474x560.png 424w, https://substackcdn.com/image/fetch/$s_!TcQf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfe5b4d0-672b-4441-ac2a-67150e44ef68_474x560.png 848w, https://substackcdn.com/image/fetch/$s_!TcQf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfe5b4d0-672b-4441-ac2a-67150e44ef68_474x560.png 1272w, https://substackcdn.com/image/fetch/$s_!TcQf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fcfe5b4d0-672b-4441-ac2a-67150e44ef68_474x560.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p></p><h3>The Answers</h3><p>Answer #F:&nbsp;<strong>What's the oldest server? Show: worldname, date, servLocation, pvpType.</strong></p><p>Solution code below:</p><pre><code>SELECT TOP 1 worldName
  , serverCETCreatedDate
  , servLocation
  , pvpType
FROM worlds
ORDER BY 2 ASC</code></pre><p>Answer #G:&nbsp;<strong>Which are the three newest servers? Show: worldname, date, location, pvpType.</strong></p><p>Solution code below:</p><pre><code>SELECT TOP 3 worldName
  , serverCETCreatedDate
  , servLocation
  , pvpType
FROM worlds
ORDER BY 2 DESC</code></pre><p>Answer #H:&nbsp;<strong>What is the newest and oldest server for each server location? Show: worldname, location, date. Display from the oldest to the newest.</strong></p><p>Solution code below:</p><pre><code>WITH dateAndLocation AS (
SELECT MIN(serverCETCreatedDate) AS earliest&#9;
       , servLocation&#9;
       , MAX(serverCETCreatedDate) AS latest&#9;
FROM worlds&#9;
GROUP BY servLocation&#9;
)&#9;
SELECT worldname
       , worlds.servLocation
       , serverCETCreatedDate&#9;
FROM worlds&#9;
JOIN dateAndLocation&#9;
ON worlds.servLocation = dateAndLocation.servLocation &#9;
       AND (
       (worlds.serverCETCreatedDate = dateAndLocation.earliest) 
       OR (worlds.serverCETCreatedDate = dateAndLocation.latest)
)&#9;
ORDER BY 3&#9;</code></pre><p>Answer #I: <strong>What's the newest and oldest server for each server location and PvP type? Show: server location ASC, PvO type DESC, date ASC, worldname.</strong></p><p>Solution code below:</p><pre><code>WITH dateAndLocation AS (
SELECT MIN(serverCETCreatedDate) AS earliest
  , pvpType
  , servLocation
  , MAX(serverCETCreatedDate) AS latest
FROM worlds
GROUP BY servlocation, pvpType
)
SELECT worlds.servLocation
  , worlds.pvpType
  , serverCETCreatedDate
  , worldName
FROM worlds
JOIN dateAndLocation
ON worlds.pvpType = dateAndLocation.pvpType
  AND worlds.servLocation = dateAndLocation.servLocation
  AND (
  (worlds.serverCETCreatedDate = dateAndLocation.earliest) 
  OR (worlds.serverCETCreatedDate = dateAndLocation.latest)
)
ORDER BY 1, 2 DESC, 3</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/tibia-sql-data-analysis-practice-2?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/tibia-sql-data-analysis-practice-2?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p></p><p></p>]]></content:encoded></item><item><title><![CDATA[Tibia SQL Data Analysis: Practice #1]]></title><description><![CDATA[SQL, Excel, Tableau]]></description><link>https://www.novsto.com/p/tibia-sql-data-analysis-practice1</link><guid isPermaLink="false">https://www.novsto.com/p/tibia-sql-data-analysis-practice1</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Tue, 06 Jun 2023 13:46:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!hPWA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Practice some SQL, data analysis and visualizations! This is going to be split into a series of practices. Practice #1 and #2 are quite easy, serving as warm-ups.</p><p>You can download the datasets below.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share novsto&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share novsto</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/tibia-sql-data-analysis-practice1?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/tibia-sql-data-analysis-practice1?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p><a href="https://www.tibia.com/">Tibia</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> is a massive multiplayer online role-playing game (MMORPG) that exists since <a href="https://en.wikipedia.org/wiki/Tibia_(video_game)">1997</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a>! (and also name of a <a href="https://en.wikipedia.org/wiki/Tibia">bone</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> =) ).</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hPWA!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hPWA!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 424w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 848w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 1272w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hPWA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png" width="884" height="477" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:477,&quot;width&quot;:884,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hPWA!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 424w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 848w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 1272w, https://substackcdn.com/image/fetch/$s_!hPWA!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F766203b0-1b42-42f5-9d11-b6d7cd3564dd_884x477.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1: Tibia Server Growth Throughout The Years</figcaption></figure></div><ul><li><p>1997: The start</p></li><li><p>2002: Expansion to&nbsp;North America</p></li><li><p>until 2005: Experiencing meteoric&nbsp;growth</p></li><li><p>until 2013: Slower steady growth</p></li><li><p>2014: The big shrink</p></li><li><p>2016: Introduction of South American servers; slow recovery starts</p></li><li><p>2018: South America grows; Europe and North America continues to shrink</p></li><li><p>2021: South America outgrows Europe and North America</p></li><li><p>2023: All times high</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><h1>Get the data &amp; load it</h1><p>Download the three datasets (CSV):</p><ol><li><p><a href="https://drive.google.com/file/d/16YIMzz6Wtcm0h7163ptQUHmMQ09BjIAq/view?usp=sharing">Tibia Kill Statistics</a>.</p></li><li><p><a href="https://drive.google.com/file/d/16PHh93eYxmrI_REPA6t4kMI20q8C58I_/view?usp=sharing">Tibia Game World Servers</a>.</p></li><li><p><a href="https://drive.google.com/file/d/1VpzkEH-6OdNdqBRenARUn8l_rh2UpqL0/view?usp=sharing">Tibia Deprecated Servers</a>.&nbsp;</p></li></ol><p>I used <a href="https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver16">Microsoft's SQL Server Management Studio</a>,<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> so you may need to convert the code from Transact SQL to whatever version you use. I suppose ChatGPT could do that fairly fast and easily.</p><h2>Create the tables, load the data</h2><pre><code>--DROP TABLE "worlds"
IF OBJECT_ID('worlds', 'U') IS NOT NULL
DROP TABLE worlds
------
------
CREATE TABLE worlds (
   worldName VARCHAR(10) NOT NULL,
   PRIMARY KEY (worldName),
   onlineRecord INT,
   onlineRecordDate DATE, --- in CET timezone
   servLocation VARCHAR(15), --- "serv" as in short of "server"
   pvpType VARCHAR(25), ---PvP = Player versus Player
   serverCETCreatedDate DATE, ---CET = Central European Time; and
 ---Day set to 1st (DD/MM/YYYY) as default due to data inavailability
   additionalInformation VARCHAR(250)
);
-----
-----
---LOAD CSV Tibia Game World Servers to load worlds table (of table)
BULK INSERT worlds
FROM 'C:\Users\...\Tibia Game World Servers.csv'
WITH (
FORMAT='CSV',
FIRSTROW=2
);
------
------
------
--DROP TABLE "killstats"
IF OBJECT_ID('killstats', 'U') IS NOT NULL
DROP TABLE killstats
------
------
CREATE TABLE killstats (
 serverName VARCHAR(10) NOT NULL,
  -- PRIMARY KEY (serverName),
 race VARCHAR(30) NOT NULL,
 lastDayKilledPlayers INT,
 lastDayKilledbyPlayers INT,
 lastWeekKilledPlayers INT,
 lastWeekKilledbyPlayers INT,
 WeekNumber INT
);
-----
-----
---LOAD CSV Tibia Kill Statistics to load killstats table (of table)
BULK INSERT killstats
FROM 'C:\Users\...\Tibia Kill Statistics.csv'
WITH (
FORMAT='CSV',
FIRSTROW=2
);
------
------
------
--DROP TABLE "oldservers"
IF OBJECT_ID('oldservers', 'U') IS NOT NULL
DROP TABLE oldservers
------
------
CREATE TABLE oldservers (
 servName VARCHAR(10) NOT NULL,
 located VARCHAR(15),
 servType VARCHAR(20), ---PvP = Player versus Player
 onlineSince DATE,
 offlineSince DATE
);
-----
-----
---LOAD CSV Tibia Deprecated Servers to load oldservers table (of table)
BULK INSERT oldservers
FROM 'C:\Users\...\Tibia Deprecated Servers.csv'
WITH (
FORMAT='CSV',
FIRSTROW=2
);
------
------
------</code></pre><h1>Practice #1: First SQL warm-up</h1><p>For this warm up, use the dataset: <em>Tibia Game Worlds Server</em></p><h3>The Questions</h3><p>(the answers are provided at the bottom,  section called &#8220;The Answers&#8221;)</p><p>Question #A:&nbsp;<strong>How many game world servers are there currently in Tibia?</strong>&nbsp;</p><p>Desired output:</p><p>&nbsp; Number_of_online_worlds</p><p>&nbsp; 88</p><p>Question #B:&nbsp;<strong>How many unique PvP types of game world servers are there currently in Tibia?</strong></p><p>Desired output:</p><p>&nbsp; Pvp_Types_Number</p><p>&nbsp; 5</p><p>Question #C:&nbsp;<strong>How many current worlds are there per PvP Type?</strong></p><p>Desired output:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!b2hP!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F768680ea-5fea-4fae-980a-dc0577d679b7_307x118.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!b2hP!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F768680ea-5fea-4fae-980a-dc0577d679b7_307x118.png 424w, https://substackcdn.com/image/fetch/$s_!b2hP!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F768680ea-5fea-4fae-980a-dc0577d679b7_307x118.png 848w, https://substackcdn.com/image/fetch/$s_!b2hP!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F768680ea-5fea-4fae-980a-dc0577d679b7_307x118.png 1272w, https://substackcdn.com/image/fetch/$s_!b2hP!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F768680ea-5fea-4fae-980a-dc0577d679b7_307x118.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!b2hP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F768680ea-5fea-4fae-980a-dc0577d679b7_307x118.png" width="307" height="118" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/768680ea-5fea-4fae-980a-dc0577d679b7_307x118.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:118,&quot;width&quot;:307,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!b2hP!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F768680ea-5fea-4fae-980a-dc0577d679b7_307x118.png 424w, https://substackcdn.com/image/fetch/$s_!b2hP!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F768680ea-5fea-4fae-980a-dc0577d679b7_307x118.png 848w, https://substackcdn.com/image/fetch/$s_!b2hP!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F768680ea-5fea-4fae-980a-dc0577d679b7_307x118.png 1272w, https://substackcdn.com/image/fetch/$s_!b2hP!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F768680ea-5fea-4fae-980a-dc0577d679b7_307x118.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Question #D:&nbsp;<strong>How many worlds are there currently in Tibia per server location?</strong></p><p>Desired output:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!CaO6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b00987c-1e32-447a-b887-54b6eac40be9_304x80.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!CaO6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b00987c-1e32-447a-b887-54b6eac40be9_304x80.png 424w, https://substackcdn.com/image/fetch/$s_!CaO6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b00987c-1e32-447a-b887-54b6eac40be9_304x80.png 848w, https://substackcdn.com/image/fetch/$s_!CaO6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b00987c-1e32-447a-b887-54b6eac40be9_304x80.png 1272w, https://substackcdn.com/image/fetch/$s_!CaO6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b00987c-1e32-447a-b887-54b6eac40be9_304x80.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!CaO6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b00987c-1e32-447a-b887-54b6eac40be9_304x80.png" width="304" height="80" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6b00987c-1e32-447a-b887-54b6eac40be9_304x80.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:80,&quot;width&quot;:304,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!CaO6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b00987c-1e32-447a-b887-54b6eac40be9_304x80.png 424w, https://substackcdn.com/image/fetch/$s_!CaO6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b00987c-1e32-447a-b887-54b6eac40be9_304x80.png 848w, https://substackcdn.com/image/fetch/$s_!CaO6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b00987c-1e32-447a-b887-54b6eac40be9_304x80.png 1272w, https://substackcdn.com/image/fetch/$s_!CaO6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6b00987c-1e32-447a-b887-54b6eac40be9_304x80.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a></figure></div><p>Question #E:&nbsp;<strong>How many current online worlds are there per server location and PvP type?<br>Please display the results from the most to the least amount of servers.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!xO98!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5a07115-f940-4ba3-b9f5-55ddfbe4c908_400x248.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!xO98!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5a07115-f940-4ba3-b9f5-55ddfbe4c908_400x248.png 424w, https://substackcdn.com/image/fetch/$s_!xO98!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5a07115-f940-4ba3-b9f5-55ddfbe4c908_400x248.png 848w, https://substackcdn.com/image/fetch/$s_!xO98!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5a07115-f940-4ba3-b9f5-55ddfbe4c908_400x248.png 1272w, https://substackcdn.com/image/fetch/$s_!xO98!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5a07115-f940-4ba3-b9f5-55ddfbe4c908_400x248.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!xO98!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5a07115-f940-4ba3-b9f5-55ddfbe4c908_400x248.png" width="400" height="248" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/b5a07115-f940-4ba3-b9f5-55ddfbe4c908_400x248.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:248,&quot;width&quot;:400,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!xO98!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5a07115-f940-4ba3-b9f5-55ddfbe4c908_400x248.png 424w, https://substackcdn.com/image/fetch/$s_!xO98!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5a07115-f940-4ba3-b9f5-55ddfbe4c908_400x248.png 848w, https://substackcdn.com/image/fetch/$s_!xO98!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5a07115-f940-4ba3-b9f5-55ddfbe4c908_400x248.png 1272w, https://substackcdn.com/image/fetch/$s_!xO98!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fb5a07115-f940-4ba3-b9f5-55ddfbe4c908_400x248.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/tibia-sql-data-analysis-practice1?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/tibia-sql-data-analysis-practice1?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><h3>The Answers</h3><p>Answer #A:&nbsp;<strong>How many game world servers are there currently in Tibia?</strong>&nbsp;</p><p>Solution code below: </p><pre><code>SELECT count(worldname) AS Number_of_online_worlds
FROM worlds</code></pre><p>Answer #B:&nbsp;<strong>How many unique PvP types of game world servers are there currently in Tibia?</strong></p><p>Solution code below:</p><pre><code>SELECT COUNT(DISTINCT pvpType) AS PvP_Types_Number
FROM worlds</code></pre><p>Answer #C:&nbsp;<strong>How many current worlds are there per PvP Type?</strong></p><pre><code>Solution code below: (in white letters)
SELECT pvpType
,COUNT(worldname) AS Number_of_online_worlds
FROM worlds
GROUP BY pvpType</code></pre><p>Answer #D:&nbsp;<strong>How many worlds are there currently in Tibia per server location?</strong></p><p>Solution code below:</p><pre><code>SELECT servLocation
,COUNT(worldname) AS Number_of_online_worlds
FROM worlds
GROUP BY servLocation</code></pre><p>Answer #E:&nbsp;<strong>How many current online worlds are there per server location and PvP type?</strong></p><p>Solution code below:</p><pre><code>SELECT servLocation
, pvpType
,COUNT(worldname) AS Number_of_online_worlds
FROM worlds
GROUP BY servLocation, pvpType
ORDER BY 3 DESC</code></pre><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/tibia-sql-data-analysis-practice1?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/tibia-sql-data-analysis-practice1?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share&quot;,&quot;text&quot;:&quot;Share novsto&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/?utm_source=substack&amp;utm_medium=email&amp;utm_content=share&amp;action=share"><span>Share novsto</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>www.tibia.com</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>https://en.wikipedia.org/wiki/Tibia_(video_game)</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>https://en.wikipedia.org/wiki/Tibia</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>https://learn.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver16</p><p></p></div></div>]]></content:encoded></item><item><title><![CDATA[SEO boost: Analyzing My Website's Google Search Performance Report (April 2023)]]></title><description><![CDATA[SQL, Excel (analysis), Excel (visualization)]]></description><link>https://www.novsto.com/p/seo-sql-analysis-google-search-performance-42023</link><guid isPermaLink="false">https://www.novsto.com/p/seo-sql-analysis-google-search-performance-42023</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Thu, 27 Apr 2023 12:20:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!lyYq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><strong>Want to practice? The <a href="https://drive.google.com/file/d/18xA8thwUnXKzPYLkFWJGcBxQifypYdss/view?usp=sharing">dataset is available for you here</a>!<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a></strong> You too can analyze it as I did, or in a different way, if you wish. </p><p>The data analysis was done, mostly, using SQL, and a bit with Excel. The visualizations were done with Excel.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.linkedin.com/in/shahaf-rabi/&quot;,&quot;text&quot;:&quot;let's connect! ping me on LinkedIn&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.linkedin.com/in/shahaf-rabi/"><span>let's connect! ping me on LinkedIn</span></a></p><ul><li><p><em>Side note: </em>Rumor has it that positions such as user acquisition manager, media buyer, and marketing analysts are relatively easy entry level positions for folks interested in being data analysts. I wasn&#8217;t one, but to know the basics of SEO, or Search Engine Optimization, is generally nice to know if you are active online.</p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/seo-sql-analysis-google-search-performance-42023?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/seo-sql-analysis-google-search-performance-42023?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p>I believe it was around early April 2023 when Google emailed me a summary of my website's, <a href="http://www.s-rabi.com">s-rabi.com</a>,<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a> <a href="https://search.google.com/search-console">Search Performance</a>.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> This seemed like a nice <strong>opportunity to analyze some interesting data and take action accordingly to improve my website / website ranking on google.</strong> So I did it :)</p><p><strong>After analyzing</strong> and discovering some insights, <strong>I took action</strong> and updated my website in order to rank better on Google and gain more traffic.</p><p>It&#8217;s not that my personal website has suddenly become an internet sensation, but <strong>there was certainly an improvement in terms of number of impressions, total clicks, average click-through-rate, and even average page-ranking position.</strong></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!lyYq!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!lyYq!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png 424w, https://substackcdn.com/image/fetch/$s_!lyYq!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png 848w, https://substackcdn.com/image/fetch/$s_!lyYq!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png 1272w, https://substackcdn.com/image/fetch/$s_!lyYq!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!lyYq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png" width="336" height="690" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:690,&quot;width&quot;:336,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:42222,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!lyYq!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png 424w, https://substackcdn.com/image/fetch/$s_!lyYq!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png 848w, https://substackcdn.com/image/fetch/$s_!lyYq!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png 1272w, https://substackcdn.com/image/fetch/$s_!lyYq!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F0f196ccf-7aae-4302-9121-41ac438e5df6_336x690.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!kcyf!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc24b3c48-5ac7-4a78-afd3-f08424426b3e_851x392.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!kcyf!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc24b3c48-5ac7-4a78-afd3-f08424426b3e_851x392.png 424w, https://substackcdn.com/image/fetch/$s_!kcyf!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc24b3c48-5ac7-4a78-afd3-f08424426b3e_851x392.png 848w, https://substackcdn.com/image/fetch/$s_!kcyf!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc24b3c48-5ac7-4a78-afd3-f08424426b3e_851x392.png 1272w, https://substackcdn.com/image/fetch/$s_!kcyf!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc24b3c48-5ac7-4a78-afd3-f08424426b3e_851x392.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!kcyf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc24b3c48-5ac7-4a78-afd3-f08424426b3e_851x392.png" width="851" height="392" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/c24b3c48-5ac7-4a78-afd3-f08424426b3e_851x392.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:392,&quot;width&quot;:851,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:71394,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!kcyf!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc24b3c48-5ac7-4a78-afd3-f08424426b3e_851x392.png 424w, https://substackcdn.com/image/fetch/$s_!kcyf!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc24b3c48-5ac7-4a78-afd3-f08424426b3e_851x392.png 848w, https://substackcdn.com/image/fetch/$s_!kcyf!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc24b3c48-5ac7-4a78-afd3-f08424426b3e_851x392.png 1272w, https://substackcdn.com/image/fetch/$s_!kcyf!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fc24b3c48-5ac7-4a78-afd3-f08424426b3e_851x392.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">time span: 6 months, late Feb to mid Aug 2023</figcaption></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h3>Terminology</h3><ul><li><p><strong><a href="https://support.google.com/webmasters/answer/7042828#click">Clicks</a></strong> is how many times a user clicked through into the website.</p></li><li><p><strong><a href="https://support.google.com/webmasters/answer/7042828#impressions">Impressions</a></strong> is how many times a user saw a link to the website in the search results.</p></li><li><p><strong>CTR</strong> (Click-Through Rate) is the percentage of impressions that resulted in a click ([clicks/impressions]*100).</p></li><li><p><strong><a href="https://support.google.com/webmasters/answer/7042828#position">Position</a></strong> is the average position of the website in the search results, based on its highest position whenever it appeared in a search.</p></li></ul><div><hr></div><h1>Getting To Know The Data</h1><p>I downloaded the web report for the maximum time: 24 Dec. 2021-24 Apr. 2023.</p><p>It was immediately clear that my first <a href="https://medivia.online/">Medivia</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> life-thread was the primary source of traffic.</p><p><strong>| Clicks | Top Pages</strong></p><p>| 478      | <a href="https://www.s-rabi.com/2021/03/medivia-journey.html">medivia-journey</a></p><p>| 8          | <a href="https://www.s-rabi.com/">home page</a></p><p>| 3          | <a href="https://www.s-rabi.com/search/label/Gaming">search/label/gaming</a></p><p>| 1          | <a href="https://www.s-rabi.com/2021/01/Tutorial-How-to-Host-Free-WordPress-Website-Google-Cloud-Platform.html">Tutorial-How-to-Host-Free-WordPress-Website-Google-Cloud-Platform</a></p><p>| 1          | <a href="https://www.s-rabi.com/2022/05/medivia-journey-lera-levels-201-300.html">medivia-journey-lera-levels-201-300</a></p><p>| 1          | <a href="https://www.s-rabi.com/2020/12/New-Old-Libya-R9X-Strike-Case-Revealed-US-Ramps-Up-Ninja-Bomb-Targeted-Killings.html">New-Old-Libya-R9X-Strike-Case-Revealed-US-Ramps-Up-Ninja-Bomb-Targeted-Killings</a></p><p>| 1          | <a href="https://www.s-rabi.com/p/welcome.html">welcome</a> (about me page)</p><div><hr></div><p>People from 42 different countries visited my website. The majority of them were from Brazil and Poland.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!e6A6!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde50dd52-d752-405e-b4ad-11f54b8a62bd_154x242.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!e6A6!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde50dd52-d752-405e-b4ad-11f54b8a62bd_154x242.png 424w, https://substackcdn.com/image/fetch/$s_!e6A6!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde50dd52-d752-405e-b4ad-11f54b8a62bd_154x242.png 848w, https://substackcdn.com/image/fetch/$s_!e6A6!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde50dd52-d752-405e-b4ad-11f54b8a62bd_154x242.png 1272w, https://substackcdn.com/image/fetch/$s_!e6A6!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde50dd52-d752-405e-b4ad-11f54b8a62bd_154x242.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!e6A6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde50dd52-d752-405e-b4ad-11f54b8a62bd_154x242.png" width="154" height="242" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/de50dd52-d752-405e-b4ad-11f54b8a62bd_154x242.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:242,&quot;width&quot;:154,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!e6A6!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde50dd52-d752-405e-b4ad-11f54b8a62bd_154x242.png 424w, https://substackcdn.com/image/fetch/$s_!e6A6!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde50dd52-d752-405e-b4ad-11f54b8a62bd_154x242.png 848w, https://substackcdn.com/image/fetch/$s_!e6A6!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde50dd52-d752-405e-b4ad-11f54b8a62bd_154x242.png 1272w, https://substackcdn.com/image/fetch/$s_!e6A6!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fde50dd52-d752-405e-b4ad-11f54b8a62bd_154x242.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">figure A: Traffic- Percent Per Country</figcaption></figure></div><p>I scoped in on the data for an overview of the performance trend. The best scenario would have been to see a trend in which the Positioning trend and the CTR move towards one another.</p><ul><li><p>Position improvement = decreasing numbers, website appearing higher in the search results; and&nbsp;</p></li><li><p>CTR improvement = increasing numbers, more clicks per impression).&nbsp;</p></li></ul><p>But this was not the case, as can be seen in the figure below:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!UhKZ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19bbc11f-0444-44c4-9f33-10b5bcf7341a_358x352.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!UhKZ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19bbc11f-0444-44c4-9f33-10b5bcf7341a_358x352.png 424w, https://substackcdn.com/image/fetch/$s_!UhKZ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19bbc11f-0444-44c4-9f33-10b5bcf7341a_358x352.png 848w, https://substackcdn.com/image/fetch/$s_!UhKZ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19bbc11f-0444-44c4-9f33-10b5bcf7341a_358x352.png 1272w, https://substackcdn.com/image/fetch/$s_!UhKZ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19bbc11f-0444-44c4-9f33-10b5bcf7341a_358x352.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!UhKZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19bbc11f-0444-44c4-9f33-10b5bcf7341a_358x352.png" width="358" height="352" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/19bbc11f-0444-44c4-9f33-10b5bcf7341a_358x352.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:352,&quot;width&quot;:358,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!UhKZ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19bbc11f-0444-44c4-9f33-10b5bcf7341a_358x352.png 424w, https://substackcdn.com/image/fetch/$s_!UhKZ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19bbc11f-0444-44c4-9f33-10b5bcf7341a_358x352.png 848w, https://substackcdn.com/image/fetch/$s_!UhKZ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19bbc11f-0444-44c4-9f33-10b5bcf7341a_358x352.png 1272w, https://substackcdn.com/image/fetch/$s_!UhKZ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F19bbc11f-0444-44c4-9f33-10b5bcf7341a_358x352.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">figure B: Quarterly CTR &amp; Position Trend</figcaption></figure></div><p>However, the data overall was not too bad as the website generally got more and more clicks.</p><p>This made me think that I needed to improve the SEO of the website because people were interested in its content. Yet there was a mismatch between their search words and the keywords used in my posts.</p><p>Therefore, I proceeded&nbsp; to analyzing the Google users search queries made by the people who visited my website.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><h1>Preparing The Data For Analysis</h1><p>I downloaded the data as a CSV. <a href="https://drive.google.com/file/d/18xA8thwUnXKzPYLkFWJGcBxQifypYdss/view?usp=sharing">Available here for you too &lt;click here&gt;</a>.</p><h4>CSV Stage</h4><p>I first used the =LEN(...) to identify the strings length per query.&nbsp;</p><p>I then used the =MAX(...) to identify the maximum length.&nbsp;</p><p>That was used to determine the length of the variable named TopQueries.&nbsp;</p><p>In this case, VARCHAR 55 since the lengthiest was 54.</p><p>Afterwards, I eliminated the percentage format for the CTR variable (%) and changed it to General. I then defined accordingly the CTR variable as DECIMAL(5,4).</p><h4>Microsoft SQL Server Management Studio Table Creation</h4><pre><code>IF OBJECT_ID('Queries', 'U') IS NOT NULL
DROP TABLE Queries
------
------
CREATE TABLE Queries (
  TopQueries VARCHAR(100) NOT NULL,
  Clicks INT,
  Impressions INT,
  CTR DECIMAL(5,4),
  Position DECIMAL(5,2)
);
-----
-----
BULK INSERT Queries
FROM 'C:\Users\<s>userName</s>\Desktop\Practice set\GoogleSearchReport\Queries.csv'
WITH (
FORMAT='CSV',
FIRSTROW=2
);
------</code></pre><h1>SQL Data Analysis: Top Search Queries</h1><p>In short, the idea was to identify the top-performing keywords to do search engine optimization (updating posts titles, metadata, etc.) by finding single keywords which were top-performing and to then find duo/<a href="https://en.wikipedia.org/wiki/Bigram">bigram</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a> keywords which were top-performing as well.</p><h5>Single Keywords Analysis</h5><h6>SQL Code</h6><pre><code>--Temporary table creation: saving single keywords and their metrics.
CREATE TABLE #SingleKeywordAnalysis (
    Keyword NVARCHAR(55),
    Clicks INT,
    Impressions INT,
    CTR DECIMAL(18, 4),
    Position DECIMAL(18, 4)
);

--Insert single keywords and their metrics into the temporary table.
WITH QueryKeywords AS (
    SELECT
        LTRIM(RTRIM(m.value)) AS Keyword
        , Clicks
        , Impressions
        , CTR
        , Position
    FROM Queries
    CROSS APPLY STRING_SPLIT(TopQueries, ' ') AS m
)

INSERT INTO #SingleKeywordAnalysis (Keyword, Clicks, Impressions, CTR, Position)
SELECT
    Keyword,
    SUM(Clicks) AS Clicks,
    SUM(Impressions) AS Impressions,
    SUM(Clicks) / NULLIF(SUM(Impressions), 0) AS CTR,
    AVG(Position) AS Position
FROM QueryKeywords
GROUP BY Keyword
;

--Select single keywords and the metrics, sorted by descending desired metric
SELECT
    Keyword
    , Clicks
    , Impressions
    , CTR
    , Position
FROM #SingleKeywordAnalysis
ORDER BY Clicks DESC, Impressions DESC, CTR DESC
;

--Drop the temporary #SingleKeywordAnalysis table
DROP TABLE #SingleKeywordAnalysis
;</code></pre><h6>Output</h6><p>There were 326 different keywords. The below image contains selected part.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!U30I!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8fd66a-df18-4ca3-92a3-5238b0dcde89_321x621.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!U30I!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8fd66a-df18-4ca3-92a3-5238b0dcde89_321x621.png 424w, https://substackcdn.com/image/fetch/$s_!U30I!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8fd66a-df18-4ca3-92a3-5238b0dcde89_321x621.png 848w, https://substackcdn.com/image/fetch/$s_!U30I!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8fd66a-df18-4ca3-92a3-5238b0dcde89_321x621.png 1272w, https://substackcdn.com/image/fetch/$s_!U30I!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8fd66a-df18-4ca3-92a3-5238b0dcde89_321x621.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!U30I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8fd66a-df18-4ca3-92a3-5238b0dcde89_321x621.png" width="321" height="621" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/fe8fd66a-df18-4ca3-92a3-5238b0dcde89_321x621.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:621,&quot;width&quot;:321,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!U30I!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8fd66a-df18-4ca3-92a3-5238b0dcde89_321x621.png 424w, https://substackcdn.com/image/fetch/$s_!U30I!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8fd66a-df18-4ca3-92a3-5238b0dcde89_321x621.png 848w, https://substackcdn.com/image/fetch/$s_!U30I!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8fd66a-df18-4ca3-92a3-5238b0dcde89_321x621.png 1272w, https://substackcdn.com/image/fetch/$s_!U30I!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ffe8fd66a-df18-4ca3-92a3-5238b0dcde89_321x621.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure C: Single keyword query output</figcaption></figure></div><p>I have quickly went over the keywords in order to identify if there were any weird ones which I should avoid in advance in including them in the next part of my analysis. I found a number of them and made sure to exclude them for the next part.</p><h5>Bigram Keywords Analysis</h5><h6>SQL Code</h6><pre><code>--Temporary table creation: saving bigrams and their metrics.
CREATE TABLE #BigramAnalysis (
    Bigram NVARCHAR(55),
    Clicks INT,
    Impressions INT,
    CTR DECIMAL(18, 4),
    Position DECIMAL(18, 4)
);

--Define ignore list (table with words to ignore).
DECLARE @IgnoredWords TABLE (Word NVARCHAR(55))
;

INSERT INTO @IgnoredWords (Word)
VALUES ('of'), ('on'), ('for'), ('at'), ('the'), 
('to'), ('by'), ('+&#241;+&#201;+&#198;+&#163;'), ('a'), ('+&#163;+&#172;+&#172;'), 
('+&#191;+&#162;+&#251;'), ('in'), ('+&#186;+&#241;+&#237;+&#242;+&#163;+&#242;+&#172;'), ('+&#225;+&#242;+&#251;+&#163;+&#214;'), ('+&#225;+&#249;+&#163;+&#246;')
;

--Generate bigrams and their metrics.
WITH QueryKeywords AS (
    SELECT
        LTRIM(RTRIM(m.value)) AS Keyword
        , Clicks
        , Impressions
        , CTR
        , Position
    FROM Queries
    CROSS APPLY STRING_SPLIT(TopQueries, ' ') AS m
    WHERE NOT EXISTS (SELECT 1 
                      FROM @IgnoredWords 
                      WHERE Word = LTRIM(RTRIM(m.value))
                      )
),
Bigrams AS (
  SELECT
  LAG(Keyword, 1) OVER (PARTITION BY Clicks, Impressions, CTR, Position       ORDER BY Id) AS FirstWord
 , Keyword AS SecondWord
 , Clicks
 , Impressions
 , CTR
 , Position
 , ROW_NUMBER() OVER (PARTITION BY Clicks, Impressions, CTR, Position ORDER BY Id) AS Id
 FROM (SELECT Keyword
       , Clicks
       , Impressions
       , CTR
       , Position
       , ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS Id 
       FROM QueryKeywords) AS t
)

INSERT INTO #BigramAnalysis (Bigram, Clicks, Impressions, CTR, Position)
SELECT
    FirstWord + ' ' + SecondWord AS Bigram,
    SUM(Clicks) AS Clicks,
    SUM(Impressions) AS Impressions,
    SUM(Clicks) / NULLIF(SUM(Impressions), 0) AS CTR,
    AVG(Position) AS Position
FROM Bigrams
WHERE FirstWord IS NOT NULL
GROUP BY FirstWord, SecondWord
;

--Select bigrams and their metrics, sorted by descending desired metric.
SELECT
    Bigram
    , Clicks
    , Impressions
    , CTR
    , Position
FROM #BigramAnalysis
ORDER BY Clicks DESC 
     , Impressions DESC
     , CTR DESC
;

--Drop #BigramAnalysis temporary table.
DROP TABLE #BigramAnalysis;
</code></pre><h6>Output</h6><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!GbBd!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b68b9c-eb9b-423f-85b8-9f97d74bfaca_379x741.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!GbBd!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b68b9c-eb9b-423f-85b8-9f97d74bfaca_379x741.png 424w, https://substackcdn.com/image/fetch/$s_!GbBd!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b68b9c-eb9b-423f-85b8-9f97d74bfaca_379x741.png 848w, https://substackcdn.com/image/fetch/$s_!GbBd!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b68b9c-eb9b-423f-85b8-9f97d74bfaca_379x741.png 1272w, https://substackcdn.com/image/fetch/$s_!GbBd!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b68b9c-eb9b-423f-85b8-9f97d74bfaca_379x741.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!GbBd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b68b9c-eb9b-423f-85b8-9f97d74bfaca_379x741.png" width="379" height="741" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a4b68b9c-eb9b-423f-85b8-9f97d74bfaca_379x741.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:741,&quot;width&quot;:379,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!GbBd!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b68b9c-eb9b-423f-85b8-9f97d74bfaca_379x741.png 424w, https://substackcdn.com/image/fetch/$s_!GbBd!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b68b9c-eb9b-423f-85b8-9f97d74bfaca_379x741.png 848w, https://substackcdn.com/image/fetch/$s_!GbBd!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b68b9c-eb9b-423f-85b8-9f97d74bfaca_379x741.png 1272w, https://substackcdn.com/image/fetch/$s_!GbBd!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa4b68b9c-eb9b-423f-85b8-9f97d74bfaca_379x741.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure D: Bigram keywords query output</figcaption></figure></div><h5>Combined Analysis: Last Analysis Step</h5><p>I cut down the scope of the next part of the examination to single and duo- keywords with at least 250 Impressions.</p><p>I reviewed the results in Excel, manually, in order to gain a deeper understanding compared to the depth of understanding I anticipated I'd obtain by further SQL query analysis, such as union all for the two truncated tables and counting the frequency that the single keywords appeared within the bigrams. Et cetera.</p><p>Additionally, I removed the non-Medivia related keywords because Medivia proved to be where effort needed to be invested for the most impact on traffic.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9KQJ!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F636f1138-5521-4d13-aca0-fa9b08e19be9_637x601.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9KQJ!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F636f1138-5521-4d13-aca0-fa9b08e19be9_637x601.png 424w, https://substackcdn.com/image/fetch/$s_!9KQJ!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F636f1138-5521-4d13-aca0-fa9b08e19be9_637x601.png 848w, https://substackcdn.com/image/fetch/$s_!9KQJ!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F636f1138-5521-4d13-aca0-fa9b08e19be9_637x601.png 1272w, https://substackcdn.com/image/fetch/$s_!9KQJ!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F636f1138-5521-4d13-aca0-fa9b08e19be9_637x601.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9KQJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F636f1138-5521-4d13-aca0-fa9b08e19be9_637x601.png" width="637" height="601" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/636f1138-5521-4d13-aca0-fa9b08e19be9_637x601.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:601,&quot;width&quot;:637,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9KQJ!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F636f1138-5521-4d13-aca0-fa9b08e19be9_637x601.png 424w, https://substackcdn.com/image/fetch/$s_!9KQJ!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F636f1138-5521-4d13-aca0-fa9b08e19be9_637x601.png 848w, https://substackcdn.com/image/fetch/$s_!9KQJ!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F636f1138-5521-4d13-aca0-fa9b08e19be9_637x601.png 1272w, https://substackcdn.com/image/fetch/$s_!9KQJ!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F636f1138-5521-4d13-aca0-fa9b08e19be9_637x601.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">figure E: Color-Coding Analysis</figcaption></figure></div><h3>Findings:</h3><ol><li><p>I was able to improve the SEO of my already existing post by adjusting the title, metadata and initial paragraphs of the post to include words such as Medivia Archer Guide, leveling guide, hunting places, faction progress, mining guide, et cetera.</p></li><li><p>It was clear I could use screenshots I saved from the progress of two other sub characters I had on Lera's account, a <a href="https://www.s-rabi.com/2023/03/medivia-mage-guide-sorc-iron-man-project.html">Mage</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a> and a Druid, to attract additional traffic given the top performing keywords.</p></li><li><p>I would be able to leverage the gained knowledge here in advance as I'd create my <a href="https://www.s-rabi.com/2023/04/medivia-knight-guide-iron-man-project-1.html">Knight Iron Man project life thread</a>.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a> This was a request I received two weeks ago anyway to create such a life thread.</p></li></ol><p>Google email me once a while some funny achievements, statistics and other notes. The updates slowly but surely resulted with improvements to gaining organic traffic. About a month or so after taking actions, I got this, for example:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PB83!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff354fc07-8ee4-4601-9f13-c59cfe315756_313x260.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PB83!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff354fc07-8ee4-4601-9f13-c59cfe315756_313x260.png 424w, https://substackcdn.com/image/fetch/$s_!PB83!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff354fc07-8ee4-4601-9f13-c59cfe315756_313x260.png 848w, https://substackcdn.com/image/fetch/$s_!PB83!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff354fc07-8ee4-4601-9f13-c59cfe315756_313x260.png 1272w, https://substackcdn.com/image/fetch/$s_!PB83!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff354fc07-8ee4-4601-9f13-c59cfe315756_313x260.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PB83!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff354fc07-8ee4-4601-9f13-c59cfe315756_313x260.png" width="313" height="260" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f354fc07-8ee4-4601-9f13-c59cfe315756_313x260.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:260,&quot;width&quot;:313,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:37083,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PB83!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff354fc07-8ee4-4601-9f13-c59cfe315756_313x260.png 424w, https://substackcdn.com/image/fetch/$s_!PB83!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff354fc07-8ee4-4601-9f13-c59cfe315756_313x260.png 848w, https://substackcdn.com/image/fetch/$s_!PB83!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff354fc07-8ee4-4601-9f13-c59cfe315756_313x260.png 1272w, https://substackcdn.com/image/fetch/$s_!PB83!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff354fc07-8ee4-4601-9f13-c59cfe315756_313x260.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">figure F: SEO improvement &#8594; impact</figcaption></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.linkedin.com/in/shahaf-rabi/&quot;,&quot;text&quot;:&quot;Ping me on LinkedIn&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.linkedin.com/in/shahaf-rabi/"><span>Ping me on LinkedIn</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/seo-sql-analysis-google-search-performance-42023?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/seo-sql-analysis-google-search-performance-42023?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>https://drive.google.com/file/d/18xA8thwUnXKzPYLkFWJGcBxQifypYdss/view?usp=sharing</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>www.s-rabi.com</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>https://search.google.com/search-console</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>www.medivia.online</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>https://en.wikipedia.org/wiki/Bigram</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>https://www.s-rabi.com/2023/03/medivia-mage-guide-sorc-iron-man-project.html</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>https://www.s-rabi.com/2023/04/medivia-knight-guide-iron-man-project-1.html</p><p>https://www.s-rabi.com/2023/06/medivia-knight-guide-iron-man-project.html</p><p></p></div></div>]]></content:encoded></item><item><title><![CDATA[Happy Unicorns? One Billion+ StartUps and the UN's World Happiness Report]]></title><description><![CDATA[SQL (analysis) & Excel (visualizations)]]></description><link>https://www.novsto.com/p/happy-unicorns-startups-un-world-happiness</link><guid isPermaLink="false">https://www.novsto.com/p/happy-unicorns-startups-un-world-happiness</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Sun, 02 Apr 2023 09:34:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!cgel!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I was browsing for an interesting dataset on Kaggle while the TV reporter at the background was talking about Israel climbing up to the 9th place in the&nbsp;<a href="https://www.blogger.com/blog/post/edit/4929069857510980860/8035828830141551607#">United Nation's World Happiness Report of 2023</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a>&nbsp;(<a href="https://www.blogger.com/blog/post/edit/4929069857510980860/8035828830141551607#">click here for the dashboard</a>).<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a></p><p>I then saw the <a href="https://www.blogger.com/blog/post/edit/4929069857510980860/8035828830141551607#">dataset about Unicorns - StartUps with evaluation of USD 1+ Billion</a>.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a></p><p><strong>I was curious if there was any relationship between Happiness and Unicorns.</strong></p><p>Although I was quick to find out that <strong>there wasn't,</strong>&nbsp;I decided to follow up on some examinations given the even more interesting questions asked by <a href="https://www.blogger.com/blog/post/edit/4929069857510980860/8035828830141551607#">Gallup</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a><a href="https://www.blogger.com/blog/post/edit/4929069857510980860/8035828830141551607#"> </a>since they survey folks around the world for the report, which I thought were very relevant for an environment resulting with successful startups. </p><p>But TL;DR&#8212; I found no evidence to suggest that.&nbsp;</p><p><strong>I did decide, however, to visualize and post it here because it was quite a challenge to decide how I should communicate these findings of "lack of correlation."</strong></p><div><hr></div><p><strong>Insight from this practice: </strong></p><p><strong>In analytics, we often face data without clear correlations / significant correlation. In such instances, I advocate for minimalist, color-sparse visuals. Color should highlight key points, and here, the key point is the lack of correlation. Its absence would enable any presenter to convey the point forcefully.</strong></p><div><hr></div><p>I present the findings first &amp; then note the SQL written to load and analyze this data (visualizations made with Excel).</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h1>Visualizations</h1><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!cgel!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!cgel!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png 424w, https://substackcdn.com/image/fetch/$s_!cgel!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png 848w, https://substackcdn.com/image/fetch/$s_!cgel!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png 1272w, https://substackcdn.com/image/fetch/$s_!cgel!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!cgel!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png" width="433" height="751" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:false,&quot;imageSize&quot;:&quot;normal&quot;,&quot;height&quot;:751,&quot;width&quot;:433,&quot;resizeWidth&quot;:433,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!cgel!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png 424w, https://substackcdn.com/image/fetch/$s_!cgel!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png 848w, https://substackcdn.com/image/fetch/$s_!cgel!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png 1272w, https://substackcdn.com/image/fetch/$s_!cgel!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F9391f687-148f-4cf3-ae6d-68bdb73a9e9a_433x751.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">figure 1</figcaption></figure></div><p>People were asked "<em>are you dissatisfied with your freedom to choose what to do with your life?</em>" with a binary response option of No (0) and Yes (1).</p><p>I expected to see people were more satisfied where more unicorns existed. But as shown below, that's not what the data suggests.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!yzxy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff07bbdda-584a-4315-9c1c-5eac37d2a398_386x763.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!yzxy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff07bbdda-584a-4315-9c1c-5eac37d2a398_386x763.png 424w, https://substackcdn.com/image/fetch/$s_!yzxy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff07bbdda-584a-4315-9c1c-5eac37d2a398_386x763.png 848w, https://substackcdn.com/image/fetch/$s_!yzxy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff07bbdda-584a-4315-9c1c-5eac37d2a398_386x763.png 1272w, https://substackcdn.com/image/fetch/$s_!yzxy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff07bbdda-584a-4315-9c1c-5eac37d2a398_386x763.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!yzxy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff07bbdda-584a-4315-9c1c-5eac37d2a398_386x763.png" width="386" height="763" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/f07bbdda-584a-4315-9c1c-5eac37d2a398_386x763.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:763,&quot;width&quot;:386,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!yzxy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff07bbdda-584a-4315-9c1c-5eac37d2a398_386x763.png 424w, https://substackcdn.com/image/fetch/$s_!yzxy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff07bbdda-584a-4315-9c1c-5eac37d2a398_386x763.png 848w, https://substackcdn.com/image/fetch/$s_!yzxy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff07bbdda-584a-4315-9c1c-5eac37d2a398_386x763.png 1272w, https://substackcdn.com/image/fetch/$s_!yzxy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Ff07bbdda-584a-4315-9c1c-5eac37d2a398_386x763.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">figure 2</figcaption></figure></div><p>Similarly, I expected perceptions of corruption and confidence in the government to be favorable to unicorns. But such evidence was not found.</p><p>People were asked &#8220;<em>Is corruption widespread throughout the government in this country or not?</em>&#8221; and &#8220;<em>Is corruption widespread within businesses in this country or not</em>?&#8221; (Where data for government corruption are missing, the perception of business corruption is used as&nbsp; the overall corruption-perception measure).&nbsp;</p><p>Similar question was asked for confidence in the government.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!AAwN!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18f00d08-7aa7-4b5d-848e-3f38d4da904c_366x723.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!AAwN!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18f00d08-7aa7-4b5d-848e-3f38d4da904c_366x723.png 424w, https://substackcdn.com/image/fetch/$s_!AAwN!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18f00d08-7aa7-4b5d-848e-3f38d4da904c_366x723.png 848w, https://substackcdn.com/image/fetch/$s_!AAwN!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18f00d08-7aa7-4b5d-848e-3f38d4da904c_366x723.png 1272w, https://substackcdn.com/image/fetch/$s_!AAwN!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18f00d08-7aa7-4b5d-848e-3f38d4da904c_366x723.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!AAwN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18f00d08-7aa7-4b5d-848e-3f38d4da904c_366x723.png" width="366" height="723" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/18f00d08-7aa7-4b5d-848e-3f38d4da904c_366x723.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:723,&quot;width&quot;:366,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!AAwN!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18f00d08-7aa7-4b5d-848e-3f38d4da904c_366x723.png 424w, https://substackcdn.com/image/fetch/$s_!AAwN!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18f00d08-7aa7-4b5d-848e-3f38d4da904c_366x723.png 848w, https://substackcdn.com/image/fetch/$s_!AAwN!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18f00d08-7aa7-4b5d-848e-3f38d4da904c_366x723.png 1272w, https://substackcdn.com/image/fetch/$s_!AAwN!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F18f00d08-7aa7-4b5d-848e-3f38d4da904c_366x723.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">figure 3</figcaption></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!b7bH!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5192fbda-4c22-4793-9788-1fff0d9f3b25_375x729.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!b7bH!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5192fbda-4c22-4793-9788-1fff0d9f3b25_375x729.png 424w, https://substackcdn.com/image/fetch/$s_!b7bH!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5192fbda-4c22-4793-9788-1fff0d9f3b25_375x729.png 848w, https://substackcdn.com/image/fetch/$s_!b7bH!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5192fbda-4c22-4793-9788-1fff0d9f3b25_375x729.png 1272w, https://substackcdn.com/image/fetch/$s_!b7bH!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5192fbda-4c22-4793-9788-1fff0d9f3b25_375x729.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!b7bH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5192fbda-4c22-4793-9788-1fff0d9f3b25_375x729.png" width="375" height="729" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/5192fbda-4c22-4793-9788-1fff0d9f3b25_375x729.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:729,&quot;width&quot;:375,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:null,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:null,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!b7bH!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5192fbda-4c22-4793-9788-1fff0d9f3b25_375x729.png 424w, https://substackcdn.com/image/fetch/$s_!b7bH!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5192fbda-4c22-4793-9788-1fff0d9f3b25_375x729.png 848w, https://substackcdn.com/image/fetch/$s_!b7bH!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5192fbda-4c22-4793-9788-1fff0d9f3b25_375x729.png 1272w, https://substackcdn.com/image/fetch/$s_!b7bH!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F5192fbda-4c22-4793-9788-1fff0d9f3b25_375x729.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">figure 4</figcaption></figure></div><p><strong>Bottom line: </strong></p><p><strong>In analytics, we often face data without clear correlations / significant correlation. In such instances, I advocate for minimalist, color-sparse visuals. Color should highlight key points, and here, the key point is the lack of correlation. Its absence would enable any presenter to convey the point forcefully.</strong></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><div><hr></div><h1>Technical notes: The SQL written to load and analyze this data.</h1><ul><li><p>Microsoft's SQL Server Management Studio.</p></li></ul><pre><code>----DROP TABLE: UNICORNS
IF OBJECT_ID('unicorns', 'U') IS NOT NULL
  DROP TABLE unicorns;

---CREATE unicorns
CREATE TABLE unicorns (
    Company varchar(50) NOT NULL,
&#9;Valuation FLOAT NOT NULL,
&#9;Industry varchar(100) NULL,
&#9;Country VARCHAR(50) NOT NULL,
&#9;ValuationDate DATE NOT NULL
);

---LOAD CSV unicornslist to load unicorns
BULK INSERT unicorns
FROM 'C:\Users\-----------\Desktop\Happiness and Unicorns\unicornslist.csv'
WITH (
FORMAT='CSV',
FIRSTROW=2
);

----
----DROP TABLE happiness
IF OBJECT_ID('happiness', 'U') IS NOT NULL
  DROP TABLE happiness;

---CREATE happiness table
CREATE TABLE happiness (
 CountryName VARCHAR(50) NOT NULL,
 RegionalIndicator VARCHAR(50) NULL,
 Year DATE NULL,
 LifeLadder FLOAT NULL,
 LogGDPPerCapita FLOAT NULL,
 SocialSupport FLOAT NULL,
 HealthyLifeExpectancyAtBirth decimal(5,3) NULL,
 FreedomToMakeLifeChoices FLOAT NULL,
 Generosity FLOAT NULL,
 PerceptionsOfCorruption FLOAT NULL,
 PositiveAffect FLOAT NULL,
 NegativeAffect FLOAT NULL,
 ConfidenceInNationalGovernment FLOAT NULL
);

---LOAD CSV happiness world report to load happiness
BULK INSERT happiness
FROM 'C:\Users\-----------\Desktop\Happiness and Unicorns\worldhappinessreport.csv'
WITH (
FORMAT='CSV',
FIRSTROW=2
);</code></pre><pre><code><strong>------ Analysis Part</strong>
-- CTE Part
WITH numUniCo AS (SELECT Country
      , count(Company) AS unicornsNum
&#9;  FROM unicorns
&#9;  GROUP BY Country
),

hapi AS (SELECT CountryName
&#9;  , AVG(LifeLadder) AS AVG_LifeLadder
&#9;  , AVG(FreedomToMakeLifeChoices) AS AVG_FreedomToMakeLifeChoices
&#9;  , AVG(PerceptionsOfCorruption) AS AVG_CorruptionPerception
&#9;  , AVG(ConfidenceInNationalGovernment) AS AVG_GovtConfidence
&#9;  , AVG(SocialSupport) AS AVG_SocialSupport
&#9;  , AVG(Generosity) AS AVG_Generosity
&#9;  , AVG(PositiveAffect) AS AVG_PositiveAffect
&#9;  , AVG(NegativeAffect) AS AVG_NegativeAffect
FROM happiness
WHERE CountryName IN (SELECT Country
                      FROM numUniCo)
GROUP BY CountryName
)

---- Final Query
SELECT CountryName
&#9;  , numUniCo.unicornsNum AS TotalUnicorns
&#9;  , AVG_LifeLadder
&#9;  , AVG_FreedomToMakeLifeChoices
&#9;  , AVG_CorruptionPerception
&#9;  , AVG_GovtConfidence
&#9;  , AVG_SocialSupport
&#9;  , AVG_Generosity
&#9;  , AVG_PositiveAffect
&#9;  , AVG_NegativeAffect
FROM hapi
JOIN numUniCo
ON hapi.CountryName = numUniCo.Country
ORDER BY 2 DESC</code></pre><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>https://happiness-report.s3.amazonaws.com/2022/WHR+22.pdf</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>https://worldhappiness.report/data/</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>https://www.kaggle.com/datasets/rajkumarpandey02/list-of-unicorn-startup-companies</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>https://www.gallup.com/</p></div></div>]]></content:encoded></item><item><title><![CDATA[Data-based Decision-making Tool for Proportionality Appraisals in Israeli Targeted Killing Operations (sneak peek)]]></title><description><![CDATA[Sneak peek: Data-based decision making tool for proportionality assessments in Israeli targeted killing operations. (Security Studies Review, 07/06/2020.).]]></description><link>https://www.novsto.com/p/data-based-decision-making-tool-for</link><guid isPermaLink="false">https://www.novsto.com/p/data-based-decision-making-tool-for</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Sun, 27 Dec 2020 17:27:52 GMT</pubDate><enclosure url="https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/0eac32e8-4e35-4b00-85ee-baa1da1825e0_100x100.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1>Abstract</h1><p>Decision makers repeatedly struggle with the dilemmas and perplexities of the principle of proportionality. It is an burdensome task to determine whether or not the attack&#8217;s anticipated military advantage is proportional or disproportional to the expected civilian harm (a.k.a. collateral damage), particularly during the often-inimical circumstances under which these decisions must be made. That is also the case in targeted killing operations, which afford relatively comfortable conditions. I have decided to confront this challenging problem because although it is old and known, it was without adequate remedy. I offer a data-based tool for decision makers to evaluate proportionality with. This tool resolves the core complexities in proportionality evaluation for Israeli targeted killings. In order to do that I have created a database with four attack types covering five years. The database maintains each attack in disaggregated form, and each such record contains several variables. The tool retrieves the most relevant direct military advantage that decision makers can expect to achieve by performing the operation. Minor instructions transform the regular assessment of expected collateral damage to the desired form. This platform sets the military advantage and the collateral damage in equivalent terms and in numeric form, and it thus frames an effective comparison. The tool&#8217;s flexibility increases functionality and maintains maneuverability for decision makers. It is intended to provide decision makers with a great point of departure to evaluate proportionality based on accumulated data and knowledge (on top of timely intelligence). Modestly put, it solves the majority of their dilemma.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/data-based-decision-making-tool-for?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/data-based-decision-making-tool-for?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><p>*Originally published: the <em>Security Studies Review,</em> by <a href="https://www.s-rabi.com">Shahaf Rabi</a>, 07/06/2020.</p><h1>Background</h1><h2>What&#8217;s Proportionality?</h2><p>The principle of proportionality is one of the four core principles of the Laws of Armed Conflict, and it encapsulates the other three core principles in it. The principle, codified in the <a href="https://ihl-databases.icrc.org/applic/ihl/ihl.nsf/Treaty.xsp?documentId=D9E6B6264D7723C3C12563CD002D6CE4&amp;action=openDocument">Geneva Conventions</a>, prohibits to perform &#8220;<em>an attack which may be expected to cause</em> [civilian harm] <em>which would be excessive in relation to the concrete and direct military advantage anticipated</em>.&#8221; Therefore, decision makers need to assess what is the expected civilian harm (also known as collateral damage) and what is the anticipated direct military advantage (interchangeably called military necessity). The comparison of the two and the decision to follow is the proportionality evaluation.</p><h2>Why This Problem?</h2><p>The evaluation of proportionality is an onerous task, especially under operational constraints. There is no better person to testify about this hardship than Yuval Diskin, the Israeli Security Agency&#8217;s Deputy Director in 2000-2003 and Director in 2005-2011. He is probably the person who was involved in these precise decisions for targeted killing operations more than anyone else in Israel.</p><p>(Video below, The GateKeepers, in Hebrew, watch 1:25-3:20)</p><div id="youtube2-_VsXyxMQEIU" class="youtube-wrap" data-attrs="{&quot;videoId&quot;:&quot;_VsXyxMQEIU&quot;,&quot;startTime&quot;:null,&quot;endTime&quot;:null}" data-component-name="Youtube2ToDOM"><div class="youtube-inner"><iframe src="https://www.youtube-nocookie.com/embed/_VsXyxMQEIU?rel=0&amp;autoplay=0&amp;showinfo=0&amp;enablejsapi=0" frameborder="0" loading="lazy" gesture="media" allow="autoplay; fullscreen" allowautoplay="true" allowfullscreen="true" width="728" height="409"></iframe></div></div><p>It is undoubtedly a problem when someone as highly experienced as Diskin battles with proportionality evaluation because if that is the case for him then what is of less experienced decision makers? Also, it is not as if bright minds did not attempt to solve this issue or create tools for decision makers. See for example: <a href="https://books.google.co.il/books?id=Zi9pAgAAQBAJ&amp;printsec=frontcover#v=onepage&amp;q&amp;f=false">Guiora</a>, <a href="https://books.google.co.il/books?id=dPPYTDi1jiYC&amp;pg=PA313&amp;lpg=PA313&amp;dq=Israel+has+never+answered+the+question+of+what+is+an+acceptable+level+of+civilian+deaths.+A+committee+that+looked+at+the+issue+considered+a+standard+of+3.14+civilian+deaths+per+terrorist+(a+smaller+ratio+if+the+dead+are+children),+but+no+agreement+ever+emerged.+Dichter+cited+Shin+Bet+studies+showing+that+every+time+a+suicide+bomber+died+sixteen+to+twenty+lives+were+saved.&amp;source=bl&amp;ots=9SOXPHVCS4&amp;sig=ACfU3U1d3-PgRagflDzCyvUvegT_eRWgAA&amp;hl=en&amp;sa=X&amp;ved=2ahUKEwiQkcq_ns_pAhVD4aQKHZS3BZUQ6AEwAHoECAkQAQ#v=onepage&amp;q=Israel%20has%20never%20answered%20the%20question%20of%20what%20is%20an%20acceptable%20level%20of%20civilian%20deaths.%20A%20committee%20that%20looked%20at%20the%20issue%20considered%20a%20standard%20of%203.14%20civilian%20deaths%20per%20terrorist%20(a%20smaller%20ratio%20if%20the%20dead%20are%20children)%2C%20but%20no%20agreement%20ever%20emerged.%20Dichter%20cited%20Shin%20Bet%20studies%20showing%20that%20every%20time%20a%20suicide%20bomber%20died%20sixteen%20to%20twenty%20lives%20were%20saved.&amp;f=false">Byman</a>.</p><h2>So What&#8217;s the Crux of the Problem?</h2><p>In short, there are two main issues which complicate the evaluation of proportionality, especially for people who care about civilian lives:</p><p><strong>(1)</strong> It is unclear how broad or narrow should the calculus of military advantage and collateral damage be. As such, the considerations are fluid and holistic since it is ambiguous what to include or exclude in each of them. See for example: <a href="https://www.lawfareblog.com/israeli-targeting-procedures-and-concept-proportionality">Wittes</a>, <a href="https://thehill.com/blogs/pundits-blog/international/213546-asymmetries-and-proportionalities">Blank</a>, <a href="https://www.lawfareblog.com/defining-anticipated-military-advantage-importance-certainty">Schwartz</a>, <a href="http://dx.doi.org/10.2139/ssrn.979071">Cohen &amp; Shany</a>.</p><p><strong>(2)</strong> The assessments are subjective &#8211; influenced by <a href="https://en.wikipedia.org/wiki/Thinking,_Fast_and_Slow">biases, heuristics</a>, individual&#8217;s personality, culture, norms and values. Distinct people assign different weigh to the various elements which compose each of the competing interests (mil. adv. and coll. damage). For example, see: <a href="https://harvardnsj.org/wp-content/uploads/sites/13/2016/06/Whittemore.pdf">Whittemore</a>, <a href="https://www.justsecurity.org/22786/contextualizing-proportionality-analysis-response-schmitt-merriam/">Cohen &amp; Shany</a>.</p><h2>How I Resolved the Crux of the Problem</h2><p>This issue bugged me long after I&#8217;ve been exposed to Diskin&#8217;s testimony. My <em>light bulb moment</em> came after I&#8217;ve read Ganor&#8217;s <a href="https://books.google.co.il/books?hl=en&amp;lr=&amp;id=TnmpBgAAQBAJ&amp;oi=fnd&amp;pg=PR5&amp;dq=info:l2SZSjM_S8QJ:scholar.google.com&amp;ots=cAikxzw1em&amp;sig=06mzcTOA58bkVmql6cQUHIONG6Y&amp;redir_esc=y#v=onepage&amp;q&amp;f=false">book chapter</a> about the proportionality dilemma. He proposed a novel concept: quantified evaluation based on an objective calculation. However, I differed with most of the propositions, even for the more calibrated targeted killings one. It was simply not objective due to the assigned values into variables; the variables&#8217; mathematical operations (e.g. X^2); and the overall calculations. Still, I realized the potential of numerical use in order to overcome the issue of subjectivity. I therefore returned to peruse the law with a numeric perspective in mind.</p><p>I sought out the agreed upon fundamentals regarding the above-mentioned first issue of holistic calculations of military advantage and civilians harm. The solid common ground concerns the basics of how states codified the treaty-law and the conservative interpretations of the text. The principle explicitly notes &#8220;<em>concrete and direct military advantage anticipated</em>&#8221;. That is, the reasonably foreseeable direct result of the attack. It is similarly agreed with regards to collateral damage that the top priority &#8211; which is also most tangible &#8211; is the physical harm to civilians (fatalities and physical wounds).</p><p>Hence, consider the simplified proportionality evaluation below in preparation for numerical evaluation:</p><ul><li><p>Proportional (attack may proceed): <br>direct military necessity anticipated &gt;= expected civilian harm.<br><strong>*</strong> though note the expected civilian harm may be greater than the anticipated direct military advantage for as long as it is not &#8220;excessive&#8221;. Then again, this would have us circle back to issues of subjectivity.    </p></li></ul><p>Importantly, the operations conducted as a part of <a href="https://mfa.gov.il/mfa/aboutisrael/state/law/pages/hcj%20judgment%20on%20preventative%20strikes%20against%20terrorists%2011-dec-2005.aspx">Israel&#8217;s</a> <a href="https://supremedecisions.court.gov.il/Home/Download?path=EnglishVerdicts\02\690\007\A34&amp;fileName=02007690_A34.txt&amp;type=4">targeted killing</a> policy deal with the ones which serve the purpose of <a href="https://besacenter.org/wp-content/uploads/2002/09/msps51.pdf">thwarting</a> specific Palestinian attacks that the security services obtained information on before the attacks materialized.</p><p>I figured that as the purpose is to prevent attacks, then this is the perfect fit for direct military necessity anticipated. There is a rich historical record of Palestinian attacks and their respective results in terms of fatalities and physical injuries. So I created a dataset with the details of individual attacks (especially the attack types and casualties). Therefore, I solved the first issue of holistic calculations since both, the military necessity and civilian harm, are expressed in terms of fatalities and physically wounded people.</p><p>Moreover, this actually also solves the subjectivity issue. The reason for this is that the database records physical casualties for the military necessity. These are facts, objective numbers. Similarly, the expected civilian harm is also based on assessments of the number of fatalities and injuries. Consequently, the anticipated direct military necessity in terms of foiling an attack by performing a targeted killing is in the form of objective numbers, and so is the expected collateral damage.</p><p>The platform therefore frames an effective comparison as it sets the military advantage and the civilian harm in equivalent terms and in numeric form. The most basic of intelligence information about the impending attack, the modus operandi, already enables this data-based tool to retrieve the most relevant* direct military necessity that decision makers can expect to obtain if the targeted killing is carried out in order to thwart the threat. With this as anchorage point, the only possible adjustment needed to compare the military necessity with the civilian harm is to ensure the regular assessment of expected collateral damage relates to physical casualties. At minimum, this quick and simple solution solves decision makers&#8217; most difficult part in proportionality appraisal. However, it neither replaces their discretion nor determine for them if the proposed attack is proportional or not.</p><div><hr></div><p>*Relevant as in the tool retrieves values based on their percentile location. It avoids the use of the average which is susceptible to extreme cases. Further adjustments depend on available intelligence information (timely and past research &#8211; as exemplified later on).</p><div><hr></div><h1>INSIGHTS (sneak peek)</h1><h4><strong>Important acronyms:</strong></h4><ol><li><p>for Modus Operandi variable:<br><strong>1.1. </strong>SMS (Suicidal Mass-Shooter)<br><strong>1.2. </strong>SB (Suicide Bomber)<br><strong>1.3. </strong>VBED (Vehicle-Borne Explosive Device)<br><strong>1.4. </strong>SB VBED (Suicide Bomber via Vehicle-Borne Explosive Device)</p></li><li><p>for De-Facto Target variable:<br><strong>2.1. </strong>PT (Public Transportation)<br><strong>2.2. </strong>SF (Security Forces)<br><strong>2.3. </strong>O (Other)</p></li></ol><h2>Overview of the Data</h2><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!9tGu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9bf87b2-eeb9-4a13-8892-81d9436b6cd9_707x490.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!9tGu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9bf87b2-eeb9-4a13-8892-81d9436b6cd9_707x490.png 424w, https://substackcdn.com/image/fetch/$s_!9tGu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9bf87b2-eeb9-4a13-8892-81d9436b6cd9_707x490.png 848w, https://substackcdn.com/image/fetch/$s_!9tGu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9bf87b2-eeb9-4a13-8892-81d9436b6cd9_707x490.png 1272w, https://substackcdn.com/image/fetch/$s_!9tGu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9bf87b2-eeb9-4a13-8892-81d9436b6cd9_707x490.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!9tGu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9bf87b2-eeb9-4a13-8892-81d9436b6cd9_707x490.png" width="707" height="490" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/a9bf87b2-eeb9-4a13-8892-81d9436b6cd9_707x490.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:490,&quot;width&quot;:707,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:56948,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!9tGu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9bf87b2-eeb9-4a13-8892-81d9436b6cd9_707x490.png 424w, https://substackcdn.com/image/fetch/$s_!9tGu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9bf87b2-eeb9-4a13-8892-81d9436b6cd9_707x490.png 848w, https://substackcdn.com/image/fetch/$s_!9tGu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9bf87b2-eeb9-4a13-8892-81d9436b6cd9_707x490.png 1272w, https://substackcdn.com/image/fetch/$s_!9tGu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fa9bf87b2-eeb9-4a13-8892-81d9436b6cd9_707x490.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>DATA ANALYSIS INSIGHTS &#8211; For Smarter Usage</h2><p>The data analysis provided opportunities to identify KPIs (key performance indicators) since the established database contains a number of <a href="https://www.icstk.org/methodology">cataloged variables</a>, and some of them proved relatively insignificant. This sneak peek focuses on the two most important indicators: the modus operandi; and the de-facto target.</p><p><em>How many times each modus operandi targeted Other, Public Transportation &amp; Security Forces</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!TSVk!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbaa51d-293c-4fec-bde8-9f5f099d43bf_707x251.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!TSVk!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbaa51d-293c-4fec-bde8-9f5f099d43bf_707x251.png 424w, https://substackcdn.com/image/fetch/$s_!TSVk!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbaa51d-293c-4fec-bde8-9f5f099d43bf_707x251.png 848w, https://substackcdn.com/image/fetch/$s_!TSVk!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbaa51d-293c-4fec-bde8-9f5f099d43bf_707x251.png 1272w, https://substackcdn.com/image/fetch/$s_!TSVk!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbaa51d-293c-4fec-bde8-9f5f099d43bf_707x251.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!TSVk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbaa51d-293c-4fec-bde8-9f5f099d43bf_707x251.png" width="707" height="251" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7dbaa51d-293c-4fec-bde8-9f5f099d43bf_707x251.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:251,&quot;width&quot;:707,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:9402,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!TSVk!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbaa51d-293c-4fec-bde8-9f5f099d43bf_707x251.png 424w, https://substackcdn.com/image/fetch/$s_!TSVk!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbaa51d-293c-4fec-bde8-9f5f099d43bf_707x251.png 848w, https://substackcdn.com/image/fetch/$s_!TSVk!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbaa51d-293c-4fec-bde8-9f5f099d43bf_707x251.png 1272w, https://substackcdn.com/image/fetch/$s_!TSVk!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7dbaa51d-293c-4fec-bde8-9f5f099d43bf_707x251.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><em>How many casualties (fatalities/injuries) for each modus operandi, sorted by target (Other, Public Transportation, Security Forces)</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Q_Va!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc80c162-db6f-4758-9c5b-535cf73eb283_706x340.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Q_Va!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc80c162-db6f-4758-9c5b-535cf73eb283_706x340.png 424w, https://substackcdn.com/image/fetch/$s_!Q_Va!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc80c162-db6f-4758-9c5b-535cf73eb283_706x340.png 848w, https://substackcdn.com/image/fetch/$s_!Q_Va!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc80c162-db6f-4758-9c5b-535cf73eb283_706x340.png 1272w, https://substackcdn.com/image/fetch/$s_!Q_Va!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc80c162-db6f-4758-9c5b-535cf73eb283_706x340.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Q_Va!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc80c162-db6f-4758-9c5b-535cf73eb283_706x340.png" width="706" height="340" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/fc80c162-db6f-4758-9c5b-535cf73eb283_706x340.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:340,&quot;width&quot;:706,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:11055,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Q_Va!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc80c162-db6f-4758-9c5b-535cf73eb283_706x340.png 424w, https://substackcdn.com/image/fetch/$s_!Q_Va!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc80c162-db6f-4758-9c5b-535cf73eb283_706x340.png 848w, https://substackcdn.com/image/fetch/$s_!Q_Va!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc80c162-db6f-4758-9c5b-535cf73eb283_706x340.png 1272w, https://substackcdn.com/image/fetch/$s_!Q_Va!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Ffc80c162-db6f-4758-9c5b-535cf73eb283_706x340.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>It is useful to gain insights from data analysis for smarter military necessity assessment. For instance, there are attack types such as the VBED with 46 incidents in total, a fairly small number. This might become a problem if intelligence points to an organization like Hamas that is about to stage a VBED attack. If filtered by Hamas, 3 incidents are left in total. Yet after in-depth analysis, there is no evident difference between attacks&#8217; lethality when comparing organizations. It means the assessment should not refine the military necessity anticipated by organization in this case. However, the fact Hamas facilitates the attack is important because Hamas overall inclines to target <em>public transportation</em> and <em>other &#8211; </em>a KPI.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!DiRu!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00dcebc5-99ec-4b0b-90e6-394cf92aa873_581x301.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!DiRu!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00dcebc5-99ec-4b0b-90e6-394cf92aa873_581x301.png 424w, https://substackcdn.com/image/fetch/$s_!DiRu!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00dcebc5-99ec-4b0b-90e6-394cf92aa873_581x301.png 848w, https://substackcdn.com/image/fetch/$s_!DiRu!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00dcebc5-99ec-4b0b-90e6-394cf92aa873_581x301.png 1272w, https://substackcdn.com/image/fetch/$s_!DiRu!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00dcebc5-99ec-4b0b-90e6-394cf92aa873_581x301.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!DiRu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00dcebc5-99ec-4b0b-90e6-394cf92aa873_581x301.png" width="581" height="301" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/00dcebc5-99ec-4b0b-90e6-394cf92aa873_581x301.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:301,&quot;width&quot;:581,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:34153,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!DiRu!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00dcebc5-99ec-4b0b-90e6-394cf92aa873_581x301.png 424w, https://substackcdn.com/image/fetch/$s_!DiRu!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00dcebc5-99ec-4b0b-90e6-394cf92aa873_581x301.png 848w, https://substackcdn.com/image/fetch/$s_!DiRu!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00dcebc5-99ec-4b0b-90e6-394cf92aa873_581x301.png 1272w, https://substackcdn.com/image/fetch/$s_!DiRu!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F00dcebc5-99ec-4b0b-90e6-394cf92aa873_581x301.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!Za0K!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e54436-550b-414d-9173-d853a8a946da_634x298.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!Za0K!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e54436-550b-414d-9173-d853a8a946da_634x298.png 424w, https://substackcdn.com/image/fetch/$s_!Za0K!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e54436-550b-414d-9173-d853a8a946da_634x298.png 848w, https://substackcdn.com/image/fetch/$s_!Za0K!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e54436-550b-414d-9173-d853a8a946da_634x298.png 1272w, https://substackcdn.com/image/fetch/$s_!Za0K!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e54436-550b-414d-9173-d853a8a946da_634x298.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!Za0K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e54436-550b-414d-9173-d853a8a946da_634x298.png" width="634" height="298" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/d7e54436-550b-414d-9173-d853a8a946da_634x298.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:298,&quot;width&quot;:634,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:18613,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!Za0K!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e54436-550b-414d-9173-d853a8a946da_634x298.png 424w, https://substackcdn.com/image/fetch/$s_!Za0K!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e54436-550b-414d-9173-d853a8a946da_634x298.png 848w, https://substackcdn.com/image/fetch/$s_!Za0K!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e54436-550b-414d-9173-d853a8a946da_634x298.png 1272w, https://substackcdn.com/image/fetch/$s_!Za0K!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fd7e54436-550b-414d-9173-d853a8a946da_634x298.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><h2>DATA ANALYTICS INSIGHTS &#8211; Knowledge/Data-based Direct Military Necessity Anticipation</h2><p>The decision makers need to have at their disposal a platform that is informative and easy to comprehend. The intelligence services need to make available the concrete intelligence information for the impending attack as well as supplementary intelligence analysis reports in order to determine the layers upon which the assessment of the anticipated direct military necessity is to be based on. The KPIs constitute the backbone of the assessment. Further intelligence analysis can help indicate other patterns, preferences, et cetera which may be relevant to the assessment (e.g. previous example of Hamas&#8217; target choice tendency). On top of this, the concrete intelligence information need be put, including possibly, recommendations in advance to opt for a certain percentile range. For instance, to opt for 50% percentile range and strongly recommend refraining from increases to a certain degree in cases of modus operandi with thousands or more of cases recorded in the database, as opposed to modus operandi of much smaller recorded cases.</p><p>An approachable user-interface greatly matters. The platform itself clearly visualizes to the decision makers the percentile range as well as indicate the spread of the values since they can see the median and the values at each edge of the percentile range. These help widen their perspective, as exemplified below (reflects the overall direct military necessity anticipated in case of suicide bomber attacks).</p><p><em>Direct military necessity anticipated for suicide bombers</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!PA9Y!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4c8acb-e442-4152-911d-df3a18ae5ae8_772x270.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!PA9Y!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4c8acb-e442-4152-911d-df3a18ae5ae8_772x270.png 424w, https://substackcdn.com/image/fetch/$s_!PA9Y!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4c8acb-e442-4152-911d-df3a18ae5ae8_772x270.png 848w, https://substackcdn.com/image/fetch/$s_!PA9Y!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4c8acb-e442-4152-911d-df3a18ae5ae8_772x270.png 1272w, https://substackcdn.com/image/fetch/$s_!PA9Y!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4c8acb-e442-4152-911d-df3a18ae5ae8_772x270.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!PA9Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4c8acb-e442-4152-911d-df3a18ae5ae8_772x270.png" width="772" height="270" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/cc4c8acb-e442-4152-911d-df3a18ae5ae8_772x270.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:270,&quot;width&quot;:772,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:10768,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!PA9Y!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4c8acb-e442-4152-911d-df3a18ae5ae8_772x270.png 424w, https://substackcdn.com/image/fetch/$s_!PA9Y!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4c8acb-e442-4152-911d-df3a18ae5ae8_772x270.png 848w, https://substackcdn.com/image/fetch/$s_!PA9Y!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4c8acb-e442-4152-911d-df3a18ae5ae8_772x270.png 1272w, https://substackcdn.com/image/fetch/$s_!PA9Y!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcc4c8acb-e442-4152-911d-df3a18ae5ae8_772x270.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p>Finally, the decision maker(s) need to know the assessment with regards to the expected civilian harm, which might also be given as a range depending on the circumstances at hand.</p><h3>Proportionality Evaluation &#8211; Uncomfortable &amp; Unintuitive Cases in Point:</h3><p>Let us take some inspiration from Yuval Diskin&#8217;s testimony about proportionality evaluation. You are the commander in charge in the three given scenarios. Your final decision, should you make one, matters less than your ability to make rapid, informed, and sagacious proportionality evaluations.</p><p><strong>(1)</strong> You finally know the cell phone number that the PIJ&#8217;s suicide bomber carries with him. This enables you to pinpoint his location, and you find out the bomber is traveling in a taxi. You have no clue how many people are in it, although you assess it is a civilian taxi driver at minimum and up to additional 3 other civilians. You know the bomber was told to explode at one of the city&#8217;s most popular streets with many bars and restaurants, and also, not to waste time. The taxi travels through a quiet street, seems without people. There is no time to pass on the information to security personnel on the ground before the bomber reaches his destination. The line is open with the IAF&#8217;s command and control operations room. They see what you see. The drone is ready to fire a missile. Whoever is in the taxi is expected to be killed. Is it proportional to strike? (which does not necessarily mean you&#8217;d order the airstrike. You may choose to let the bomber go ahead, and probably explode while you cross your fingers for a malfunction of any sort of the explosive belt).</p><p><em>Direct military necessity anticipated for a suicide bomber targeting &#8220;Other&#8221;</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!vUBm!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f53c1f5-8d23-4f38-ac86-1248546290db_776x259.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!vUBm!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f53c1f5-8d23-4f38-ac86-1248546290db_776x259.png 424w, https://substackcdn.com/image/fetch/$s_!vUBm!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f53c1f5-8d23-4f38-ac86-1248546290db_776x259.png 848w, https://substackcdn.com/image/fetch/$s_!vUBm!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f53c1f5-8d23-4f38-ac86-1248546290db_776x259.png 1272w, https://substackcdn.com/image/fetch/$s_!vUBm!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f53c1f5-8d23-4f38-ac86-1248546290db_776x259.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!vUBm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f53c1f5-8d23-4f38-ac86-1248546290db_776x259.png" width="776" height="259" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/7f53c1f5-8d23-4f38-ac86-1248546290db_776x259.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:259,&quot;width&quot;:776,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:10608,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!vUBm!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f53c1f5-8d23-4f38-ac86-1248546290db_776x259.png 424w, https://substackcdn.com/image/fetch/$s_!vUBm!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f53c1f5-8d23-4f38-ac86-1248546290db_776x259.png 848w, https://substackcdn.com/image/fetch/$s_!vUBm!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f53c1f5-8d23-4f38-ac86-1248546290db_776x259.png 1272w, https://substackcdn.com/image/fetch/$s_!vUBm!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2F7f53c1f5-8d23-4f38-ac86-1248546290db_776x259.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p><strong>(2)</strong> IAF drone tracks a suicide bomber in the West Bank. He travels in a Palestinian taxi with the driver and another unknown Palestinian. As the commander, you hope to wait for a moment of opportunity to strike without any uninvolved people around. However, you see the taxi is about to arrive to a flying-checkpoint manned by five IDF soldiers. The soldiers are unaware of the danger and cannot be warned in time. Do you conduct an airstrike at the Palestinian taxi or see how things play out at the checkpoint?</p><p><em>Direct military necessity anticipated for a suicide bomber targeting &#8220;Security Forces&#8221;</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!3nxI!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdeac8cd-adc8-4129-a6a7-773f2108371b_777x260.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!3nxI!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdeac8cd-adc8-4129-a6a7-773f2108371b_777x260.png 424w, https://substackcdn.com/image/fetch/$s_!3nxI!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdeac8cd-adc8-4129-a6a7-773f2108371b_777x260.png 848w, https://substackcdn.com/image/fetch/$s_!3nxI!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdeac8cd-adc8-4129-a6a7-773f2108371b_777x260.png 1272w, https://substackcdn.com/image/fetch/$s_!3nxI!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdeac8cd-adc8-4129-a6a7-773f2108371b_777x260.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!3nxI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdeac8cd-adc8-4129-a6a7-773f2108371b_777x260.png" width="777" height="260" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/cdeac8cd-adc8-4129-a6a7-773f2108371b_777x260.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:260,&quot;width&quot;:777,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:10350,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!3nxI!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdeac8cd-adc8-4129-a6a7-773f2108371b_777x260.png 424w, https://substackcdn.com/image/fetch/$s_!3nxI!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdeac8cd-adc8-4129-a6a7-773f2108371b_777x260.png 848w, https://substackcdn.com/image/fetch/$s_!3nxI!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdeac8cd-adc8-4129-a6a7-773f2108371b_777x260.png 1272w, https://substackcdn.com/image/fetch/$s_!3nxI!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcdeac8cd-adc8-4129-a6a7-773f2108371b_777x260.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><p><strong>(3)</strong> You located the suicide bomber at a junction with two unknown people, most likely Israeli civilians. They ordered one of Dan&#8217;s Bubble minibuses (i.e. 10 seats max.) and it is about to arrive to them in no more than two-three minutes. This is a Hamas suicide bomber, and thus you assess she is likely to explode in it. While the other personnel under your command do their best to find out with Dan how many passengers are currently in the minibus, and to contact the driver, you need to consider whether you should act in case the efforts won&#8217;t bear fruits in time.</p><p><em>Direct military necessity anticipated for a suicide bomber targeting &#8220;Public Transportation&#8221;</em></p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!hTH5!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd231f7d-9a2f-4cfa-8b2a-f7f1a515bb53_776x259.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!hTH5!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd231f7d-9a2f-4cfa-8b2a-f7f1a515bb53_776x259.png 424w, https://substackcdn.com/image/fetch/$s_!hTH5!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd231f7d-9a2f-4cfa-8b2a-f7f1a515bb53_776x259.png 848w, https://substackcdn.com/image/fetch/$s_!hTH5!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd231f7d-9a2f-4cfa-8b2a-f7f1a515bb53_776x259.png 1272w, https://substackcdn.com/image/fetch/$s_!hTH5!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd231f7d-9a2f-4cfa-8b2a-f7f1a515bb53_776x259.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!hTH5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd231f7d-9a2f-4cfa-8b2a-f7f1a515bb53_776x259.png" width="776" height="259" data-attrs="{&quot;src&quot;:&quot;https://bucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com/public/images/cd231f7d-9a2f-4cfa-8b2a-f7f1a515bb53_776x259.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:259,&quot;width&quot;:776,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:10424,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!hTH5!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd231f7d-9a2f-4cfa-8b2a-f7f1a515bb53_776x259.png 424w, https://substackcdn.com/image/fetch/$s_!hTH5!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd231f7d-9a2f-4cfa-8b2a-f7f1a515bb53_776x259.png 848w, https://substackcdn.com/image/fetch/$s_!hTH5!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd231f7d-9a2f-4cfa-8b2a-f7f1a515bb53_776x259.png 1272w, https://substackcdn.com/image/fetch/$s_!hTH5!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fbucketeer-e05bbc84-baa3-437e-9518-adb32be77984.s3.amazonaws.com%2Fpublic%2Fimages%2Fcd231f7d-9a2f-4cfa-8b2a-f7f1a515bb53_776x259.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><div><hr></div><h3>SOME TECHNICAL NOTES</h3><p><strong>(1)</strong> I knew from previous researches that there was no adequately comprehensive, reliable, and publicly available dataset of Palestinian attacks. It had to be created. I thus designed and used the <a href="https://www.icstk.org/methodology">methodology and coding rules document</a> for the Palestinian &amp; Co. Political Violence database (hereinafter, database).</p><p><strong>(2)</strong> The reports of the ISA (aggregated summaries) proved useful for the purposes of choosing which kind of attack types to prioritize and to collect due to time and other constraints.</p><p><strong>(3)</strong> I created the database. Subsequently, I imported the 357 relevant attack cases to a new Excel file, and in Excel&#8217;s Manage Data Model/Power Pivot, I further prepared the data for analysis. For instance, I removed redundant cataloged variable-columns for the purposes of this analysis.</p><p><strong>(4)</strong> I conducted analysis in order to identify KPIs and gain additional insights. This required to add some DAX at the calculations area, such as the retrieving the fatalities and injuries values in the right percentiles. Moreover, I used the Power Pivot functions to re-arrange the data and to create new tables for some additional customized investigation of the data, to visualize the data, and so on, in order to gain further insights.</p>]]></content:encoded></item><item><title><![CDATA[Spotting the 2018 R9X Libya Strike - Reconstructing the Data Analysis & Research Process in Hindsight]]></title><description><![CDATA[16 August 2020]]></description><link>https://www.novsto.com/p/spotting-the-2018-r9x-libya-strike-ninja-missile</link><guid isPermaLink="false">https://www.novsto.com/p/spotting-the-2018-r9x-libya-strike-ninja-missile</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Sun, 16 Aug 2020 08:18:00 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/515fbda3-58f2-4f57-ba6d-39cf7daca8e5_459x433.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>OSINT researchers contacted me after I posted about identifying the AGM-114 <strong>R9X</strong> Hellfire missile strike in <a href="https://www.s-rabi.com/2020/12/New-Old-Libya-R9X-Strike-Case-Revealed-US-Ramps-Up-Ninja-Bomb-Targeted-Killings.html">Libya on 28 August 2018</a>.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> As the <a href="https://www.wsj.com/articles/secret-u-s-missile-aims-to-kill-only-terrorists-not-nearby-civilians-11557403411">Wall Street Journal</a>&#8216;s<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a> Lubold and Strobel first published on 9 May 2019, there were about six R9X strikes before May 2019. The Libyan case was one of them. This leaves at least two cases as not yet identified. Some OSINT researchers told me they continue to search for the remaining cases, while others said they stopped after their efforts proved futile. I was asked how and what I did in order to identify the case in Libya. In this piece, I reconstruct my steps in hindsight since I found it in July 2019.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!p48P!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c09340a-e0a0-4130-add1-d2a4064be2ca_459x433.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!p48P!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c09340a-e0a0-4130-add1-d2a4064be2ca_459x433.png 424w, https://substackcdn.com/image/fetch/$s_!p48P!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c09340a-e0a0-4130-add1-d2a4064be2ca_459x433.png 848w, https://substackcdn.com/image/fetch/$s_!p48P!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c09340a-e0a0-4130-add1-d2a4064be2ca_459x433.png 1272w, https://substackcdn.com/image/fetch/$s_!p48P!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c09340a-e0a0-4130-add1-d2a4064be2ca_459x433.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!p48P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c09340a-e0a0-4130-add1-d2a4064be2ca_459x433.png" width="459" height="433" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1c09340a-e0a0-4130-add1-d2a4064be2ca_459x433.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:433,&quot;width&quot;:459,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:64674,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!p48P!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c09340a-e0a0-4130-add1-d2a4064be2ca_459x433.png 424w, https://substackcdn.com/image/fetch/$s_!p48P!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c09340a-e0a0-4130-add1-d2a4064be2ca_459x433.png 848w, https://substackcdn.com/image/fetch/$s_!p48P!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c09340a-e0a0-4130-add1-d2a4064be2ca_459x433.png 1272w, https://substackcdn.com/image/fetch/$s_!p48P!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1c09340a-e0a0-4130-add1-d2a4064be2ca_459x433.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p><strong>Brief Backstory</strong></p><p>It was early June 2019 when I finally read the WSJ&#8217;s article. It was first to confirm the existence and use of the R9X missile. The <a href="https://www.wsj.com/articles/secret-u-s-missile-aims-to-kill-only-terrorists-not-nearby-civilians-11557403411">WSJ</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> stated the R9X was employed &#8220;<em>about half a dozen times</em>&#8221; in Iraq, Libya, Somalia, Syria and Yemen, before 9 May 2019. However, out of the about six times in which the missile was used, the article only identified two specific cases: the 26 February 2017 targeted killing of al-Masri in Syria; and the 1 January 2019 targeted killing of al-Badawi in Yemen.</p><p>My focus and expertise were, and still are, on Israeli targeted killings, not U.S. ones. Still, I entertained myself with the idea of finding the unidentified strikes. My colleagues, Professor <a href="https://www.amazon.com/Drone-Debate-Unmanned-Conventional-Battlefields/dp/1442230592">Avery Plaw (zl) and Carlos Colon</a>,<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> were tracking U.S. targeted killings, but they told me they weren&#8217;t going to search for it because their hands were full. I thought I could invest several hours searching for the cases during the <em>garbage time</em> (very late in the day, when I was less productive &#8211; especially in considering these were days I&#8217;d wake up around 5:30 and work until 20-21:00 on various projects and tasks, among them, attempting to secure a spot in a Political Science PhD program in one of the American Universities I&#8217;ve set my eyes on). Therefore, I decided to dig into their U.S. targeted killings database.</p><p><strong>Reconstructing in Hindsight the Data Analysis &amp; Research Process</strong></p><p>Clearly, the WSJ&#8217;s article noted about six strikes in five countries which occurred before May 2019. It also identified two cases, one in Syria and another in Yemen.</p><p>Filter data by Country: I worked under the assumption that about six strikes meant 5-7 cases as well as that no country was named without at least a single R9X strike. I was not able to tell if, and if so which, country had more than one strike. It was thus best to focus on the remaining countries, namely: Iraq, Libya and Somalia. This was important because my colleagues did track US targeted killings in, for example, Yemen. I opted out of going through the many Yemeni records. However, my colleagues did not track US targeted killings in all three remaining countries, so I only had data for Somalia and Libya.</p><p>Filter data by Date: As simple as it sounds, I filtered out data after 9 May 2019 (WSJ article publication). As for how far back to go, I perused the WSJ article for hints. Note, for example, &#8220;<em>The weapon was under development <strong>as early as 2011</strong></em>&#8221; (my emphasis) and also &#8220;<em>Development and refinement of the weapon drew impetus from Mr. Obama&#8217;s policy announcement in <strong>May 2013</strong> that set new rules for using lethal force</em> [&#8230;]&#8221; (my emphasis). This suggested there was no reason to go back in time more than early 2011, although likely that May 2013 would have been enough.</p><p>The two above steps weren&#8217;t sufficient because there were still too many cases to go through for a low priority project. Yet the sources of the WSJ journalists basically hinted that the use of the R9X was especially designed for targeting and hitting <strong>vehicles</strong> in order to <strong>minimize civilian fatalities</strong>. Consequently:</p><p><strong>Filter data by &#8220;Object_Type&#8221; variable:</strong> I decided to analyze the dataset by the Object_Type variable. I kept the records if the Object_Type variable was equal to &#8220;Vehicle&#8221;.</p><p><strong>Filter data by &#8220;Fatalities&#8221; variable:</strong> I next believed it would be efficient to review the data by paying attention to the number of fatalities. Perhaps it was optimism, or just a late in the day misjudgment when my critical thinking was on low alert, but I chose to filter the data again, keeping only cases of 0-2 fatalities (hoping the U.S. was successful). In hindsight, this might&#8217;ve well been a mistake and I should&#8217;ve kept 3-5 fatalities (bearing in mind number of people in most vehicles and option of harm to nearby people). I then re-arranged the data by fatalities in ascending order.</p><p>* * *</p><p><strong>Finally,</strong> I began to go through the records case by case. I read the text within the <strong>&#8220;Incident_Summary&#8221; variable</strong>, looking for clues and to get my head around each incident. This helped discard and move on from some cases.</p><p>However, I mostly had to look into each of the individual sources with which my colleagues processed before synthesizing the main/final record. In other words, a number of sources were processed for each data-record. In there, I quickly inspected archived links which often contained photographs from the scenes of the strikes (if there weren&#8217;t any then I&#8217;d spend a few minutes searching externally).</p><p>Importantly, in the imagery from the strike&#8217;s scenes, I looked for telling indicators regarding the type of munition which was used in the targeted killing strike. As the R9X missiles do not have an explosive warhead, but blades, the impacts cause distinct signs. For instance, lack of any burnt parts of vehicles in the absence of explosion, the caved-in top of vehicles (often with unique shape due to the missile&#8217;s blades), and so on.</p><p>* * *</p><p>I began going through the records only around July 2019. I believe it was on the second or third day when I found the Libya strike (spending no more than 2-4 hours). After a few more days, I told my colleagues that I found the Libyan case but not the Somalian one.</p><p>Although it was fun and nice-to-have, as academically-minded people the scoop itself was not really valuable for us, particularly as there were not enough cases to compare aspects of operations, such as collateral damage between this new munition and others munitions or methods. So I just stored this discovery and forgot about it.</p><p>I saw the rise of R9X missiles usage in June 2020. It reminded me of this scoop/discovery. I was surprised nobody else identified the Libya case (nor the Somalian/Iraqi for that matter) since an entire year has passed. I hence decided to share my finding. That noted, I nonetheless argue the R9X is <a href="https://medium.com/@shahaf.rabi/no-silver-bullet-r9x-missile-drone-strikes-2962020-61237c5cccbb">no silver bullet</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a> when it comes to minimizing or avoiding altogether civilian casualties. It has yet to prove itself.</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!QCEy!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccff8cd-e40d-4801-9346-53b21f43e692_611x389.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!QCEy!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccff8cd-e40d-4801-9346-53b21f43e692_611x389.png 424w, https://substackcdn.com/image/fetch/$s_!QCEy!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccff8cd-e40d-4801-9346-53b21f43e692_611x389.png 848w, https://substackcdn.com/image/fetch/$s_!QCEy!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccff8cd-e40d-4801-9346-53b21f43e692_611x389.png 1272w, https://substackcdn.com/image/fetch/$s_!QCEy!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccff8cd-e40d-4801-9346-53b21f43e692_611x389.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!QCEy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccff8cd-e40d-4801-9346-53b21f43e692_611x389.png" width="611" height="389" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/6ccff8cd-e40d-4801-9346-53b21f43e692_611x389.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:389,&quot;width&quot;:611,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:49370,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!QCEy!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccff8cd-e40d-4801-9346-53b21f43e692_611x389.png 424w, https://substackcdn.com/image/fetch/$s_!QCEy!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccff8cd-e40d-4801-9346-53b21f43e692_611x389.png 848w, https://substackcdn.com/image/fetch/$s_!QCEy!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccff8cd-e40d-4801-9346-53b21f43e692_611x389.png 1272w, https://substackcdn.com/image/fetch/$s_!QCEy!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6ccff8cd-e40d-4801-9346-53b21f43e692_611x389.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a></figure></div><p><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>https://www.s-rabi.com/2020/12/New-Old-Libya-R9X-Strike-Case-Revealed-US-Ramps-Up-Ninja-Bomb-Targeted-Killings.html</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>https://www.wsj.com/articles/secret-u-s-missile-aims-to-kill-only-terrorists-not-nearby-civilians-11557403411</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>https://www.wsj.com/articles/secret-u-s-missile-aims-to-kill-only-terrorists-not-nearby-civilians-11557403411</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>https://www.amazon.com/Drone-Debate-Unmanned-Conventional-Battlefields/dp/1442230592</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>https://medium.com/@shahaf.rabi/no-silver-bullet-r9x-missile-drone-strikes-2962020-61237c5cccbb</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p><a href="https://twitter.com/SHF_Rabi/status/1295356771415076865">https://twitter.com/SHF_Rabi/status/1295356771415076865</a></p><div><hr></div><p>original post: https://www.s-rabi.com/2020/12/spotting-the-2018-r9x-libya-strike-reconstructing-the-data-analysis-research-process-in-hindsight.html</p></div></div>]]></content:encoded></item><item><title><![CDATA[U.S. Police Kills, African-Americans v. Others]]></title><description><![CDATA[originally posted: 7 June 2020 on my personal website; Excel-only. Useful as a reference to visualizations & message-conveying improvement throughout time.]]></description><link>https://www.novsto.com/p/us-police-kills-african-americans</link><guid isPermaLink="false">https://www.novsto.com/p/us-police-kills-african-americans</guid><dc:creator><![CDATA[Shahaf Rabi]]></dc:creator><pubDate>Fri, 07 Aug 2020 08:59:00 GMT</pubDate><enclosure url="https://substackcdn.com/image/fetch/$s_!i4K7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4644609b-2860-4c8c-bdee-469177808acf_431x390.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>The U.S. police kills far <a href="https://www.vox.com/identities/2016/8/13/17938170/us-police-shootings-gun-violence-homicides">greater</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-1" href="#footnote-1" target="_self">1</a> <a href="https://www.theguardian.com/us-news/2015/jun/09/the-counted-police-killings-us-vs-other-countries">number</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-2" href="#footnote-2" target="_self">2</a> of people than police forces in other democracies. I decided to take a closer look at the statistics given the recent <a href="https://www.nytimes.com/video/us/100000007159353/george-floyd-arrest-death-video.html">egregious</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-3" href="#footnote-3" target="_self">3</a> killing of George Floyd (African-American, age 46), and the subsequent riots during the ongoing CORVID19 pandemic.</p><p>Floyd was killed in Minneapolis, a city with an official and horrible <a href="https://www.nytimes.com/interactive/2020/06/03/us/minneapolis-police-use-of-force.html">record</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-4" href="#footnote-4" target="_self">4</a> of police violence against Black people. In the past five years, about 57% of all police violence was against them although African-Americans composed only around 19% of the city&#8217;s entire population. For comparison, consider the fact White people composed 60% of Minneapolis&#8217;s population and their share of police violence was only 24%.</p><p>However, the riots are nationwide, so I explored the broader story of the fatalities by U.S. law enforcement. I retrieved data from the <a href="https://www.cdc.gov/injury/wisqars/index.html">Centers for Disease Control and Prevention</a>,<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-5" href="#footnote-5" target="_self">5</a> <a href="https://www.census.gov/prod/cen2010/briefs/c2010br-02.pdf">U.S. Census Bureau</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-6" href="#footnote-6" target="_self">6</a> and <a href="https://fatalencounters.org/">Fatal Encounters</a>.<a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-7" href="#footnote-7" target="_self">7</a></p><div><hr></div><p>First step to gain perspective: Focusing on the three largest race/ethnicity groups based on the 2010 U.S. census (which compose 92% of the U.S. population together) and their respective amounts resulting in deaths due to encounters with U.S. law enforcement personnel.</p><p>First step to gain perspective: Focusing on the three largest race/ethnicity groups based on the 2010 U.S. census (which compose 92% of the U.S. population together) and their respective amounts resulting in deaths due to encounters with U.S. law enforcement personnel.</p><p>Figure 1:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!i4K7!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4644609b-2860-4c8c-bdee-469177808acf_431x390.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!i4K7!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4644609b-2860-4c8c-bdee-469177808acf_431x390.png 424w, https://substackcdn.com/image/fetch/$s_!i4K7!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4644609b-2860-4c8c-bdee-469177808acf_431x390.png 848w, https://substackcdn.com/image/fetch/$s_!i4K7!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4644609b-2860-4c8c-bdee-469177808acf_431x390.png 1272w, https://substackcdn.com/image/fetch/$s_!i4K7!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4644609b-2860-4c8c-bdee-469177808acf_431x390.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!i4K7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4644609b-2860-4c8c-bdee-469177808acf_431x390.png" width="431" height="390" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/4644609b-2860-4c8c-bdee-469177808acf_431x390.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:390,&quot;width&quot;:431,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:13399,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:false,&quot;topImage&quot;:true,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!i4K7!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4644609b-2860-4c8c-bdee-469177808acf_431x390.png 424w, https://substackcdn.com/image/fetch/$s_!i4K7!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4644609b-2860-4c8c-bdee-469177808acf_431x390.png 848w, https://substackcdn.com/image/fetch/$s_!i4K7!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4644609b-2860-4c8c-bdee-469177808acf_431x390.png 1272w, https://substackcdn.com/image/fetch/$s_!i4K7!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F4644609b-2860-4c8c-bdee-469177808acf_431x390.png 1456w" sizes="100vw" fetchpriority="high"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 1</figcaption></figure></div><p>Moreover<strong>, age</strong> is a key factor which reflects the odds of being killed by the police.</p><p>Paying attention to the differences between the fatalities trend of African Americans and the European Americans given the overall image/understanding we have. Notice the not-so-subtle differences.</p><p>African Americans have it most dangerous in their 10s and 20s. The trend rapidly declines afterwards. However, for European-American, the peak arrives during their 30s and declines much more gradually in comparison to the two other groups.</p><p>I suppose this might well be the result of socio-economic gaps between the groups.</p><p>Figure 2:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!5u8F!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dac0432-b482-42b1-ba37-055bd4a4dee0_665x424.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!5u8F!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dac0432-b482-42b1-ba37-055bd4a4dee0_665x424.png 424w, https://substackcdn.com/image/fetch/$s_!5u8F!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dac0432-b482-42b1-ba37-055bd4a4dee0_665x424.png 848w, https://substackcdn.com/image/fetch/$s_!5u8F!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dac0432-b482-42b1-ba37-055bd4a4dee0_665x424.png 1272w, https://substackcdn.com/image/fetch/$s_!5u8F!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dac0432-b482-42b1-ba37-055bd4a4dee0_665x424.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!5u8F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dac0432-b482-42b1-ba37-055bd4a4dee0_665x424.png" width="665" height="424" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/8dac0432-b482-42b1-ba37-055bd4a4dee0_665x424.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:424,&quot;width&quot;:665,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:31748,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!5u8F!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dac0432-b482-42b1-ba37-055bd4a4dee0_665x424.png 424w, https://substackcdn.com/image/fetch/$s_!5u8F!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dac0432-b482-42b1-ba37-055bd4a4dee0_665x424.png 848w, https://substackcdn.com/image/fetch/$s_!5u8F!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dac0432-b482-42b1-ba37-055bd4a4dee0_665x424.png 1272w, https://substackcdn.com/image/fetch/$s_!5u8F!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8dac0432-b482-42b1-ba37-055bd4a4dee0_665x424.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 2</figcaption></figure></div><p>Furthermore, as shown in Table 3, <strong>gender</strong> is another key indicator of the likelihood that a person be killed. This is regardless of the age group or race/ethnicity. Males are far more likely to be killed in comparison to females.</p><p>Figure 3:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!MNwB!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8949973-e0ea-4610-bd14-96803e844734_719x384.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!MNwB!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8949973-e0ea-4610-bd14-96803e844734_719x384.png 424w, https://substackcdn.com/image/fetch/$s_!MNwB!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8949973-e0ea-4610-bd14-96803e844734_719x384.png 848w, https://substackcdn.com/image/fetch/$s_!MNwB!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8949973-e0ea-4610-bd14-96803e844734_719x384.png 1272w, https://substackcdn.com/image/fetch/$s_!MNwB!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8949973-e0ea-4610-bd14-96803e844734_719x384.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!MNwB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8949973-e0ea-4610-bd14-96803e844734_719x384.png" width="719" height="384" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/a8949973-e0ea-4610-bd14-96803e844734_719x384.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:384,&quot;width&quot;:719,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:16711,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!MNwB!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8949973-e0ea-4610-bd14-96803e844734_719x384.png 424w, https://substackcdn.com/image/fetch/$s_!MNwB!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8949973-e0ea-4610-bd14-96803e844734_719x384.png 848w, https://substackcdn.com/image/fetch/$s_!MNwB!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8949973-e0ea-4610-bd14-96803e844734_719x384.png 1272w, https://substackcdn.com/image/fetch/$s_!MNwB!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2Fa8949973-e0ea-4610-bd14-96803e844734_719x384.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 3</figcaption></figure></div><p>The only good news seems to be that African American females do not seem to be killed more than European American females (though bearing in mind it is still disproportionate to the general population).</p><p>Figure 4:</p><div class="captioned-image-container"><figure><a class="image-link image2" target="_blank" href="https://substackcdn.com/image/fetch/$s_!uL54!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47c54884-e0e5-40c2-b43d-6e5f3c8c18e5_741x211.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!uL54!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47c54884-e0e5-40c2-b43d-6e5f3c8c18e5_741x211.png 424w, https://substackcdn.com/image/fetch/$s_!uL54!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47c54884-e0e5-40c2-b43d-6e5f3c8c18e5_741x211.png 848w, https://substackcdn.com/image/fetch/$s_!uL54!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47c54884-e0e5-40c2-b43d-6e5f3c8c18e5_741x211.png 1272w, https://substackcdn.com/image/fetch/$s_!uL54!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47c54884-e0e5-40c2-b43d-6e5f3c8c18e5_741x211.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!uL54!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47c54884-e0e5-40c2-b43d-6e5f3c8c18e5_741x211.png" width="741" height="211" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/47c54884-e0e5-40c2-b43d-6e5f3c8c18e5_741x211.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:211,&quot;width&quot;:741,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:20868,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!uL54!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47c54884-e0e5-40c2-b43d-6e5f3c8c18e5_741x211.png 424w, https://substackcdn.com/image/fetch/$s_!uL54!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47c54884-e0e5-40c2-b43d-6e5f3c8c18e5_741x211.png 848w, https://substackcdn.com/image/fetch/$s_!uL54!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47c54884-e0e5-40c2-b43d-6e5f3c8c18e5_741x211.png 1272w, https://substackcdn.com/image/fetch/$s_!uL54!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F47c54884-e0e5-40c2-b43d-6e5f3c8c18e5_741x211.png 1456w" sizes="100vw" loading="lazy"></picture><div></div></div></a><figcaption class="image-caption">Figure 4</figcaption></figure></div><p>Examination of the causes of death for males between the ages of 10-49 exposes no clear difference based on race/ethnicity, although it raises the suspicion that U.S. police uses disproportional force against African-Americans compared to European-Americans. It results with more fatalities by tasering, asphyxiation, beatings, and pepper spraying. Table 5 displays this data (containing 6 out of 17 most &#8216;interesting&#8217;, cataloged causes of death).</p><p>Figure 5:</p><div class="captioned-image-container"><figure><a class="image-link image2 is-viewable-img" target="_blank" href="https://substackcdn.com/image/fetch/$s_!WwIs!,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca8563a-f20a-4d51-9d19-c89ea77edac5_673x421.png" data-component-name="Image2ToDOM"><div class="image2-inset"><picture><source type="image/webp" srcset="https://substackcdn.com/image/fetch/$s_!WwIs!,w_424,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca8563a-f20a-4d51-9d19-c89ea77edac5_673x421.png 424w, https://substackcdn.com/image/fetch/$s_!WwIs!,w_848,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca8563a-f20a-4d51-9d19-c89ea77edac5_673x421.png 848w, https://substackcdn.com/image/fetch/$s_!WwIs!,w_1272,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca8563a-f20a-4d51-9d19-c89ea77edac5_673x421.png 1272w, https://substackcdn.com/image/fetch/$s_!WwIs!,w_1456,c_limit,f_webp,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca8563a-f20a-4d51-9d19-c89ea77edac5_673x421.png 1456w" sizes="100vw"><img src="https://substackcdn.com/image/fetch/$s_!WwIs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca8563a-f20a-4d51-9d19-c89ea77edac5_673x421.png" width="673" height="421" data-attrs="{&quot;src&quot;:&quot;https://substack-post-media.s3.amazonaws.com/public/images/1ca8563a-f20a-4d51-9d19-c89ea77edac5_673x421.png&quot;,&quot;srcNoWatermark&quot;:null,&quot;fullscreen&quot;:null,&quot;imageSize&quot;:null,&quot;height&quot;:421,&quot;width&quot;:673,&quot;resizeWidth&quot;:null,&quot;bytes&quot;:14078,&quot;alt&quot;:null,&quot;title&quot;:null,&quot;type&quot;:&quot;image/png&quot;,&quot;href&quot;:null,&quot;belowTheFold&quot;:true,&quot;topImage&quot;:false,&quot;internalRedirect&quot;:null,&quot;isProcessing&quot;:false,&quot;align&quot;:null,&quot;offset&quot;:false}" class="sizing-normal" alt="" srcset="https://substackcdn.com/image/fetch/$s_!WwIs!,w_424,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca8563a-f20a-4d51-9d19-c89ea77edac5_673x421.png 424w, https://substackcdn.com/image/fetch/$s_!WwIs!,w_848,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca8563a-f20a-4d51-9d19-c89ea77edac5_673x421.png 848w, https://substackcdn.com/image/fetch/$s_!WwIs!,w_1272,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca8563a-f20a-4d51-9d19-c89ea77edac5_673x421.png 1272w, https://substackcdn.com/image/fetch/$s_!WwIs!,w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F1ca8563a-f20a-4d51-9d19-c89ea77edac5_673x421.png 1456w" sizes="100vw" loading="lazy"></picture><div class="image-link-expand"><div class="pencraft pc-display-flex pc-gap-8 pc-reset"><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container restack-image"><svg role="img" width="20" height="20" viewBox="0 0 20 20" fill="none" stroke-width="1.5" stroke="var(--color-fg-primary)" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg"><g><title></title><path d="M2.53001 7.81595C3.49179 4.73911 6.43281 2.5 9.91173 2.5C13.1684 2.5 15.9537 4.46214 17.0852 7.23684L17.6179 8.67647M17.6179 8.67647L18.5002 4.26471M17.6179 8.67647L13.6473 6.91176M17.4995 12.1841C16.5378 15.2609 13.5967 17.5 10.1178 17.5C6.86118 17.5 4.07589 15.5379 2.94432 12.7632L2.41165 11.3235M2.41165 11.3235L1.5293 15.7353M2.41165 11.3235L6.38224 13.0882"></path></g></svg></button><button tabindex="0" type="button" class="pencraft pc-reset pencraft icon-container view-image"><svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-maximize2 lucide-maximize-2"><polyline points="15 3 21 3 21 9"></polyline><polyline points="9 21 3 21 3 15"></polyline><line x1="21" x2="14" y1="3" y2="10"></line><line x1="3" x2="10" y1="21" y2="14"></line></svg></button></div></div></div></a><figcaption class="image-caption">Figure 5</figcaption></figure></div><p>Sadly, this is just the tip of the iceberg with regards to how police violence hurts African-Americans. For instance, the primary finding of a 2018 <a href="https://www.thelancet.com/journals/lancet/article/PIIS0140-6736(18)31130-9/fulltext">research</a><a class="footnote-anchor" data-component-name="FootnoteAnchorToDOM" id="footnote-anchor-8" href="#footnote-8" target="_self">8</a> about the &#8220;<em>spill over effects</em> [of police killing] <em>on the mental health of black Americans</em>&#8221; shows it harms their mental health. This, in turn, effects suicide rates, and so on.</p><div><hr></div><p><strong>NOTE: 24 AUGUST 2023:</strong></p><p>I&#8217;ve chosen to re-post this brief old data analysis project I&#8217;ve done when I polished my Excel skills back in August of 2020 (power pivot, using the data model, visualizations with Excel, etc.) because it nicely reflects the improvement that can be achieved later on, particularly with regards to visualizations and conveying a strong message alongside them. Anyone with a sharp eye can spot the problematic titles, missing legends, etc.</p><p>A wonderful resource for improving your visualization skills, particularly with Excel, is this website: https://www.storytellingwithdata.com/</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-1" href="#footnote-anchor-1" class="footnote-number" contenteditable="false" target="_self">1</a><div class="footnote-content"><p>https://www.vox.com/identities/2016/8/13/17938170/us-police-shootings-gun-violence-homicides</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-2" href="#footnote-anchor-2" class="footnote-number" contenteditable="false" target="_self">2</a><div class="footnote-content"><p>https://www.theguardian.com/us-news/2015/jun/09/the-counted-police-killings-us-vs-other-countries</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-3" href="#footnote-anchor-3" class="footnote-number" contenteditable="false" target="_self">3</a><div class="footnote-content"><p>https://www.nytimes.com/video/us/100000007159353/george-floyd-arrest-death-video.html</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-4" href="#footnote-anchor-4" class="footnote-number" contenteditable="false" target="_self">4</a><div class="footnote-content"><p>https://www.nytimes.com/interactive/2020/06/03/us/minneapolis-police-use-of-force.html</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-5" href="#footnote-anchor-5" class="footnote-number" contenteditable="false" target="_self">5</a><div class="footnote-content"><p>https://www.cdc.gov/injury/wisqars/index.html</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-6" href="#footnote-anchor-6" class="footnote-number" contenteditable="false" target="_self">6</a><div class="footnote-content"><p>https://www.census.gov/prod/cen2010/briefs/c2010br-02.pdf</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-7" href="#footnote-anchor-7" class="footnote-number" contenteditable="false" target="_self">7</a><div class="footnote-content"><p>https://fatalencounters.org/</p></div></div><div class="footnote" data-component-name="FootnoteToDOM"><a id="footnote-8" href="#footnote-anchor-8" class="footnote-number" contenteditable="false" target="_self">8</a><div class="footnote-content"><p>https://www.thelancet.com/journals/lancet/article/PIIS0140-6736(18)31130-9/fulltext</p></div></div>]]></content:encoded></item><item><title><![CDATA[NOVSTO]]></title><description><![CDATA[Welcome notes. Description about Novsto.]]></description><link>https://www.novsto.com/p/about</link><guid isPermaLink="false">https://www.novsto.com/p/about</guid><pubDate>Sat, 01 Aug 2020 07:10:00 GMT</pubDate><enclosure url="https://substack-post-media.s3.amazonaws.com/public/images/52ece83e-d711-4e05-be36-912d1b72854a_1080x1080.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Welcome to Novsto!</h2><p>Dive into a digital realm where research and data analysis dance together with decision making, where data shifts from tables into forceful visualizations, and where a budding research analyst evolves into a seasoned data analyst. </p><p>This isn't just my portfolio, but a chronicle of my exploration into the expansive world of data analytics &amp; decision making. Whether you're an aspiring analyst, a seasoned pro, or simply someone with a penchant for learning, this is your hub!</p><p>Here, I share the nuggets of knowledge I uncover, tips to enhance your analytics journey, and best practices that refine our collective expertise. I invite you to share your insights, ask questions, and spark enlightening discussions. We&#8217;ll grow as a community of practice. I envision the insights of experienced analysts enriching our collective knowledge and become better professionals. So join in! It&#8217;ll be fun :)</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p>Please make sure you read the <a href="https://securitystudiesreview.substack.com/about">About us</a> page.</p><p>In essence, the vision is for <em>Novsto</em> to become a publicly available hub for reliable and high-quality research and analysis case studies and questions.</p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/p/about?utm_source=substack&utm_medium=email&utm_content=share&action=share&quot;,&quot;text&quot;:&quot;Share&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/p/about?utm_source=substack&utm_medium=email&utm_content=share&action=share"><span>Share</span></a></p><ul><li><p>The materials are freely available, regardless if one is subscribed or not.</p></li><li><p>Free subscribers have access to <strong>nearly</strong> all of the resources. Occasionally, members (paid subscribers) receive <strong>exclusive access to unique materials</strong>.</p></li><li><p>Membership/paid subscriptions and/or gift donations are first and foremost forms of expressing support which help cover expenses. </p></li></ul><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&quot;,&quot;text&quot;:&quot;Subscribe now&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?"><span>Subscribe now</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://www.novsto.com/subscribe?&amp;gift=true&quot;,&quot;text&quot;:&quot;Give a gift subscription&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://www.novsto.com/subscribe?&amp;gift=true"><span>Give a gift subscription</span></a></p><blockquote><p>This initiative was created by, and is managed by, <a href="https://s-rabi.com">Shahaf Rabi</a><strong>.</strong></p></blockquote><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://scholar.google.com/citations?user=Q6LVAMwAAAAJ&amp;hl=en&quot;,&quot;text&quot;:&quot;Google Scholar&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://scholar.google.com/citations?user=Q6LVAMwAAAAJ&amp;hl=en"><span>Google Scholar</span></a></p><p class="button-wrapper" data-attrs="{&quot;url&quot;:&quot;https://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=2913199&quot;,&quot;text&quot;:&quot;SSRN&quot;,&quot;action&quot;:null,&quot;class&quot;:null}" data-component-name="ButtonCreateButton"><a class="button primary" href="https://papers.ssrn.com/sol3/cf_dev/AbsByAuth.cfm?per_id=2913199"><span>SSRN</span></a></p>]]></content:encoded></item></channel></rss>