I started to learn SQL from applying a summer internship and got a lot of exercises at AxialHealthcare. Briefly, for feature development regarding opioid use disorder, opioid addition and opioid relapse, I first read a lot of medical papers, then applied these domain knowledge and built well-established models, finally extracted the data from the database from GC and AWS. The post analysis is through Python or R. For geographic data, I visualized it in Tableau.

Before I had hands-on experience of MySQL and PostgreSQL on cloud services, I went through several good online courses. Thanks to Lingjun Fu and Chaochen You, they gave me a lot of insights about where to rock SQL learning.

Online Courses

Estimated time: 4 hours for each module

This is the best platform I would recommend it first. After registration, you can learn SQL from several modules like basics, creating tables and window functions. It explained well how to apply SQL in the real cases. What’s more, it provided online practices and good hints. Each module contains a lot of exercises and you really built up your confidence of learning step by step. The following is what I have learned from this platform.

SQL Basics (100% completed, 129/129)

Operating on Data in SQL (100% completed, 19/19)

Creating Tables in SQL (not purchased 8% completed, 15/177)

Standard SQL Functions (100% completed, 211/211)

Window Functions (100% completed, 218/218)

Estimated time: 8 hours

This is a mini course of Intro to Database from Stanford online course. By the time, I did not review the complete course. If you have enough time, I would recommend you to go through it. It will give you a comprehensive understanding of databases including SQL and non-SQL. For mini course of SQL, I personally like homework every time you learned some functions about SQL. The homework is based on a network context (friend network like Facebook). I have posted my solution on the Github if you need a hand.

My Practice

Online Judgement

After completing the courses above, it is time to test yourself at two popular online judgement platforms.

Hackerrank

Leetcode DataBase

The following is my solution for Leetcode problems. Some of them are really treaky. If you find yourself struggling, don’t be frustrated and just learn from the posted dicussion. After you review many times, you will finally get the tricks.

My Practice

Resources for Look-up

SQL is very easy to forget if you don’t pratice it every day. The following are the websites I always looked it up especially like window functions and update or delete operations.

W3schools

Command Line Shell For SQLite

Database System Concepts