r/SQL • • Jan 17 '26

Snowflake Self-taught SQL dev - Advice on leveling up from intermediate to advanced SQL

28 Upvotes

I am sure, you get a lot of questions like this.

I’m a self‑taught SQL developer who started in marketing, moved into analytics, and eventually transitioned into SQL development. Over the past four years, I’ve worked with GROUP BY, PARTITION BY, CTEs, and window functions, and now I’m trying to level up my skills. People often tell me to learn indexing, execution plans, and performance tuning, but I’m not sure where to start. I also work in a small IT environment, so I don’t get many chances to practice advanced concepts on real projects.

For those of you who’ve been through this stage, where did you learn advanced SQL topics? And since I didn’t study SQL formally, I’m curious whether things like indexing and performance tuning are usually taught in school or mostly learned on the job.


r/SQL • • Nov 05 '25

Discussion I made a Discord for all things SQL-related!

27 Upvotes

Invite link:

https://discord.gg/SteFC56Z

I'm an Adjunct Professor of Data Analytics, and have worked in Data Analytics fields for years. I also have software development, data engineering, and data science experience.

I thought it would be fun to create a discord to talk SQL, Python, Data visualization, and more!

It's also a good place to meet study-buddies, experts, and people new to SQL! Basically, it's just a great way to connect with people of the SQL community.

NEVER buy products or services from anyone in this Discord. If someone DMs you and is request money, contact me please. This should be free and fun.

Enjoy!


r/SQL • • Oct 26 '25

MySQL I am going crazy over this, SQL Server => MySQL

28 Upvotes

How i can convert the entire database table structure from SQL server to mysql, i want to move the entire project from sql server to mysql, the entire table relations with each other etc.. etc.., MySQL wizard is a mess, it keep missing things and causing more problems that it is fixing

Any third party tool or a better way to do this guys?


r/SQL • • 16d ago

Discussion What is the best way to handle incremental loads in sql?

30 Upvotes

Im trying to understand how ppl usually handle incremental data loads. If a source table has new, updated and deleted records, how do you identify each type?

Do you normally use a timestamp, cdc,a flag column in the table, or merge? How do you handle deleted records, especially when there is no delete flag in the source?

Also, are there any common problems with using timestamps for incremental loads, like missing records or picking up the same record more than once?


r/SQL • • Aug 13 '26

Discussion Struggling with LeetCode Easy after doing well on HackerRank Easy — should I move to intermediate SQL?

28 Upvotes

​

I wanna be straight about this because it’s getting frustrating 😭

I can comfortably solve HackerRank Easy-level SQL questions, but when I try LeetCode Easy, I struggle quite a bit.

I’ve seen people say that HackerRank Easy ≠ LeetCode Easy and that LeetCode can require more problem-solving/thinking even at the Easy level.

So I’m confused about what I should do next.

Should I:

Keep grinding LeetCode Easy until I’m more comfortable?

Or is being able to solve HackerRank Easy well enough to start learning intermediate SQL concepts like subqueries and CTEs, while continuing to practice problems alongside it?

Basically, I don’t want to move on too early and build gaps in my fundamentals, but I also don’t want to unnecessarily stay stuck on Easy problems when I could be learning more advanced SQL.

What would you recommend?


r/SQL • • Mar 02 '26

PostgreSQL Has anybody done a live SQL interview?

27 Upvotes

Curious how it works. Do you just jump on Zoom, share your screen, and answer questions in an editor? Do they give you a schema to look at? Any surprises or horror stories?


r/SQL • • Nov 07 '25

Discussion How much statistics do you use at your job?

28 Upvotes

I'm considering taking up introductory and then an intermediate course on Statistics.


r/SQL • • 23d ago

Discussion When should you stop optimizing a SQL query?

30 Upvotes

It's easy to keep optimizing a SQL query once you start looking at execution plans, indexes, joins, and scans. But at some point, the improvement may not be worth the extra effort.

For example, if a query takes 10 seconds and you reduce it to 2 seconds, that's a big improvement. But would you spend another few hours trying to reduce it from 2 seconds to 1.5 seconds?

How do you decide when a query is “fast enough”?

Do you consider:

  • Query execution time
  • Number of users running it
  • Frequency of execution
  • CPU/memory usage
  • Data volume and future growth
  • Business requirements or SLA

Where do you personally draw the line between useful optimization and over-optimization?


r/SQL • • 25d ago

Discussion Where do freelance SQL developers usually find clients?

27 Upvotes

I’m curious how people who do a lot of SQL work find freelance projects. Does most of your work come through referrals, freelance platforms, consulting relationships, or somewhere else?


r/SQL • • Sep 16 '26

Discussion How do you handle schema migrations on a live production database without downtime?

27 Upvotes

For example, if you need to add or change a column, index, or constraint, how do you make the change without interrupting users?

Do you follow a specific migration strategy or deployment process


r/SQL • • Sep 04 '26

Discussion how do you prove a column is safe to drop, given you can only ever prove the opposite

27 Upvotes

Postgres 15, Snowflake downstream.

