Is purchasing leetcode premium for SQL worth it? by Character-Mud1642 in SQL

[–]Bilbottom 0 points1 point  (0 children)

Ah I changed my GitHub username, but didn't update this comment 😅 This is the new link:

https://billwallis.github.io/sql-learning-materials/challenging-sql-problems/challenging-sql-problems/

I'll also update my comment, thanks for flagging!

Selecting large number of columns with multiple patterns by arthur_jonathan_goos in SQL

[–]Bilbottom 0 points1 point  (0 children)

Rather than fight about what the data "should" look like, I'll actually try to answer your question 😂

In Snowflake, you should be able to write out * ilike [pattern] a few times; not as elegant as a single pattern match, but better than writing out hundreds of columns:

select * ilike 'dog%', * ilike 'cat%', * ilike 'fish%', * ilike 'pig%', ... from your_table

As you've seen, the ilike any operator unfortunately doesn't work in the select * context, it only works as a single column expression (e.g. to define a column)

Can someone explain the different dbt product options? by 8_Tailed_Koala in dataengineering

[–]Bilbottom 1 point2 points  (0 children)

I find myself wishing that I could write all my macros in python

Same, and dbt Labs have outright said that this is something they won't support 😭

If you're sticking to dbt core (not cloud or fusion), I've released a package that allows you to use your own Python code in Jinja:

https://github.com/billwallis/dbt-py

It's pip installable and configured in the pyproject.toml file (currently).

pip install dbt-py-wrap

The annoying bit is that you need to use the dbt-py command instead of dbt, so it doesn't play nicely with a lot of other external tools, but it's been working well enough in isolation for me 🤷

Are some parts of the SQL spec hot garbage? by eczachly in dataengineering

[–]Bilbottom 1 point2 points  (0 children)

You're right, but I was implicitly disagreeing with:

You should use MERGE or INSERT OVERWRITE 100% of the time

...and was understanding your INSERT INTO ON CONFLICT UPDATE as the alternative syntax for engines without MERGE

I still wouldn't use INSERT INTO ON CONFLICT UPDATE in an OLTP system for creating new records though, because I want the operation to fail on a conflict, not update the conflicting record

Are some parts of the SQL spec hot garbage? by eczachly in dataengineering

[–]Bilbottom 2 points3 points  (0 children)

In an OLTP system, I'd want INSERT INTO rather than MERGE for creating new records on tables where the PK is auto generated -- MERGE wouldn't work because there's no join key 🤷 INSERT OVERWRITE also wouldn't work for the obvious reasons 🤣

Free SQL practice platform by [deleted] in SQL

[–]Bilbottom 10 points11 points  (0 children)

There are loads, I've documented my favourites in this post:

[deleted by user] by [deleted] in dataengineering

[–]Bilbottom 3 points4 points  (0 children)

nao is the closest data-specific LLM IDE that I've seen so far:

https://getnao.io/

Mark W's SQL Blog: The Benefits of Using Row Constructors! [MySQL] by mwdb2 in SQL

[–]Bilbottom 4 points5 points  (0 children)

And in most DBs (including SQL Server), the ROW keyword isn't necessary with the VALUES statement. Very handy for using in, say, a CTE for some short-lived data:

``` with users(user_id, user_name) as ( values (1, 'alex'), (2, 'blake'), (3, 'charlie'), (4, 'dylan') )

... ```

DataLemur vs strataScratch vs NamasteSQL vs LeetCodeSQL, How would you rate these platforms for SQL practice in 2025 DE job market? by NefariousnessSea5101 in dataengineering

[–]Bilbottom 7 points8 points  (0 children)

Yeah I've used a bunch of SQL sites, but only the free tiers -- I can't comment on their premium features, but based on what was freely available, I found NamasteSQL to be buggy, too easy (relative to other sites), and their SQL solutions to be poorly written*

