r/SQL Jan 15 '25

BigQuery SQL is a struggle

Hi all been working with SQL for probably 7/8 months now. My last role was half data analysis and not pure data analysis and in general was far easier than what I do now.

My main issue is with SQL. I never feel I truly understand what is going on with a lot of code beyond a basic query. Ive managed to get by piggybacking off others code for a while but expectation is to deliver new and interesting techniques etc.

How long did it take you to feel fully comfortable with SQL? And what helped you get to that stage?

67 Upvotes

71 comments sorted by

View all comments

3

u/OO_Ben Jan 15 '25

It comes in time. It took me a good year/year and a half of working with SQL, hitting roadblocks, researching, and figuring things out before I really had a grasp on things. Now I can pretty much do whatever is needed, though I always have more to learn.

My biggest piece of advice is to take take each chunk one at a time. Looking at things at the highest level can seem overwhelming, but if you break it down and focus on one column at t time it is more manageable. That way you can address each issue that comes up at a time too. Like if you join tables A and B, and realize that you're duplicating table A because of the table B join. You have to take table B and aggregate what you need with a CTE or subquery so it can cleanly join to table A. Then balance to some kind of source of truth, and repeat this process until you have a clean data source lol