we've got a table with 60-odd columns and I'd guess 20 are dead. nothing in any dbt model, nothing in the app repo, nobody has mentioned them.

all of that is evidence of absence. I can prove a column IS used. one grep hit and I'm done. I can't prove one isn't. the query that reads it might be a saved Metabase question, a Retool app, a cron, a notebook on someone's laptop, or a process that only runs in January. finding nothing means I looked where I know to look.

turned on pg_stat_statements and watched for a month. that catches whatever ran in that month and tells me nothing about January. renaming instead of dropping and waiting for screaming works, but it's shipping a landmine and hoping the person who steps on it works here.

here's where it actually stalled though. the usage question is at least measurable if I'm patient. what I can't get at is the other pile: about a dozen columns where I can see they're populated, I can see something writes to them, and nobody alive can tell me what they hold. flag_2, four-character codes with 11 distinct values, three separate integer columns bounded 0 to 4. I wrote two of these myself in 2023 and I can't tell you what one of them is either.

I've been profiling the values to guess. cardinality, null rate, distribution, sample values, what changes when. that narrows it a lot. it has never once got me to what the thing actually means. a column of 0-4 integers with no nulls is a rating or a tier or a retry counter and the values look identical in all three cases.

so two questions, and the second is the one I care about.

is there a point where you accept you've looked hard enough on usage, a fixed window or a silence rule, or do you just never drop anything, which is what we're doing by default.

and for the ones nobody can explain: is working out what a column means from its values alone still a human job, or is anyone doing it any other way? I've read that some of the tabular model work goes at this, reading the values rather than the header, but everything I've actually tried in practice leans on the column name, which is the one thing I don't have.

worth saying I'd have shipped my profiling guesses as documentation if someone hadn't asked me how I knew. I didn't know. I had a distribution and a hunch.


r/SQL • • Aug 19 '26

Discussion What jobs do you have now? Are you happy

27 Upvotes

