SQL Tutorial + Cheat Sheet

Farzad Nobar
20 min readOct 1, 2022
Photo by Phil Desforges on Unsplash

Introduction

In my main post on Amazon’s Data Scientist role’s requirements, I identified “Data Retrieval” as the very first competency that every Data Scientist is expected to have and will be tested on during the interview process. As a scientist, I find myself going back and forth between data retrieval and data analysis/modeling and therefore I consider data retrieval a key competency in our Data Scientist candidates.

Data retrieval is usually done through SQL queries, which I will be spending most of the remainder of this post on. SQL might seem daunting at first but once you put some time and effort into it, you will find it to be one of the simplest and more versatile tools to use for data retrieval and also for some preliminary clean up and analysis.

Structure of This Document

This document is not a short one and in order to make it more manageable, I have broken it down into three separate sections:

  1. In the first section, I will provide two free online resources that I have found useful in the past (not sponsored).
  2. In the second section, we will walk through some of the most common SQL functions used in a Data Scientist’s day-to-day work with the accompanied scripts so that you can also follow along and continue learning as we work…

--

--