Learn SQL

This is a compilation of suggestions from HackerNews and Quora on learning SQL. I wanted to check some of the links provided in comments but there were too many. So here they are to study at your own pace.



  • PGExcercises.com - PostreSQL questions and answers. You can use your own installation and provided datasets.
  • HackerRank SQL Challenges - If you want to brush up your skills
  • The SQL Tutorial for Data Analysis - Tutorial is meant for aspiring analysts who have used Excel a little bit but have no coding experience.
  • SQLBolt - A series of interactive lessons and exercises designed to help you quickly learn SQL right in your browser.
  • DB’s SQL - Stanford’s self-paced course.
  • Introduction to Databases - Stanford again. This course covers database design and the use of database management systems for applications. Review
  • Try SQL - A free course from CodeSchool.
  • Schemaverse - A space-based strategy game implemented entirely within a PostgreSQL database. Compete against other players using raw SQL commands to command your fleet.
  • The SQL Tutorial for Data Analysis - This tutorial is designed for people who want to answer questions with data.
  • SQL EX - Practical skills of SQL language. Recommended to anyone interested in seeing how certain datasets can require quite a bit of creativity to extract using SQL.
  • RedTiger’s Hackit - This hackit is for people who want to test their knowledge in PHP / SQL security. Learn through SQL injections.
  • SQL Teaching - Teaches you basic SQL in an interactive manner.




  • SQL Performance Explained - Markus Winand. SQL Performance Explained: Everything Developers Need to Know about SQL Performance. How to effectively use and leverage the SQL indices. No eBook it seems, paperback / PDF only.
  • Data Intensive - Marin Kleppman. Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems. O’Reilly
  • The Art of SQL - Stephane Faroult, Peter Robson. The Art of SQL offers best practices that teach experienced SQL users to focus on strategy rather than specifics.
  • SQL for Smarties - Joe Celko’s SQL for Smarties: Advanced SQL Programming.
  • SQL Antipatterns - Bill Karwin. SQL Antipatterns: Avoiding the Pitfalls of Database Programming (Pragmatic Programmers)
  • PostgreSQL 9.0 High Performance - Gregory Smith. Discusses all the different settings and tweaks you can do in Postgres.
  • High Performance MySQL - Baron Schwartz, Peter Zaitsev, Vadim Tkachenko. High Performance MySQL, 3rd Edition: Optimization, Backups, and Replication. Revised edition of High Perrfomance MySQL by Jeremy D. Zawodny, Derek J. Balling.
  • PostgreSQL 9 High Availability Cookbook - Shaun Thomas. Discusses how do you go from 1 Postgres instance to 1+ instance. Talks about replication, monitoring, cluster management, avoiding downtime etc.
  • MySQL High Availability - Charles Bell, Mats Kindahl, Lars Thalmann. MySQL High Availability: Tools for Building Robust Data Centers. Similar book for MySQL.
  • Architecture of a Database System - Joseph M. Hellerstein, Michael Stonebraker and James Hamilton. Pretty technical but great write up from researchers from Berkeley, MIT, and Microsoft that could help to get a good mental model of a SQL database. PDF
  • Database Design for Mere Mortals - Michael Hernandez. Database Design for Mere Mortals: A Hands-On Guide to Relational Database Design. Easy, Commonsense Guide to Database Design.


  • Stack Exchange Data Explorer - A fairly good resource for practising queries and for looking at others queries against a relatable dataset.
  • AWS Public Datasets - AWS hosts a variety of public datasets that anyone can access for free. There should be more then enough there for you to start playing with “big data” tools and getting familiar with how to store, ETL, and query large datasets.
  • Data Is Plural - Jeremy Singer-Vine. A weekly newsletter of useful/curious datasets.

Nick Ostrovsky

Full-stack designer. I like everything minimailitic and simple as possible.

Started with Web and Graphics, moved to User Experience and Interfaces, then to Team Lead and CTO. Contributed to projects for major brands such as L'Oreal, JTI and AB InBev among others. Currently working as an independent contractor.