r/SQL

▲ 1 r/SQL

Please help ( for my interview )

Hi guys , I'm really new to the programming world ( a fresher) I got an int"view and I really need to know about SQL basics and databases and also azure data factory , can anyone help?

reddit.com
u/witchingal-6016 — 5 hours ago
▲ 56 r/SQL+2 crossposts

I watched 4 hours of Databricks Data + AI Summit 2026 so you don't have to.

My first major project as a Senior Data Engineer, was migrating a decade-old time-series database for a semiconductor company to the cloud. The constraint: sub-second latency on customer queries. Equipment monitoring and predictive maintenance don't work with slow data.

We had Delta Lake for storage, but it couldn't guarantee the query performance we needed.
At the time, Databricks serverless warehouse did not exist.
So we built an additional layer on top: Azure Data Explorer (ADX). The data pipeline became: ingest source data, move to Delta Lake, replicate to ADX, serve queries from ADX.

It worked. Customers got their sub-second latency. But we'd introduced yet another system to maintain, another cost line, another place for things to fail. It was the price of solving the problem at that time.

This past month at Data + AI Summit 2026, Databricks announced Reyden.

A new query engine. Millisecond performance. Massive concurrency. Running directly on your lakehouse. No separate system. No copy. If production matches the demo, a lot of horizontal architectures will collapse into one component. One lake. One source of truth.

That's why I'm watching this closely. They looked at a niche problem I lived through and built a real solution.

Here are the 3 things from the summit that actually matter for data engineers:

  1. Reyden: Millisecond queries on your lakehouse (no more separate real-time database)
  2. Genie Zero Ops: Automated pipeline repair that tests fixes before you see them
  3. Genie Ontology: AI that understands your business through a permission-aware knowledge graph

Did you watch the recent event? What do you think is the next big feature of Databricks to look out for.

reddit.com
u/RevolutionShoddy6522 — 23 hours ago
▲ 26 r/SQL

Why do we need abstractions over SQL?

When I mean abstractions, I mainly mean OOP and ORMs.
SQL is so simple and beautiful. Tables with rows and columns are easy to understand. And once you pick up the SQL syntax, you can pretty much achieve anything with queries. Not to mention that SQL is universal and works everywhere and anytime.

Then you have the software development world... where you're asked to constantly use ORMs or map records as OOP objects. Why? ORMs are limited and do not have the flexibility of simple queries. Also mapping records as objects increases bloat, reduces performance that can hurt if the application grows and is overall not as straightforward to work with.

The only good things that ORMs are doing by default are to provide data safety and prevent SQL injection. But with some minimum and basic knowledge and discipline, you can write pure queries without having those problems. Any ideas?

reddit.com
u/yughiro_destroyer — 1 day ago
▲ 15 r/SQL+3 crossposts

plruby 2.4.0

PL/Ruby is a procedural-language handler that lets you write database functions in Ruby, stored and executed inside PostgreSQL. You get the expressiveness of Ruby and its standard library with the full power of a native PostgreSQL function: plain functions, set-returning functions, triggers, event triggers, and procedures with transaction control.

You can get it here (github).

Documentation

u/linuxhiker — 18 hours ago
▲ 13 r/SQL+1 crossposts

A quick question for SQL veterans about memorization and debugging

Hey everyone! I’m working on a data analyst project right now and wanted to get some insight from the pros regarding industry-standard workflows. 🛠️

Instead of a generic learning question, I have two specific questions about how experienced data professionals operate daily:

1. Function Memorization vs. Documentation lookup 📚
How do you veterans balance memorizing syntax versus using external references? Coming from Excel, the built-in Intellisense hints made writing formulas easy. SQL feels like it requires a massive amount of mental overhead. Do you actually memorize every single window function and string manipulation method, or is heavy reliance on documentation and Google completely normal in a production environment?

2. AI Code Review for Syntax Troubleshooting 🤖❌
I find myself losing time to minor syntax errors, like misplaced commas or incorrect logical sequencing in complex GROUP BY and HAVING clauses. Is it considered acceptable by industry standards to use AI as a quick debugging partner to spot these syntax errors, or should I be focusing on a different method to build code accuracy?

Appreciate any insights on how you optimize your daily coding workflow! 🚀

