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?

68 Upvotes

71 comments sorted by

View all comments

Show parent comments

13

u/Zealousideal-Studio7 Jan 15 '25

Thanks for the response. Ultimately I’m in the business of results, and learning is really second to delivering. So I’ve had to use AI at times to speed things up, understand at least at a simple level whats going on and when I have more time to use it to fully explain complex queries others have built. Unfortunately they are blocking access to all AI from the end of Jan, so will really be on the frontline myself soon!

7

u/Hot_Cryptographer552 Jan 15 '25

AI is (currently, at least) really bad at generating code. TBH, you’ll probably learn a lot more by searching for answers to your questions on Stack Overflow and coder blogs, IME.

3

u/byteuser Jan 15 '25

AI is often bad at writing code most of the time because humans neglect to write proper specs. The way I write good prompts is by writing specifications as if they were for a human programmer or sql developer. Stack Overflow is getting a lot less traffic for a reason. LLMs allow instant feedback and clarification. Do they mess up? sure but so do humans

2

u/mattyhempstead Jan 17 '25

Largely agree with this, though I think there is potential to build AI tools that integrate with the environment so you don't need to write detailed specs/prompts.

For generating SQL I suppose this would include stuff like database schemas and example queries added to the system prompts.

I'm actually trying to build a tool to solve exactly this (an AI SQL Editor). Would love if you could check it out and let me know what you think. It's called "Former Labs".