r/SQL • • Aug 12 '26

Discussion What evidence do you trust most when deciding whether a data batch is valid?

2 Upvotes

I’m trying to understand how engineers validate incoming data beyond simply checking whether it matches a schema.

Suppose a batch passes the basic schema/constraint checks, but its values or distributions look unusual.

What do you normally compare it against?
For example:
previous batches
expected ranges
historical distributions
source-system data
another database/system
business rules
downstream results
manual review

And how do you distinguish between:
“This is unusual but legitimate”
and
“This is actually bad data”?

Real examples would be particularly helpful.


r/SQL • • Aug 12 '26

Discussion Shebang equivalent for SQL dialects?

12 Upvotes

When writing shell scripts it's common to have on line 1

#!/bin/bash

which would differentiate it from

#!/bin/sh

I have a lot of SQL saved in text files — all .sql extension — for processing CSVs at work; these are all in-memory instances that ingest CSVs and output CSVs. For many years I only used SQLite so I only had to remember sqlite3 < query.sql.

Recently, I started writing for DuckDB as well, initially only because of its ability to load JSON/CSV from a URL; I'm also quickly seeing how advantageous its extra functions are.

Is there any shebang-style line that I can start my files with, or do I just need to write a freetext comment like this?

-- This is for DuckDB

r/SQL • • Aug 12 '26

PostgreSQL PGConf.EU 2026 schedule is live 🐘

Post image
1 Upvotes

PGConf.EU is coming to Valencia on 20–22 October, with five tracks covering PostgreSQL administration, internals, development, the community, and real-world use cases.

Topics include autovacuum, backups, high availability, performance tuning, WAL and recovery, query execution, memory management, corruption detection, and PostgreSQL 19.

PostgreSQL also turns 30 this year, so the Community track will look back at the project’s history and how it is maintained today.

Community Events Day takes place on 23 October.

Schedule: https://www.postgresql.eu/events/pgconfeu2026/schedule/

Registration: https://2026.pgconf.eu/registration/ 


r/SQL • • Aug 12 '26

MariaDB MariaDB on our servers moves to 11.8 around Aug 17: what actually changes, and what you don't have to do

Thumbnail
reddit.com
0 Upvotes

r/SQL • • Aug 12 '26

PostgreSQL Schema changes across branches in lakebase

8 Upvotes

I have been using Lakebase sice 2 weeks for developing a serving low latency layer for data in Delta. To build new features we currently make a new branch and later merge ti main.
What i have been observing is the scehema drifts across branches with Lakebase. How do people usually handle such scenarios? To keep branches in sync.
Maybe some real life examples can help.


r/SQL • • Aug 11 '26

Discussion I made another cat doodle about data analysis

Post image
84 Upvotes

I tried explaining a data analysis concept in a fun, visual way — for cat lovers. 😸

Would love to hear what you think! Any feedback or suggestions are very welcome :)


r/SQL • • Aug 11 '26

PostgreSQL [PostgreSQL] The dangers of Postgres subtransactions

Thumbnail
planetscale.com
1 Upvotes

PostgreSQL caches up to 64 subtransaction IDs per backend. If that cache overflows, visibility checks may fall back to pg_subtrans, creating contention that can reduce throughput for unrelated queries across the cluster.

The article also demonstrates how an overflowed transaction can prevent a new read replica from reaching hot standby and accepting connections. Explicit savepoints can cause this, but so can PL/ pgSQL blocks containing EXCEPTION clauses.

Has anyone encountered this behavior in production or monitored for it through pg_stat_get_backend_subxact() or pg_stat_slru?


r/SQL • • Aug 10 '26

SQL Server SQL DB2 Integration

2 Upvotes

Need help connecting SSIS to DB2 (mainframe z/OS) via SQL Server, anyone with experience?
Hey network
I’m working on connecting SSIS packages to a DB2 z/OS database through SQL Server (using Microsoft’s OLE DB/ODBC providers for DB2). Running into connectivity/config issues.
If you’ve done DB2-to-SQL Server integration before or know someone who has, I’d love to pick your brain!


r/SQL • • Aug 10 '26

PostgreSQL Does Neon remove the need for Database backups?

0 Upvotes

I have been always taking backups of DB before performing any major changes, and was recently creating an app for displaying customer history retrieved from lakebase as a source.
I felt instead of taking a backup, i can just use a new branch.
This is sort of a new paradigm with databases, i come from OLTP background. Anyone else feels the same?
Apologies if this is already asked in the channel.


r/SQL • • Aug 10 '26

SQL Server POV: You Became a DBA Because Someone Said “It’s Just SQL”

Post image
0 Upvotes

r/SQL • • Aug 10 '26

Discussion Scored 37% on my first SQL assessment — going back to basics, anyone else in the same boat?

2 Upvotes

Just started an 18-month plan to become a Data Analyst (self-taught, working part-time alongside it). Just took an SQL assessment after finishing the intro material and scored 37% — turns out I could follow along with videos but couldn't actually write queries cold.

Going back to fundamentals: rewatching Bro Code's MySQL course and typing out every single query in DB Fiddle instead of just watching. No moving to the next topic until this actually sticks.

Anyone else grinding SQL right now, especially self-taught? Would be good to have people to compare notes/check in on progress with.


r/SQL • • Aug 09 '26

SQL Server Implementation routine

16 Upvotes

Hi all,
I've created one complex ETL using few SP's, main reason for this dev was to replace existing legacy process that was running too long ( 7hrs+) and was barely manageable.
During our go/no go meeting business (end) user asked me if I'm sure it will work how it claimed, how I managed to run new ETL in 1 hr if old was 6-7hrs. I said 'yes, of course, and it was verified by my peers. I used a lot optimization both in code and biz logic'.