reddit.com
u/Amazing-Egg6127 — 1 day ago
▲ 2 r/SQL+2 crossposts

I built an MCP server that makes AI agents open a "PR" before touching my database

*disclaimer I am the author*

Having an AI agent work on the database is a bit cringe for sure; I mean, it would be a disaster if something went wrong.

The database is the core of any system, and I wouldn't let an agent do whatever it wants on it.

That is what inspired the nuzur mcp server; the agent can propose changes to the data or the schema, and then I can review them visually and see exactly what it is trying to do instead of looking at a large blob of text.

The changes are versioned; I know what changed when, and that way I get the best out of both worlds the agents speed up my workflow, but I still have some control over it.

Would love to hear your thoughts on it!

---

Site: https://nuzur.com/
MCP server: https://ccmcp.nuzur.com/
Simthery: https://smithery.ai/servers/nuzur/ccmcp

u/mklfarha — 1 day ago
▲ 6 r/SQL

Restoring/importing SQL databases. SQL 2012 to 2019?

Hello,

A vendor said we'll need to go to SQL 2019 - we are currently on 2012. They don't support newer versions of SQL.

I have a new server set up with SQL 2019.

On the 2012 server - I right clicked, tasks, backup. I've copied all the backups to the 2019 server.

I'm not sure if I attach, restore, import on the 2019 server. I don't claim to know squat about SQL so don't hesitate to spoon feed your answers. I'd prefer to use the GUI over powershell if possible. I imagine it is straight forward but I thought I'd talk to people who know a lot more about this before I just googled it.

I right clicked on Databases, went to restore, but then it says no backupset selected to be restored - I have the file on the hard drive of that server, but don't know how to point to it to restore it.

reddit.com
u/Deep-Egg-6167 — 1 day ago
▲ 12 r/SQL+4 crossposts

Resume review

I'm a 2024 BBA graduate transitioning into Data Analytics and applying for entry-level Data Analyst roles in India. I've built projects in SQL, Python, Excel, and Power BI, but I'm not getting as many interview calls as I'd like. I'd appreciate honest feedback on my resume.

u/Plastic-Buddy6324 — 1 day ago
▲ 10 r/SQL+1 crossposts

Query Trace - Internal Viewer new feature

If you haven't seen it, Internals Viewer is a free tool for visualizing SQL Server internals, including allocations, pages, records, and indexes. It can run on a live database, or open a detached .mdf file.

I've been tinkering with it on and off for a long time. I was looking into locks recently and thought it would be useful to see if I could integrate some sort of visualization into the app. One thing led to another which led to something different yet hopefully useful!

The new query trace feature allows you to run a query and see the actual page I/O connected to the query plan on a timeline. Combined with the existing allocation and index visualizations you can see how a query is scanning or seeking and also how things like hash joins and loop joins are actually running from the perspective of the storage engine and how data streams through the operators.

The app is purely for educational purposes. I created it to help my understanding after reading blogs and books on internals so if you're interested in that area the tracing will hopefully be of use.

An upcoming release will show data modifications captured during the trace from the transaction log to show what a query is doing on a log entry basis on a page/row level.

It's available for free via the Microsoft Store or Github