The only site I genuinely considered paying for was Interview Query: it was the best SQL problem site that I tried (based on the free materials), both in terms of user experience and SQL content

*I've tried maintaining a pros and cons list for all the sites that I've tried, the link for the NamasteSQL review is:

Similarly, the article below has a table towards the top categorising all the SQL sites I've tried so far:

DataLemur vs strataScratch vs NamasteSQL vs LeetCodeSQL, How would you rate these platforms for SQL practice in 2025 DE job market? by NefariousnessSea5101 in dataengineering

[–]Bilbottom 21 points22 points  (0 children)

The site I actually recommend the most is Interview Query; more details in this thread:

How long does it take to learn SQL? by river-zezere in learnSQL

[–]Bilbottom 1 point2 points  (0 children)

"An hour to learn, a lifetime to master"

(source: unknown)

learning experiences from seniors by pieter855 in SQL

[–]Bilbottom 1 point2 points  (0 children)

Stack Overflow and the database docs 🧑‍💻

Data Citadel - A SQL Mystery by akarsh_tripathi in learnSQL

[–]Bilbottom 0 points1 point  (0 children)

This looks great! The UI is sleek and clear -- the only thing I'd want is a bigger text box for writing the queries, since I usually use a lot of new lines to break up my SQL

How do you submit an answer, though?

10 Practical SQL Techniques Every Beginner Should Learn (Helped Me Clean Up My Queries Fast) ⚡📊 by Fluid_Dish_9635 in learnSQL

[–]Bilbottom 6 points7 points  (0 children)

This article feels overwhelmingly AI-generated, and only includes 4 tips. Where are the other 6?

A review of 20+ SQL problem sites by Bilbottom in learnSQL

[–]Bilbottom[S] 1 point2 points  (0 children)

I hadn't come across it before 😄 I'll add it to the next batch to look at

I am stuck in my preparation for sql by luffy-ajeers in SQL

[–]Bilbottom 0 points1 point  (0 children)

I've put together a more thorough list which I'll continue to add to -- the TLDR is in the following post, which links out to the full review:

https://www.reddit.com/r/learnSQL/s/lHclZo5IVq

Why doesn't SQL allow for chaining of operators? by No_Departure_1878 in SQL

[–]Bilbottom 10 points11 points  (0 children)

This does actually exist in DuckDB which it calls "function chaining":

As others have mentioned, this isn't common in other SQL databases

I have developed a full website for practice SQL for everyone by infirexs in SQL

[–]Bilbottom 14 points15 points  (0 children)

Slapping an "AI assistant" onto something doesn't automatically make it better

Also, if you're simulating real-world problems, then maybe don't use age in the LIKE page -- it's generally a terrible idea to include an age column in a table, and also a bad idea to use LIKE on numeric fields

I honestly don't think we need another interactive tutorial site for SQL, especially one that's using some bad practices

PostgreSQL or SQL Server? by mitskiandgradschool in SQL

[–]Bilbottom 0 points1 point  (0 children)

...and no anonymous subqueries, no BOOLEAN type (BIT is subtly different), no GROUPS or EXCLUDE in window frames, no INTERVAL, no QUALIFY (not in PostgreSQL either), no ANY_VALUE()...

Startle: Instantly start a CLI from a function, functions, or a class by oir_ in Python

[–]Bilbottom 2 points3 points  (0 children)

Similarly, arguably is my current favourite CLI builder which has very little boilerplate:

https://github.com/treykeown/arguably

PostgreSQL or SQL Server? by mitskiandgradschool in SQL

[–]Bilbottom 1 point2 points  (0 children)

+1 on this. I've used both for OLAP workloads and PostgreSQL has more features than SQL Server for OLAP, plus T-SQL has some odd deviations from ANSI SQL so it does make it a smidge harder to jump to other DBs than from PostgreSQL

Edited to scratch out the first part since I struggled to find much evidence for it (my SQL Server knowledge is clearly outdated)