|
I takes days/weeks to pick up the core of SQL: - create tables, update the schema, insert rows, add an index - select, filters, joins, order by, limit, inner queries It takes forever to be comfortable with: - anything that involves summarizing, grouping, having, min, max, windows |
The other tip is to sketch the problem in excel/google sheets when it gets hairy. Not the actual code (I don't have a clue how to do that, others have), just the values in the different steps. In the end it is only about rows and columns.
But that said, these days a lot of it happens intuitively for me, I pretty much know the solution before I can spell it out. It certainly was not like that when I started.
When you begin, "programming without for loops" feels like programming with your right hand tied behind your back. But in hindsight you get a lot of exercise in the immutable paradigms of functional programming, working with comprehensions, sets, maps folds comes very natural.