A collection of 7 posts
SQL Hack: How to join tables when the key is buried in a blob of text
The Situation Text blobs are a pain, but they are commonly used with data from email platforms, Salesforce, or dynamic UTMs. In these cases, the JOIN key is probably hidden in a blob of text. For example, say you want to join your users table using the user_id from
SQL Hack: How to get first value based on time without a JOIN or a Window Function?
This is my favorite trick in SQL! If you are like me and have been working with data for a while, you have googled “how to get the first value without a join or window function” multiple times in your life. We often hate having to write complex queries to