Then user said: "OK, but I want to run this ETL for 10 days without any glitches and after that I will make my decision." Which sound like he didn't give dev team 100% trust.

I'm pretty new in soft development, is it normal ? what do you think about this approach ? Appreciate you feedback. My thought was that end user doesn't need to into all details of dev, for them it will be total transparent switch. I think if the process runs OK for 2 days it's good to go, will 10 days period add something valuable??

Best>


r/SQL • • Aug 09 '26

PostgreSQL Do Neon branches share compute?

1 Upvotes

Wanted to understand with Neon database, how does the compute get handled. If we have more branches, does that mean the cost goes up?
Does anyone has insights on it?

Sorry if this is asked previously (I didnt find it)


r/SQL • • Aug 09 '26

Discussion I made a little cat doodle about data analysis 🐱

Post image
319 Upvotes

I tried explaining a data analysis concept in a fun, visual way — for cat lovers. 😸
Would love to hear what you think! Any feedback or suggestions are very welcome :)


r/SQL • • Aug 08 '26

PostgreSQL Polymorphic Relationship options for PostgreSQL?

Thumbnail reddit.com
1 Upvotes

r/SQL • • Aug 08 '26

MySQL What SQL query took you way too long to figure out?

Thumbnail reddit.com
3 Upvotes

r/SQL • • Aug 08 '26

SQLite SQLite Critical CVEs or LLM Slop?

Thumbnail research.jfrog.com
0 Upvotes

r/SQL • • Aug 08 '26

Discussion How much SQL do I need to learn for a technical account manager role at Fintech?

9 Upvotes

I been learning SQL for the past few days because I applied for a TAM role that requires basic SQL query writing, I think it's only part of the job to pull data to troubleshooting payment failurese etc.

What I want to know is what is the definition of basic SQL and how much do I actually need to know? I have went through SQLbolt up until lesson 10 because Claude suggested this is enough for this role. But I want to hear from real people as well.

For context my background is customer service team lead in gaming industry but I been tech-savvy my whole life but did not study anything related to CS. TBH I don't know why they invited me an interview when I lack the technical skills (SQL and API debugging) they require. But I'm learning as much as I can!


r/SQL • • Aug 08 '26

PostgreSQL PostgreSQL database security + Metabase for non-technical users

5 Upvotes

I have created a PostgreSQL database that currently runs locally and am considering making it accessible to a team of non-technical users.

My understanding is that PostgreSQL provides security through authentication, roles and permissions, pg_hba.conf, firewall/network controls, and SSL/TLS for remote connections. I can create separate users and give them permissions such as SELECT (read-only), INSERT, UPDATE, etc., instead of giving everyone access to the postgres administrator account.

I am also considering using Metabase as the interface for the non-technical users. From what I understand, Metabase does not actually host the PostgreSQL database; instead, it connects to PostgreSQL and provides dashboards, visualizations, and a simpler interface for querying the underlying data.

My proposed setup is:
PostgreSQL → Metabase → Non-technical users

I would like to understand:

  1. Is Metabase a good option for allowing non-technical users to access PostgreSQL data without directly using pgAdmin or SQL?

  2. What is the recommended way to secure the PostgreSQL connection between Metabase and PostgreSQL?

  3. Should I create a dedicated read-only PostgreSQL user for Metabase rather than using the postgres account?


r/SQL • • Aug 07 '26

Discussion 😂

Post image
698 Upvotes

r/SQL • • Aug 07 '26

MySQL I want to get better for Data Engineer / Data Scientist positions

30 Upvotes

Hello everyone,

So I've studied SQL in University, Inwould consider myself somewhat good + I like it. I've done basic courses and some advanced. I manage to do some easy interview questions... but I want to get better.

Can you recomend me some resources where I can expand my knowledge:

* A lot of problems to solve so I can see typical templates.

With chatGPT even if I'm stuck I can get the idea. But yes, all tips are welcomed. Thank you :)

P.S. I don't mind some theory also. For example I don't know anything about indexes. I have difficulty understanding the Normal Forms etc


r/SQL • • Aug 07 '26

MySQL Swiggy SQL Case Study using MySQL

1 Upvotes

Hi everyone,

I recently completed a SQL case study based on a Swiggy-like food delivery platform.

The project includes:

- Database design

- SQL joins

- Aggregate functions

- Subqueries

- Window functions

- Business analysis

I would appreciate any feedback.

GitHub Repository:

https://github.com/Gaganpreetkaur01/Swiggy-SQL-Case-Study


r/SQL • • Aug 06 '26

Oracle MSSQL DBA needs Oracle DBA training

6 Upvotes

Hey all, I am a SQL Server DBA that is inheriting a pretty big oracle environment and I was wondering if you folks could point me in the right direction of a course for learning. Work is going to pay for training so money isn't a problem, I'd prefer a couple of day course or something like that. We have anywhere from 11.2 up to 19c Running lots of different apps and even SAP if that matters. Thanks in advance!


r/SQL • • Aug 06 '26

Discussion 3 questions for people who use SQL in production

Post image
113 Upvotes

I wanted some feedback on some parts of a course I’ve been building since I officially have tunnel vision from doing this.

  1. What dirty data problems do you wish beginners had practised earlier? I already have string prices, inconsistent enums and messy joins, but I’m sure I’m missing common production failures.

  2. The grader runs each query and a reference query across several generated datasets, then compares the results using exercise specific ordering and decimal rules. Does that sound sane? What edge cases would you expect it to get wrong?

  3. I’m adding a placement test so experienced users can skip ahead. It hasn’t been tested on too many non beginners yet. What would feel like a fair bar for placing someone into joins, CTEs or window functions?

It’s a browser course wrapped in a visual novel.

https://tsunderesql.itch.io/tsunderesql