Learning SQL Mid-Career: Why Survival SQL?

In your industry, you’ve been around the block, and then some. The value that your business acumen, experience, and domain expertise bring is immense. Yet, businesses are digitizing with increasing speed, especially since e-commerce is important for survival in a post-COVID-19 world. Therefore, you’ve probably thought about learning SQL – but as a busy mid-career executive, you wonder how you’ll fit this into your packed schedule.

Learning SQL mid-career unlocks opportunities

Having the right numbers to prove a point is increasingly key with the shift towards “data-driven” business decision making. Here are some of the business questions you can answer with SQL:

  • What were the top performers for a particular category or market?
  • How did your product perform vs other products in your company?
  • Performance took a dip (or a surge). Which sub-category drove this change?
Image courtesy of Pexels. Photographer: Lukas

Some of these information may already be available in ready-made dashboards or apps. Yet, your message is more powerful with numbers that get right to that specific point – and fast. So, the flexibility to self-serve with data can bring you great advantages.

Who is this series for?

This series is aimed at people in business roles (strategy, product management, project management, retail, marketing etc). If your company is moving towards “data-driven” business methods, and you need to ramp up in SQL to populate your business presentations with data, you are my target audience! My goal is not to replace a good reference book, but to guide your focus towards the topics most relevant for business. Because most courses and books are targeted at aspiring developers, they tend to spend a lot of time on technical details. So with the help of this series, you can save time when learning and get to the most useful aspects of SQL for your role rapidly.

Survival SQL: Table of Contents

Here’s a list of all the posts in this series. By the time you get to post 4, you can write a query to pull business performance over time, for different business categories. Some of the subject matter in later posts belong to intermediate books but are important time-savers. Hope this material makes your SQL learning journey more relevant and smooth!

ContentsLink to post
1. Basic query structure, choose a bookUsing a beginner SQL book efficiently
2. Understand the key table(s) in your databaseYour first SQL joins: Reading the “FROM” clause
3. Gain control over the data you want to pullFiltering the data you want: The “WHERE” clause
4. Summarize your metrics into easy-to-understand groupsAggregating metrics: Using “GROUP BY”
5. Create your own metrics and categoriesDefine your own metrics: Operators and conditionals
6. Troubleshoot situations when a simple inner join might omit or duplicate dataWhen to use more complex joins
7. Save time by sorting your data in SQL instead of ExcelSort your data with “ORDER BY”
8. Automate Excel tasks involving calculations across rows (e.g. rank products by market, get moving averages) with window functionsWindow functions: Automate lengthy Excel tasks
9. Solve multi-step problems using subqueries. Use common table expressions to organize your thoughts more clearly.Subqueries and CTEs: Multi-step problems
Conclusion: Become a proactive partner to your business intelligence and data science teamsTake ownership of your data: The end-goal

Kaggle notebook for sample queries

You can find all the code used in the examples in this Kaggle notebook. To access it, you’ll need to create an account with Kaggle, which is free. I chose to use Kaggle for all the examples because they offer free access to real-life datasets on Google BigQuery. This gives you the opportunity to practice with actual databases, instead of “toy” data.

3 thoughts on “Learning SQL Mid-Career: Why Survival SQL?

  1. Very helpful resource for a non-technie to understand the basics of SQL! Are there ways for small-medium enterprises or even educators to learn and apply SQL? Thanks!

    1. Thanks Anne! SQL databases are fairly ubiquitous these days, e.g. even a blog with WordPress has a MySQL database set up with it in order to house all the associated data (posts, comments, etc). For an SME, the starting point would be to get a database engineer to set up the data correctly (there is a concept called “normal form” which ensures that everything is de-aggregated to a point that is sensible for the business). The process of creating the database and putting data into it is called ETL (extract-transform-load). Then the next step after creating the database would be to get the expertise to use it, which is where this material kicks in. For educators, the Python for Everybody textbook has a database chapter which teaches students to build a simple database on SQLite, which they can query and visualize on their own afterwards.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.