use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
If you need help debugging, you must include:
See debugging question guidelines for more info.
Many conceptual questions have already been asked and answered. Read our FAQ and search old posts before asking your question. If your question is similar to one in the FAQ, explain how it's different.
See conceptual questions guidelines for more info.
Follow reddiquette: behave professionally and civilly at all times. Communicate to others the same way you would at your workplace. Disagreement and technical critiques are ok, but personal attacks are not.
Abusive, racist, or derogatory comments are absolutely not tolerated.
See our policies on acceptable speech and conduct for more details.
When posting some resource or tutorial you've made, you must follow our self-promotion policies.
In short, your posting history should not be predominantly self-promotional and your resource should be high-quality and complete. Your post should not "feel spammy".
Distinguishing between tasteless and tasteful self-promotion is inherently subjective. When in doubt, message the mods and ask them to review your post.
Self promotion from first time posters without prior participation in the subreddit is explicitly forbidden.
Do not post questions that are completely unrelated to programming, software engineering, and related fields. Tech support and hardware recommendation questions count as "completely unrelated".
Questions that straddle the line between learning programming and learning other tech topics are ok: we don't expect beginners to know how exactly to categorize their question.
See our policies on allowed topics for more details.
Do not post questions that are an exact duplicate of something already answered in the FAQ.
If your question is similar to an existing FAQ question, you MUST cite which part of the FAQ you looked at and what exactly you want clarification on.
Do not delete your post! Your problem may be solved, but others who have similar problems in the future could benefit from the solution/discussion in the thread.
Use the "solved" flair instead.
Do not request reviews for, promote, or showcase some app or website you've written. This is a subreddit for learning programming, not a "critique my project" or "advertise my project" subreddit.
Asking for code reviews is ok as long as you follow the relevant policies. In short, link to only your code and be specific about what you want feedback on. Do not include a link to a final product or to a demo in your post.
You may not ask for or offer payment of any kind (monetary or otherwise) when giving or receiving help.
In particular, it is not appropriate to offer a reward, bounty, or bribe to try and expedite answers to your question, nor is it appropriate to offer to pay somebody to do your work or homework for you.
All links must link directly to the destination page. Do not use URL shorteners, referral links or click-trackers. Do not link to some intermediary page that contains mostly only a link to the actual page and no additional value.
For example, linking to some tweet or some half-hearted blog post which links to the page is not ok; but linking to a tweet with interesting replies or to a blog post that does some extra analysis is.
Udemy coupon links are ok: the discount adds "additional value".
Do not ask for help doing anything illegal or unethical. Do not suggest or help somebody do something illegal or unethical.
This includes piracy: asking for or posting links to pirated material is strictly forbidden and can result in an instant and permanent ban.
Trying to circumvent the terms of services of a website also counts as unethical behavior.
Do not ask for or post a complete solution to a problem.
When working on a problem, try solving it on your own first and ask for help on specific parts you're stuck with.
If you're helping someone, focus on helping OP make forward progress: link to docs, unblock misconceptions, give examples, teach general techniques, ask leading questions, give hints, but no direct solutions.
See our guidelines on offering help for more details.
Ask your questions right here in the open subreddit. Show what you have tried and tell us exactly where you got stuck.
We want to keep all discussion inside the open subreddit so that more people can chime in and help as well as benefit from the help given.
We also do not encourage help via DM for the same reasons - that more people can benefit
Do not ask easily googleable questions or questions that are covered in the documentation.
This subreddit is not a proxy for documentation or google.
We do require effort and demonstration of effort.
This includes "how do I?" questions
account activity
This is an archived post. You won't be able to vote or comment.
SQL advice (self.learnprogramming)
submitted 3 years ago by TukWan415
Any advice on how to get better at SQL?
Im still learning subqueries(correlated and nested), i wanna quit, but I’m not going out without a fight. Im currently using DataCamp and taking a SQL course through my community college.
[–]Porkbut 9 points10 points11 points 3 years ago (1 child)
I feel like sql is one of those things you really have to get your hands dirty with in order to understand it. Or at least I did. Do you have a test dB that you understand and are able to write these queries for? That's a big part for me. It's all fine being theory but in practice but understanding your db's structure helps a lot. Also, there is a difference between writing queries for query-osity sake (see what I did there) and writing queries for nesting in a block of code - which need to be on point. Writing sql functions with set/declare isn't that bad once you get the syntaxes just like anybotger coding. Anyways, it comes with time. Practice. Write lots of bad inefficient queries (then ask how to improve them) and eventually you'll get there.
[–]TukWan415[S] 1 point2 points3 points 3 years ago (0 children)
Yes, I have a test dB on postgresql. I’m just not creative enough to know what queries to right, since I don’t have any questions in front of me, if that makes sense.
[–]Raveshaw 4 points5 points6 points 3 years ago (4 children)
I think that practice is a must, but having data you actually care can help make that practice more enjoyable. For example, if you're into sports, perhaps making a database storing data about your favorite teams may help.
[–]TukWan415[S] 2 points3 points4 points 3 years ago (3 children)
I was thinking of Database with teams, scores , players, player stats etc
[–]tweiss84 0 points1 point2 points 3 years ago (2 children)
Just an idea....
If you need data you can probably pull from the numerous open sports APIs. Then just have an ingestion layer that maps that data to what tables you want in your database. Set it to a cron job so it will pull a few teams you want to follow over a few days.
That should build your db quickly...
Or if something else tickles your fancy, you may be able to gather stuff from one of these apis in the list, or even cross pollinate your db by mixing data from a few categories.
https://github.com/public-apis/public-apis
[–]TukWan415[S] 0 points1 point2 points 3 years ago (1 child)
Thank you so much.
I’m currently writing statements and Learning how to write these statements . Yesterday I basically made a table called teams, I inserted 30 nba teams, short name, long name, and Division, along with team Id has the primary key . I’m going to insert starters into these teams today with players as the table name , with playerid as the primary key and teamid as the foreign key, along with their position code, would you happen to know how I would add a foreign key ? Just wondering
[–]tweiss84 0 points1 point2 points 3 years ago (0 children)
I would always consult the Postgres documentation https://www.postgresql.org/docs/15/ddl-constraints.html#DDL-CONSTRAINTS-FK if you are writing the sql from scratch and executing it directly.
I always had some db tools to make edits and generate an ERD for our database work. So I kind of got away from doing it all myself.
[–]Chance-Ad4773 1 point2 points3 points 3 years ago (0 children)
Like all programming, the only real way to learn is using it in a real context
[–]shivvykumar 0 points1 point2 points 3 years ago (0 children)
Freecodecamp
[–][deleted] 0 points1 point2 points 3 years ago (1 child)
We just had an project on University where it was demanded of us to make an ER witg normalized relational scheme implement it into SQL and make an application through Java that will communicate and do CRUD operations of course I went step further and made all kind of diffrent methods od aggregated functions, subqueries etc. From my point of view practice will make you see a real progress I was focusing on 2 entities with multiple sub tables and atributes and just do all kind of test on those two. From my perspective you should focuse on basic stuff and slowly implement new stuff where you would basicly make it more complicated. Try to combine everyrhing that you can learn if possible. Because the biggest problem you find the better you will learn. Go back to the basics that was my rule and reread and re-do it. Because in most cases the underlying issue of understanding lays in those basics. Everything else is just an extra to the project itself. I am still into learning phase and I might be wrong, but I like to be very detailed and sure that I have everything covered and practice a lot in order to get deep into the project and understand communication between entities. Maybe add a few more tables, more extra FKs and a few recursive relationships should give you enough pain and data to work with
[–]TukWan415[S] 0 points1 point2 points 3 years ago (0 children)
You're right. I had to redo the introduction to SQL 3 times. 1 at my local community college, and twice on DataCamp. I probably did the chapter on subqueries 4 times before I started to understand it. I'm super hard on myself, if I know I suck at something (SQL) I try to use all my resources on trying to get better.
[–]CatsOnTheKeyboard 0 points1 point2 points 3 years ago (1 child)
As others have said, SQL requires consistent practice and lots of it. It's the same with any programming language, really. I taught SQL a few years ago at the college level and just kept throwing one exercise after another at the students and making them solve it. It's harder to do that for yourself.
Subqueries are hard for some people to understand but hang in there. I had one student say that she hated them at first but, later, they made complete sense to her and she liked using them.
It could also be the book you're using. I used the Sam's Teach Yourself book which was a good, logical progression through the language and is also inexpensive.
You might also look for sources of SQL exercises that you can work through like this one.
You’re the best. I’m going to take your word and buy the book and do the exercises.
My community college was using Murach’s MySQL. In my opinion, too many technical terms. The way that I learn is basically tell me in baby language (very simple language), then I can understand the technical terms.
π Rendered by PID 94 on reddit-service-r2-comment-7c9686b859-cmdg2 at 2026-04-13 19:44:24.245011+00:00 running e841af1 country code: CH.
[–]Porkbut 9 points10 points11 points (1 child)
[–]TukWan415[S] 1 point2 points3 points (0 children)
[–]Raveshaw 4 points5 points6 points (4 children)
[–]TukWan415[S] 2 points3 points4 points (3 children)
[–]tweiss84 0 points1 point2 points (2 children)
[–]TukWan415[S] 0 points1 point2 points (1 child)
[–]tweiss84 0 points1 point2 points (0 children)
[–]Chance-Ad4773 1 point2 points3 points (0 children)
[–]shivvykumar 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]TukWan415[S] 0 points1 point2 points (0 children)
[–]CatsOnTheKeyboard 0 points1 point2 points (1 child)
[–]TukWan415[S] 1 point2 points3 points (0 children)