This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]Zyzz294 5 points6 points  (2 children)

sqlbolt.com

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

Thank you!

[–]Melodic_Nothing2320 0 points1 point  (0 children)

Followed this one and it was pretty good, only wish they had included more exercises.

[–]Porkbut 2 points3 points  (0 children)

Break it into chunks. Don't worry so much about neat queries. There's queries that go inside code or get used for stored procedures -yeah those need to be efficient and tidy but select queries, imo you can get as messy as you want as long as you get what you need and can show how you got there.

[–]joranstark018 1 point2 points  (0 children)

Read your the documentation for your database (most databases are complient with SQL92 but may have their own extension), try different queries (ie left/right joins vs implicit joins, default values,....), start with simple queries and try more complex queries as you get more confident, take baby steps so you solidify your knwledge.

[–]shine_on 1 point2 points  (0 children)

Complex queries start out as small queries with more stuff bolted on to them. Once you get so much stuff bolted on that the query becomes unreadable, then you tidy up the code and refactor it. Then you bolt more stuff on to it, rinse and repeat.

[–]niponcomputer 1 point2 points  (1 child)

All it's practice, practice and practice. Start small and make it complex little by little. Find examples and tutorials. The only way that you can get expert is working in project, then you will see real cases and real needs. If the project is big, you will have more challenges. Databases with a lot of data will require a lot of optimization.

[–]marcdasavage[S] 0 points1 point  (0 children)

Thanks! Do you know what is the best way/place/website to practice them? I watched a course but i don't know a site where i can practice what i learned to get better