What kind of really good? What's your goal?
Discussion
tbh i don’t like sql very much at all. seems very rigid and archaic. i’m decent enough with it as is. i just want to be able to do high-level sql (complex joins, subqueries, sprocs, views, etc) and identify when it’s necessary (this is the biggest gap for me. my mind just hasn’t quite reached the point where i look at a problem and i know what to do). i come to programming for a non-traditional background (blue collar work) so a lot of times i have to retrain my brain.
Unfortunately the answer is "from experience." Everything comes with trade offs and knowing when to use subqueries versus temp tables is more around the context of the problem and the experience of doing things the wrong way.
I'd recommend toy problems or building little tools in a dev env to get that kind of experience.
i work as a BI developer so the skills will obviously come. i work for a small company so that’s why i’m still just mediocre at sql. i just want to be very good now lol.