(...but don't use it on a production database)

reddit.com
u/danny-sg — 1 day ago
▲ 5 r/SQL

Moving my family business off pen & paper: How do I practice data modeling for a complex, real-world system without breaking operations?

I’m a former junior software developer who recently transitioned into running my family's business. Right now, literally every record is kept via pen, paper, and physical registers. It works, but it's wildly inefficient, completely un-queryable, and doesn't scale.

I want to build a digital system, but I am terrified of breaking what already works. When I sat down to map out the data model, the scope exploded. Tables and fields multiplied fast, and I quickly got overwhelmed trying to ensure the model would support future business questions without painted-in corners.

The Hurdles:

  • Scope Creep: Simple CRUD apps are fine, but modeling an entire, intertwined legacy business is causing massive analysis paralysis.
  • Fear of Failure: Since it's production for a live business, an incorrect schema choice could actively hurt day-to-day operations or result in missing data down the line.
  • Lack of Advanced Practice: I can design basic relationships, but I lack confidence in advanced, production-grade domain modeling.

My Questions for the Community:

  1. How do you approach modeling a messy, real-world domain from scratch without getting overwhelmed by the sheer volume of tables?
  2. Are there any specific frameworks, books, or resources that bridge the gap between "beginner textbook database design" and "production-grade enterprise modeling"? (e.g., Database Design for mere mortals ?)

Appreciate any advice from folks who have transitioned legacy businesses or designed complex domains solo!

reddit.com
u/Fast-Suspect-7599 — 1 day ago
▲ 0 r/SQL

Can you answer the SQL question that came up in a Google data analyst interview?

Not rhetorical. Here's one that's been reported from real Google data analyst screens:

For each month in 2024, find the top 3 search queries by total search volume. In case of a tie, include all tied queries.

Sounds straightforward. Most people reach for RANK() and get it wrong. The reason is how tied results interact with the top 3 cutoff. DENSE_RANK() is the right call and knowing why is exactly the kind of thing that separates people who pass SQL screens from people who don't.

Companies like Meta, Amazon, Netflix and Airbnb have their own versions of this. The specific tables and business context change but the underlying pattern is consistent enough that practicing real reported questions makes a noticeable difference.

I've been building out a Career Hub on QueryCase with SQL questions sourced from actual candidate reports at these companies. You write the solution in the browser and get a worked answer that explains the insight most people miss, not just the correct query. There's also a rapid-fire MCQ section for the non-SQL parts of data interviews: business metrics, A/B testing, stakeholder questions.

If you want to try the Google question above or a few others: querycase.com

Feedback on difficulty and question selection very welcome, still building it out.

https://preview.redd.it/019rqevp6fbh1.png?width=1065&format=png&auto=webp&s=08fb61b33bb73eab834ddf8e21432fe5756fb802

reddit.com
u/conor-robertson — 2 days ago
▲ 3 r/SQL+3 crossposts

Making AI Schema-Aware

I built a small open-source CLI because AI kept struggling with SQL against a large Oracle schema. It makes AI schema-aware before it writes SQL.

The workflow is simple:

  1. Search database metadata
  2. Pull table context
  3. Run small read-only checks
  4. Save useful SQL
  5. Store domain notes in Markdown

It is Oracle-only right now and still early, but it has already helped in my own AI coding workflow. Used it mainly with github copilot

Repo: oracledb-navigator

Curious if others are solving AI + database context in a similar way.

u/clean-apps-dev — 2 days ago
▲ 0 r/SQL

Root Password

I installed mysql and its asking for the root password which I cant remember. I dont even remember having mysql on this computer before.

Any suggestions?

reddit.com
u/eusebios89 — 2 days ago
▲ 0 r/SQL

how do bi tools handle sql dialects without regex

im building a bi tool that supports multiple sql databases and we are hitting lots of edge cases because of regex based sql generation and rewriting how do mature bi platforms solve this do they use ast sql parser dialect compiler or something else looking for advice from people who have built similar systems

reddit.com
u/Altruistic_Load_4369 — 2 days ago
▲ 38 r/SQL

Episode II of SELECT * FROM LIFE;

One thing about me: I absolutely love making art. 🎨

(You can probably tell from the slightly unnecessary number of sketch pens I own. 😅)

Whenever I'm about to draw, I instinctively organize them—first by color, then by shade. It makes finding the exact pen so much easier, and I can spend more time creating instead of searching.

And somewhere in the middle of doing that today, my data brain interrupted:

"Wait... that's basically ORDER BY." 😂

So this became Episode II of my SELECT * FROM LIFE; series.

The idea behind this series is simple: taking everyday moments and turning them into SQL doodles. I'm hoping it makes SQL feel a little less intimidating—and a little more fun.

This is also a little different from the doodles I've shared before. Most of my older ones featured cats 🐱, but I've been experimenting with different styles.

Would love to hear what you think! Feedback, suggestions, or ideas for future SQL concepts are always welcome. 😊

u/Ok-Adhesiveness-8757 — 3 days ago
▲ 118 r/SQL

PAWQL #2: WHERE

I’m trying something fun to make SQL feel a little more friendly (especially for fellow cat lovers 😸). This doodle explains WHERE (I’ve already explained SELECT and FROM in one of my previous doodles!) — and I’d really appreciate any feedback. Thanks for taking a look! :)

u/Ok-Adhesiveness-8757 — 4 days ago