SQL for product designers
Fellow designers hi 🖐️ What if I tell you half a year ago I discovered GROUP BY: a simple introductory level SQL query and it changed everything?
Within a day of finishing an introductory SQL course I was able to apply it in work*. You have probably been there: you just need to know one thing about users to make a decision and DA team is busy.
GROUP BY was an epiphany and in a way an embarrassing one. MATH 😈 – in my mind there has always been that MATH between me and going from 0 to 1 in hands-on data science. Even if I took statistics in uni the BIG MATH 0 to 1 needed was always bigger than anything I knew.
Turns out when they say “simple SQL queries” they are, in fact, simple. Funnily, there is also not that much of BIG MATH. It, of course, gets more complex, that’s ok – that’s why we have talented data scientists . I’ve learnt that for a designer that “1” is often enough to make a data informed decision without taking time from the team, they are probably busy with truly complex stuff anyways.
Here, let’s try it, I bet you will understand what this query does even without prior experience with SQL on imaginary user_table dataset:
SELECT subscription_type, count(*) FROM user_table GROUP BY subscription_type ORDER BY count DESC;
Yes, it will count users for all subscription types. 4 lines of code! Maybe you stumbled on COUNT(*), that’s fine, it’s just an aggregate function, part of any introduction course. It will also ORDER results from the most common subscription type (descending order).
Or maybe you need to recruit people for an interview. You need people who did x and were active in the past 2 weeks. Again, you just need a CSV file with user data, apply WHERE clause and need to know how to filter timestamps.
So here is a potential path to move from 0 to 1:
⛳️ Take a lightweight course or a read about relational databases
So you understand databases – the basis of SQL and other things.
⚡️ Take 1-2 Introductory simple queries courses
Codeacademy Intro to SQL and Learn SQL are free, Datacamp is a good paid option. For a truly bite size SQL learning on the go you can also use Mimo mobile. Note: you will need to choose which SQL flavor to learn: flavor is just a variation of SQL that were developed by companies or coders. PostgreSQL and SQLite have recently gained popularity, MySQL and SQL Server are historically popular. Codeacademy mixed SQLite and PostgreSQL, Datacamp has a PostgreSQL course.
📝 Register on a data notebook so you can apply what you learn
Platform like Deepnote or Datacamp make it very easy to work with CSV** and can handle multiple SQL flavours, they also have an AI assistant to help you debug. Kaggle unfortunately makes things harder for SQL folks, it’s better for Python. Load a CSV file from open source library and try out new stuff as you go.
! Before uploading real product data from the company into these platforms consult with your IT !
📈 Recommendation: an introductory statistics course
It’s good to understand the basic concepts data science operates with. For example Mean, Median, Mode and distribution so we aren’t carried away with “averages”. Other very important concepts are: Regression and probability, Deviation, Sampling, Correlation, Central limit theorem, ****Hypothesis Testing and Variance, Confidence Intervals.
*It was a clean table so I didn’t have to do any cleaning. Most of the time it might as well be the case. **I’m assuming working with single CSV file will be enough for the time being.
Leave a Reply