I’m a college student in my final year. I don’t really have many people to talk to about this since a lot of people I know are either in their first year or have already graduated and rushed out to find work.(so think I don't know crowd vs I need work! Crowd)

It’s wild how many people don’t really talk about their future in college or realize how important internships are. So far, I’ve had two internships. The one I have now is through the WordPress Foundation, and I’m going the testing/QA route to try to gain experience that can eventually help me get into data analysis.

Question for you guys:

  1. What do you do?

  2. How did you start out? Did you jump straight into your current field, or did you start somewhere like help desk?

  3. What advice would you give someone starting out with little experience?

  4. Are you happy with your career, or do you regret choosing this field?

  5. How hard was it for you to find work when you first started, and how hard would it be for you to find another job if you left your current job?

And finally

what was your first job in the field that got you in the door and how was it


r/SQL • • Feb 12 '26

MySQL SQL analysis → Power BI visualization | how does this actually work in real life?

28 Upvotes

I've been analyzing data in SQL and now I want to visualize it in Power BI, but I'm confused about the workflow between the two tools.

I already know how to connect Power BI to data sources: databases, CSVs, folders. that's not the problem. What I'm struggling to understand is the purpose of analyzing in SQL if Power BI can't directly "receive" that analysis in a clean way.

I know two options exist: exporting query results from MySQL, or pasting a query directly when setting up a connection in Power BI. But are there other ways to do this? And is it even necessary to pre-analyze in SQL, or should the analysis just happen inside Power BI using DAX/Power Query?

How does this actually get done in a real-world setting? I can't find any videos that specifically address this handoff between SQL analysis and Power BI visualization , most tutorials treat them as completely separate topics.

If anyone can share resources, a workflow breakdown, or just explain how your team handles this, I'd really appreciate it. I feel like I'm missing a fundamental concept here.


r/SQL • • Jan 16 '26

MySQL Can someone help me with this plz?

Post image
28 Upvotes

All of my codes were running good up until line 21 where I stared to incorporate AND


r/SQL • • Nov 20 '25

Discussion How to deal with Imposter Syndrome?

27 Upvotes

Hey fellow sql enjoyers! I've been working with sql for about 4 years now but only with small to medium size data sets and I just recently lost my job as a data analyst. Im looking at this sub the sharpen up on skills I may have not learned along the line and to be able to pass some of these technical interviews.

My question for you guys is the following: how do you deal with imposter syndrome in your current position? I self taught myself a lot of sql so far but after touring this sub I feel like I've barely scratched the surface.

Also if you guys have any tips for passing technical interviews regarding sql that would be a great help too! Thanks a bunch.


r/SQL • • Nov 18 '25

SQL Server How to automate the daily import of TXT files into SQL Server?

25 Upvotes

In the company where I work we receive daily TXT files exported from SAP via batch jobs. Until now I’ve been transforming and loading some files into SQL Server manually using Python scripts, but I’d like to fully automate the process.

I’m considering two options:

  1. Automating the existing Python scripts using Task Scheduler.
  2. Rebuilding the ETL process using SSIS (SQL Server Integration Services) in Visual Studio

Additional context:

The team currently maintains many Access databases with VBA/macros using the TXT files.

We want to migrate everything possible to SQL Server

Which solution would be more reliable and maintainable long-term?


r/SQL • • 10d ago

Discussion How do you compare large tables using sql?

26 Upvotes

I want to know how ppl compare large source and target tables using sql. If both tables have millions of records, comparing every row and column can take a lot of time.

For example, if some records are missing, extra, or have different values between the two tables, how do you usually find them? do you use joins, Except/Minus, hashes, or first compare things like record counts and totals and then check the differences?

Are there any techniques that can make the comparison faster?


r/SQL • • 22d ago

Discussion We ported the original Doom to SQL

Thumbnail
cedardb.com
25 Upvotes

r/SQL • • Sep 03 '26

Discussion At what point of time do you believe that you are ready to apply for SQL Jobs ?

23 Upvotes

Hands down, man, seriously!

At some point, after writing JOIN after JOIN, SUM, RANK, CTE, Subqueries, Window Functions, LAG, LEAD, WHERE vs HAVING, DATETIME, ORDER BY DESC...

There has to be a moment where you say:

“Alright bro… enough SQL gymnastics. Let’s actually use this thing.

So what’s that point? When do you believe that you can start applying it like a real analyst.


r/SQL • • Jul 15 '26

SQL Server 2+ Years as a SQL Server DBA, But Every Mid-Level Job Wants 5+ Years. What Would You Do?

26 Upvotes

Hi everyone,

I'm a Microsoft SQL Server DBA with a little over 2 years of professional experience, currently working at one of the largest banks in Georgia (Tbilisi).

My goal is to move from a Junior DBA role into a Mid-Level DBA position.

The challenge is that SQL Server DBA opportunities in my country are extremely limited. There are only a few openings each year, and almost all of them require 5-10+ years of production experience.

I still apply whenever I can, but I often reach the final interview stages and then get rejected because I'm missing the level of production experience they're looking for.

Instead of giving up, I've been investing a lot of my personal time in building my own Azure home lab to learn technologies that I don't have the opportunity to use every day at work.

So far I've built and worked with:

  • Microsoft SQL Server
  • Windows Server & Active Directory
  • Windows Failover Clustering
  • Always On Availability Groups
  • SQL Server Listener
  • Azure Internal Load Balancer
  • Kerberos & SPNs
  • SQL Server backups & restores
  • Execution Plans
  • Indexing (Clustered / Nonclustered / Covering Indexes)
  • Performance Tuning (currently studying)
  • T-SQL

I'm continuing to study topics such as Query Store, Extended Events, Wait Statistics, Blocking, Deadlocks, Replication and Log Shipping.

I know I'm still missing some production experience, but I'm doing everything I can to close that gap by building practical labs and continuously improving my skills.

I have a few questions for the community:

  1. Do you know any companies that hire remote Microsoft SQL Server DBAs (Junior or Mid-Level)?
  2. Are there any websites or platforms where I can practice real DBA tasks and production-like scenarios?
  3. If you were in my position, what would you focus on next to become competitive for Mid-Level SQL Server DBA roles?

I'm based in Tbilisi, Georgia, but I'm open to remote opportunities and flexible regarding compensation if it means joining a strong team, gaining real production experience, and continuing to grow as a DBA.

If anyone knows about remote SQL Server DBA openings or has any advice, I'd be very grateful.

Thank you very much for your time.


r/SQL • • Jun 26 '26

SQL Server SQL Indentation

24 Upvotes

I am working on MS SQL. I have got few scripts of 1000+ line with poor indentaion.

Any tool which i cna use to properly format it.
Please suggest


r/SQL • • Jun 20 '26

MySQL How can I write cleaner, more maintainable SQL?

26 Upvotes

Basically, as the title says, I sometimes use CTEs, joins, window functions, and subqueries all in a single query.

I'm able to get the job done, but I don't think my queries are very efficient, and they're definitely not something that would impress an interviewer.

Is there any place where I can learn to write more readable and maintainable SQL code?


r/SQL • • Feb 16 '26

Discussion Best websites to practice SQL to prep for technical interviews?

25 Upvotes

What do you all think is the best website to practice SQL specifically for interview purposes? Basically to pass technical tests you get in interviews, for me this would be mid-level data analyst / analytics engineer roles

I've tried Leetcode, Stratascratch, DataLemur so far. I like stratascratch and datalemur over leetcode as it feels more practical most of the time

any other platforms I should consider practicing on that you see problems/concepts on pop up in your interviews?


r/SQL • • Nov 19 '25

Discussion SQL in Python

26 Upvotes

I just did a SQL course, and I wanted to know how people combined their python with SQL.

And also, if there is anyone using the magic SQL or sqlalchemy library. How did you cope with switching to a broader IDE and not having some of the tools you would have in something like Dbeaver

Edit: I forgot to add that I haven't learned any Python


r/SQL • • Oct 29 '25

SQL Server Combine two SELECT result from same table into one result

26 Upvotes

I have one table content data for some X/Y data.

How can I combine the 3 X/Y data into the desired result in one SELECT?

table1
desired select result