Can you EXPLAIN which part of the post took the longest to write?
Just kidding
You put explain and indexing in the Pro section. I reckon that the target group is managers - for engineers, that is something we required really early on to make sure that they think about the performance.
Switching gears a little bit: SQL is a declarative language. I don't know why, but I think about it every time I see it in action. The concept of declaring what we want to get without needing to write procedures to get it is great. TBH It is close to what we are getting recently with LLMs 🤔
I agree! It's much more straightforward than anything else. In contrast to LLMs, you do need to 'work' a bit to get what you want from it, but it's like a logical puzzle with very clear (and limited!) set of rules.
Thanks Raviraj! The hook was rewritten like 10 times :) In the end this one didn't do so well in the open rate, but very well on reddit, once I tried 'Why most developers stop learning SQL at subqueries - a 5-minute guide for PARTITION BY and CTEs' 🤷♂️
Even as a just-analysis tool, it can be SUPER useful for answering complex questions
I really appreciated the article! I've used partitions in the past but it has been a while and this was a great refresher. Plus I pushed to learn about CUME_DIST() that you teased us with and I have an immediate use for it!
It's good to see more technical articles on Substack! Looks like I don't have to limit myself to the advice category and post the technical things exclusively on my blog.
It's great to be hands-on with SQL! I never tried ChatGPT for queries because at the complexity where my tables and apps are, I can get by as a lvl 4 SQL player, although I remember touching on Partitions for something. 😃
I actually hesitated a lot about the topic, as it’s out of the regular kind that I posted here. I finally decided to go for it as I really enjoyed writing this piece, and I think it’s useful for managers too (which are my main audience).
Can you EXPLAIN which part of the post took the longest to write? Just kidding
You put explain and indexing in the Pro section. I reckon that the target group is managers - for engineers, that is something we required really early on to make sure that they think about the performance.
Great article - Thanks for writing it!
😂
Honestly, I didn't meet a lot of engineers who new how to properly use EXPLAIN.
So it sounds like it's worth EXPLAINing 🙂
Switching gears a little bit: SQL is a declarative language. I don't know why, but I think about it every time I see it in action. The concept of declaring what we want to get without needing to write procedures to get it is great. TBH It is close to what we are getting recently with LLMs 🤔
I agree! It's much more straightforward than anything else. In contrast to LLMs, you do need to 'work' a bit to get what you want from it, but it's like a logical puzzle with very clear (and limited!) set of rules.
What a great post!
Thank you Denis!
I think SQL is important for everyone who deals with data, its a universal data language.
With so much data, one should know sql, although with chatgpt lot of things will be simplified.
I think it’s ok to use LLMs to simplify it, but you shouldn’t depend on it. You must understand what you are doing when you work with data.
Great article summarizing all of the SQL concepts!
The first query can be done without subquery:
select deal_id,region, customer_name, MAX(deal_amount)
From deals d1
GROUP BY region;
But then you can’t select the deal data, just the amounts
Technical depth aside, this was written amazingly well from a readability point of view. Loved the hook! You are a great writer 😀
I only did #6 when I worked on a windows app and we cared about sql performance (sqllite). Now sql is just a tool to do analysis these days.
Thanks Raviraj! The hook was rewritten like 10 times :) In the end this one didn't do so well in the open rate, but very well on reddit, once I tried 'Why most developers stop learning SQL at subqueries - a 5-minute guide for PARTITION BY and CTEs' 🤷♂️
Even as a just-analysis tool, it can be SUPER useful for answering complex questions
Thanks so much for the mention Anton! :)
I really appreciated the article! I've used partitions in the past but it has been a while and this was a great refresher. Plus I pushed to learn about CUME_DIST() that you teased us with and I have an immediate use for it!
Glad you’ve caught the teasing :)
I’m curious to know about the use though 🙃
Great article Anton!
Thanks Leo! ❤️
It's good to see more technical articles on Substack! Looks like I don't have to limit myself to the advice category and post the technical things exclusively on my blog.
It's great to be hands-on with SQL! I never tried ChatGPT for queries because at the complexity where my tables and apps are, I can get by as a lvl 4 SQL player, although I remember touching on Partitions for something. 😃
I actually hesitated a lot about the topic, as it’s out of the regular kind that I posted here. I finally decided to go for it as I really enjoyed writing this piece, and I think it’s useful for managers too (which are my main audience).
Vanna.ai is pretty good with this: https://www.junaideffendi.com/p/vanna-empower-teams-through-chat-gpt
Thanks for the great article!