r/learnSQL

🔥 Hot ▲ 50 r/learnSQL

What actually helped you improve SQL?

I’ve been practicing things like joins, window functions, etc., but I feel like just solving questions isn’t enough.

What made the biggest difference for you:
- Timed practice?
- Explaining your approach out loud?
- Reviewing mistakes?

Trying to figure out what actually works vs just grinding questions.

reddit.com
▲ 12 r/learnSQL+1 crossposts

Looking for advice as a beginner, looking to advance carer

Hi and thank you in advance.

I currently work in a bank and am quite into computers. Given the rise in ai, banking is very much incorporating it. There is also a huge shift towards data analytics. Due to this, and to further advance my career, I’m wanting to learn sql. I just wanted to ask a few questions. I appreciate anyone taking time to read and answer.

  1. the most obvious, where would you recommend to start? Looking online is a bit overwhelming with the options.

  2. I have a MacBook, running iOS, and a pc, running windows. If there a significant different between the 2? Should I stick to windows based systems or would it not be an issue to use both ?

  3. is there anything else I should consider learning alongside sql, that would be helpful?

Thanks again!

reddit.com
u/Ok-Recommendation90 — 2 days ago

What are the real business case questions you get in your data analyst work for SQL and how do you map business questions to your code?

Fresher here, in the learning process. I haven't stepped into the real data world but I would love to know how to grasp business questions and relate them to sql to fetch data?

Do clients/managers ask - Find average salary per employee or how do they ask?

Because if they are vague like *find average salary* then it could be the average salary of the whole table ?

How do you map business questions to sql? Any tricks?

reddit.com
u/Fit-Vermicelli4536 — 3 days ago

What to do ??

Learning tools like sql , excel , python , power bi , tabulea, etc for data analytics is not sufficient i guess. Having buisness oriented knowledge is must .

Can anyone tell me what exactly to do ??

reddit.com
u/Automatic_Cover5888 — 2 days ago

Project to learn SQL

Wanting to attempt a project looking into app costs on the apple app store & google play and calculating average/user download at different price points/different app genres etc as a way to start learning SQL and get more confident with python. Would this be a good project to do to learn SQL or is it more of a python-only project?

reddit.com
u/castiellangels — 2 days ago

Any data analyst please guide me..I am in 1st year learning SQL.

Basically,I wasted 2 years in competitive exams..now I am fed up..I want to learn skills..please help

reddit.com
u/Immediate_Metal_5585 — 3 days ago
▲ 2 r/learnSQL+1 crossposts

Help with the error

CREATE TABLE Library (

book_id INT PRIMARY KEY,

book_name VARCHAR(50),

author VARCHAR(60),

price INT NOT NULL

);

Error Code: 1064. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Library ( book_id INT PRIMARY KEY, book_name VARCHAR(50), author VAR' at line 1

What do you think is wrong with the code?

I m using mysql.

reddit.com
u/Embarrassed-Speed327 — 5 days ago

How to start learning SQL for placements? Need good resources 🙏

Hey everyone,

I’m currently a 3rd year CSE student and I’ve realized that SQL is pretty important for placements, especially for interviews and coding rounds. The problem is I haven’t really learned it properly yet — just some basic queries in college.

I want to start from scratch and get to a level where I can solve interview-type questions confidently.

Can you guys suggest:

Good websites/platforms to learn SQL from basics Places where I can practice questions (easy → advanced) Any roadmap or approach that worked for you

I don’t mind putting in the time, just want to do it the right way without wasting effort on random resources.

Thanks in advance! 🙌

reddit.com
u/harshith_1729 — 5 days ago

How to develop logic for sql coding? MIS to Data Analyst transition

From MIS to Data analyst/scientist transition, I tried sql and it's been breaking my head. The logic is always turning wrong. each time I code, I have to take help from chatgpt.Its been a month already and I'm stuck with joins exists recursive cte etc etc

I was planning to transition to data analyst/scientist and now I'm on the verge of giving up.

How do i develop the thinking behind the code part ? Any resource or anyone can share how they go about their coding work?

reddit.com
u/BeyondMinimum3359 — 5 days ago

select row with most-recent date for each ID

I have two tables, Table1 has a list of medication orders, and Table2 has a list of transactions related to the orders in Table1 (one-to-many relationship).

Is there a way to use a single SQL query to select only the most-recent transaction row from the transaction table for each row in the medication orders table?

Table2 has columns: transaction_id, order_id (foreign key to Table1), t_date, t_time, etc. to represent transactions related to the medication orders in Table1.

Hopefully that's clear. I can't wrap my head around using max() in this way.

reddit.com
u/Spendocrat — 5 days ago

Do you know??

Anyone out there know about sololearn courses ? I want to be related to Data analytics

If yes , plzz tell was it worth it??

Also mention which courses you did on sololearn platform .

reddit.com
u/Automatic_Cover5888 — 6 days ago

With IPL around the corner, built a fun site to learn/practice SQL and discover crazy IPL stats

Being a die hard cricket fan and a techie, I always thought of building something like this. All questions are curated by me, used AI just to code the frontend. Thanks to the open source data-set which i found here : https://github.com/ritesh-ojha/IPL-DATASET

I am adding more interesting questions as i post this. Would love feedback from you guys. (Roast as much as you want as well)

site url : https://sqlpremierleague.com

u/footballforus — 5 days ago

What will be the solution for this?

Get products that are more expensive than any 'Furniture' category product using Subquery.

All the AI platforms are confused in finding the exact meaning of this question.

Should ÀNY or ALL be used?

reddit.com
u/sunrise-2026 — 6 days ago

Help filtering a dataset with a range

I'm have a dataset of contracts with start and end date that I fill using a SQL query. I know it is possible to filter to keep only the active contracts between two dates, (like for a quarterly report) in the SQL query directly.

My question is, using Superset, is it possible to filter the dataset using another dataset that holds the start and end dates of the quarters. Like by clicking on a quarter, it filters the contract dataset to only contracts active during this quarter?

Thank you for any help you can bring me!

reddit.com
u/Eolyas — 5 days ago

Can someone check our entity relationship diagram?

Hello! I just wanted to ask if someone could check our Entity Relationship Diagram for our project. We are students and are still quite new to database management systems. We would like to know if the diagram is correct and if there are any errors that need to be revised.

Here is the scenario that we are trying to create. I also included the draft of our diagram.

Scenario

A mobile application named RandomBite that allows the user to randomly select recipes from the list of recipes that is available in the application, as well as review recipes.

The database needs to track users (home cooks), recipes, and ingredients. Each user is identified by a user ID, username, password, email address, and full name. Each recipe has a recipe ID, name, a description, instructions in text form, instructions in audio form, instructions in video form, and an image of the final product. All media forms of the instructions are present at the same time. Lastly, each ingredient is identified by an ingredient ID and a name.

Each recipe consists of one or more ingredients and is identified by the quantity of ingredients that is included in a recipe. A user can randomize one or more recipes. A user can also review one or more recipes by giving a rating and a text of the actual review.

ER Diagram:

https://imgur.com/e2eeehP

u/Stellaris_05 — 4 days ago

I built an HR Attrition Analysis using SQL...

Hi everyone,

I recently worked on an HR Attrition Analysis project using SQL with a real dataset.

I explored:

- Attrition rate

- Department-wise analysis

- Salary vs attrition patterns

One key insight:

Low salary roles had significantly higher attrition.

I’m still learning, so I’d really appreciate feedback:

- Is my analysis approach correct?

- Anything I could improve?

reddit.com
u/Heavy_Principle9574 — 7 days ago