News for hackers. Stuff that matters.
Re:Ask HN: Junior SQL developers – How do you learn SQL? by markus_zhang on Friday March 12, 2021 @12:45PM (#26438507)
I just learned the basics in sqlzoo and the rest on job, should be quick. The problem with learning is that students have no idea about real world requirements so they can only go for very generetic ones (average revenue last week). The key, IMO, is to connect with real world business requirements and start writing queries.

I worked as a BA and now work in BI so it's common for me to write long and complex queries. Most of them due to bad table structure but we can't do much so have to go around.

Re:Ask HN: Junior SQL developers – How do you learn SQL? by s-stude on Friday March 12, 2021 @05:17PM (#26441639)
This is interesting. Could you elaborate on the real world requirements please? What do you mean?
Re:Ask HN: Junior SQL developers – How do you learn SQL? by markus_zhang on Friday March 12, 2021 @08:07PM (#26442948)
In my case the database is designed in a way that analysts have to use many tricks (nested windows functions for example) to get what they need. This technically can be fixed by a re-design of the whole database but in reality it's not practical.

One job that I have never seen a company does well is the transalation of business requirements through programmers and database designers/admins. Each has its own agenda and you need someone who is excel in all three fields to make the connection smooth and lossless. I have yet to find someone who is.

I'd also like to add that if business teams (analysts) stop complaining about database qualities, it doesn't mean you have implemented the right fixes. It usually means that they are so desperate that they decide to just live with them.

Re:Ask HN: Junior SQL developers – How do you learn SQL? by s-stude on Saturday March 13, 2021 @02:09PM (#26449034)
Understood. Let's imagine you found such real-world tasks and trying to solve them. You write SQL queries, play around to get dome results but now you need to confirm your solution is right. And given you are playing around on some website that gives you sandbox and interactive SQL tasks — I am not sure there is a way to confirm whether a solution you provided is right or wrong without involving a person (a mentor) to take a look.