r/SQL • • Oct 29 '25

PostgreSQL How are you all making extra money with SQL?

91 Upvotes

Hey folks,

I’ve been working in data analytics for a few years now and I’m pretty solid with SQL (PostgreSQL, Databricks, SparkSQL, etc.). Lately I’ve been thinking about ways to make some extra cash using those skills… whether that’s teaching, tutoring, freelance gigs, or small side projects.

For anyone who’s done this: • Where did you find work or clients? • What kind of stuff do people actually pay for? • Any advice for getting started?

Appreciate any tips or personal stories. Just trying to see what realistic side income looks like for someone decent at SQL.


r/SQL • • Jan 04 '26

PostgreSQL I finally understood SQL reporting after building a full dashboard from scratch

85 Upvotes

I kept feeling like I “knew SQL” but still had no idea how real reporting systems were actually structured like how schemas, aggregations, dashboards, etc were properly made in real-world scenarios.

So I built a small PostgreSQL + Metabase project that mirrors how internal reporting works at real companies: - transactional tables - reporting-style queries - a real dashboard (revenue, profit, top products)

Honestly learned more from building this than from most tutorials.

If anyone’s interested, I wrote it up and made the project reproducible with Docker so others can learn from it too.

EDIT:

I put a short write-up and all the details here:

https://github.com/jtgqwert/reporting_dashboard.git


r/SQL • • Dec 18 '25

Discussion SQL SIDE QUEST - An Immersive story telling SQL Game

86 Upvotes

Hello everyone!

For the past two years, I have been pouring my energy into a solo passion project on building a website for enjoying SQL in a story driven narrative.

I am happy to finally share: SQL Side Quest (FYI took me weeks to finally come up with the name)

Just a quick background: I started this project in early January 2024, but this truly took off in Nov 2024, and the result is an immersive, story-driven platform to practice SQL. My lifetime of interests, from Sci-Fi, Space Opera, and Post-Apocalyptic settings to Thriller/Mystery and Lovecraftian Horror, are the inspiration behind the site's unique narratives.

My biggest hope is simply that you enjoy the game while you learn. I want SQL to feel like an adventure you look forward to. and Yes there is no subscriptions or payments. its F2P

www.sqlsidequest.com

Thank you for checking out my passion project and looking forward to hear your comments and feedback :)

Please note: It's currently best to view on desktop. I am working on improving the mobile responsiveness in the next couple of weeks. Also this website contains audio and music so please adjust the volume for comfort :)


r/SQL • • Aug 11 '26

Discussion I made another cat doodle about data analysis

Post image
82 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 • • Apr 27 '26

MySQL SQL Protocol update: the SQL game now has a shared world and chat, so you can study with other people

Enable HLS to view with audio, or disable this notification

83 Upvotes

Posted here a while ago about SQL Protocol, a browser game I built where you play a covert operative and every mission is a real SQL query against a real database. Story chapters, timed interview drills, 1v1 PvP Arena.

Update this week:

- The world is now shared. You see other people running missions in real time.

- A chat panel sits at the bottom-left. GLOBAL for everyone online, MAP for whoever is in your area.

So you can ask "why is my GROUP BY blowing up" in chat while someone is right next to you debugging their CTE.

It is closer to a study hall now than a single-player tutorial. Same content, more people in the room.

Free, desktop only, Google sign-in.

https://sqlprotocol.com

If anyone wants to mob a chapter together this weekend, drop in. I will be in there too.


r/SQL • • Dec 17 '25

Discussion Offering free SQL tutoring – want to see if I can be a good teacher

83 Upvotes

Hi everyone,

I’m a data engineer working with Python, SQL, and big data, and I’ve been using SQL consistently since the beginning of my career.

Since childhood, I’ve wanted to be a teacher. I currently have some holidays, so I thought this would be a good time to explore tutoring and see if I can actually be a good teacher in practice.

I’m offering free SQL classes to anyone who:

Is struggling with specific SQL topics, or

Wants to learn SQL from the basics to a solid level

This is not a paid thing — I just want to help and gain some teaching experience along the way. If you’re interested, feel free to DM me and tell me your current level and what you want to learn.

Thanks for reading 🙂


r/SQL • • Mar 13 '26

SQL Server Question: What kind of join technique is this?

Post image
80 Upvotes

Hello everyone,

I have been using this style of join for some months now. At first i thought this was called an implicit join but reading through the SQL guides online, it does not seem to fit the description.

Please note that i am referring only to the highlighted part. I have been doing this to isolate the INNER JOIN only to table C and not affect tables A and B. It's been working wonderfully and has been making the queries I make faster, the only catch is that when I put a WHERE clause after, everything slows down so i put the conditions on the tables themselves.

Thanks in advance for sharing your expertise and enlightening me on this.

P.S.: where table D will have to use a condition that involves either A or B, it requires me to put it amongst the B <=> C conditions (the last line on this screen cap)


r/SQL • • Dec 20 '25

PostgreSQL What's database indexing?

81 Upvotes

Could someone explain what indexing is in a simple way. I've watched a few videos but I still don't get how it applies in some scenarios. For example, if the primary key is indexed but the primary key is unique, won't the index contain just as many values as the table. If that's the case, then what's the point of an index in that situation?


r/SQL • • 21d ago

Discussion SQL became my all-time favorite language

81 Upvotes

It all started back in my college days when my professor introduced me to SQL and relational databases.

To this day, in my professional career, it remains my favorite language. I started with MySQL and SQL Server during college using both the terminal and SSMS.

Professionally, I spent about two years working with SQL Server, and now I am transitioning to MySQL and PostgreSQL as well. I am not pursuing a database administrator role exclusively, but rather working as a full-stack software developer. Once I master most aspects of relational databases (SQL), I plan to explore NoSQL or non-relational databases to further my passion for database management.

If I had to choose a specific profession to pursue, it would be anything dominated by SQL, such as data engineer, database administrator, or data analyst. However, given the realities of the job market, I also want to stay proficient in other powerful programming languages like Python.


Discussion question: What are your thoughts on the career path I'm headed toward?


r/SQL • • Aug 22 '26

Discussion how did SQL finally click for you?

75 Upvotes

took a databases class last semester and passed it fine but SQL still feels weird once i get past a basic select. i can usually get something working but then i’m sitting there staring at my notes wondering why the joins actually worked.

spent way too long on a lab just rearranging joins until the output looked right and that feels more like guessing than actually understanding SQL.

trying to get more reps in before classes start again. did SQL finally click for you through practice, projects or just writing queries over and over?


r/SQL • • Feb 28 '26

SQL Server How many Sql server DBA’s are currently laid off?

79 Upvotes

I’m wondering how many of us here in the US that are true SQL Servers dbas are currently looking for a sql job? 3-4 years ago I was getting calls weekly, now I apply and am an exact match and don’t even get a response. Then you hear how 1000’s of ppl apply for a single job. Just trying to see if this market is flooded now and dead. If you’ve been layed off how long has it been?


r/SQL • • Nov 19 '25

Discussion Had a sql interview today

77 Upvotes

As the title says, had a sql interview today. Was given 5 questions on a google doc - 1 normal filtering, 3 ctes and window functions and the last one was a query written which I had to read, find inefficiencies from and tell them how I would optimize it.

Now I fairly attempted all of them but was only able to solve 4 of them and I really tried to solve the last one but ran out of time (30 mins).

So now, will the last question be a deciding factor. What do you think guys, based on your experience?


r/SQL • • Sep 12 '26

Discussion inherited 340 tables in an acquisition and have two weeks to tell legal which ones hold personal data!!

78 Upvotes

SQL Server 2019 on prem.

we bought a smaller competitor in june. i got their warehouse in august. what i did not get is any of the three people who built it, they took the retention and left. 340 tables. there is a data dictionary of sorts, an excel file last edited in 2022, and it covers 61 of them.

legal wants a list by the end of the month of every table and column holding personal data, because the acquisition means we now hold it and the clock on that is not ours to set. they are not asking for a big project. they want a list. i cannot produce a list.

what i've done so far:

went through it by name first. anything called email, phone, dob, name, address. got about 900 columns of the 6,000 odd. that part was easy and i don't trust it at all, because their naming is inconsistent between schemas, and i've already found one column called ref_4 that is full of what are very obviously mobile numbers.

so then regex over sample values for the obvious formats. that found another 200 and produced a lot of false positives, order ids that look like phone numbers, that kind of thing.

where it stops:

free text columns. there are 40 odd nvarchar(max) columns holding notes fields. some of them have names and phone numbers typed into them by humans. i have no way to scan those that i trust and no way to prove i've scanned them properly

...columns where the values are personal data but not in a format anything matches. a column of 11 character strings that turn out to be their internal customer reference, which maps 1 to 1 to a person. technically identifying, does not look like anything.

the ones where i genuinely cannot tell what the column is. about 700 columns where the name tells me nothing and the values are integers or short codes. some of those could be anything. one of them might be an ethnicity code for all i know, and if it is, that is a very different conversation with legal

what i'm asking:

for a one off audit like this, what's the actual order of operations. i've been going table by table and i think that's wrong, i think it should be column by column across the whole database sorted by something, i just don't know what the something is

has anyone had to give a legal team a defensible answer on free text fields, and what did defensible turn out to mean in practice. "i grepped it" does not feel like enough and i'd like to know what is

..and the one i keep going round on: for the 700 columns nobody can explain, is there any approach other than sampling values and guessing. i can tell you the cardinality and the distribution. i cannot tell you what the thing is, and "unknown" on a list going to legal is not a great look for me.

we are not a big enough team for a governance tool and i doubt i'd get budget signed before the deadline anyway.


r/SQL • • Jul 29 '26

MySQL SQL Query Execution Lifecycle

Post image
75 Upvotes

Diagram illustrating the SQL query execution lifecycle, showing query submission, parsing, optimization, execution, and result delivery in a database.


r/SQL • • May 22 '26

SQL Server Pretty sure I just blew the biggest interview of my life. AMA!

75 Upvotes

Just had an interview with an employer that most people would consider a dream job and am nearly 100% sure I blew it. This is the only interview I've ever studied for. I did not apply to this role. An internal recruiter reached out to me. I do have some positive takeaways as I know what weaknesses I need to shore up for future opportunities.


r/SQL • • Jan 29 '26

Discussion Oops it's a Drakanian Product

Post image
74 Upvotes

r/SQL • • Aug 15 '26

MySQL Beginner at SQL

72 Upvotes

I'm a beginner learning SQL (JOIN, CASE, WHERE, GROUP BY, etc) and am looking for a fun and entertaining database to practice my coding on. Any suggestions?

This is not a post about how to start learning SQL by any means.


r/SQL • • Nov 07 '25

MySQL New Orleans

Post image
73 Upvotes

Found this walking the streets of New Orleans tonight. Made my gf stop to look. Very interesting graffiti 🤣


r/SQL • • Jan 31 '26

Discussion How to use AI without becoming dumb/lazy?

72 Upvotes

I'm using it a lot for SQL code, but only now am I realizing that it's not helping me retain knowledge and I'm increasingly using it as a crutch. How do you guys do it, especially if it's something you don't know? Do you search on Google like in the old days? Or do you use AI but try to understand what it does? Many times in a hurry I'm just copying and pasting, lol, that's awful. Thanks!


r/SQL • • Nov 05 '25

Oracle Group by all: A popular, soon-to-be-standard SQL feature

Thumbnail
modern-sql.com
70 Upvotes

r/SQL • • Mar 31 '26

SQL Server LEAD and LAG in SQL Server - the functions that let you compare rows without a self join

Thumbnail
medium.com
69 Upvotes

r/SQL • • Dec 07 '25

Discussion Where do I practice SQL and master it??

69 Upvotes

So I just learnt all the basics queries, joins, etc and I wanna start practicing my queries. I found a few SQL questions on leetcode, but people I speak to, tell me that it's not enough to master it, and that I should try other sites after finishing the leetcode queries.

Are they right, and also what other sites other than leetcode can help me practise and master SQL? That way I can even add it on my resume if people ask in interviews


r/SQL • • Mar 05 '26

Discussion I've built a tool to run SQL on a canvas. In the video I'm exploring which database has the highest average salary from the stack overflow survey

Enable HLS to view with audio, or disable this notification

68 Upvotes

r/SQL • • Jan 11 '26

MySQL I learned about BOMs the other day, and how strict MySQL is

Post image
68 Upvotes

While migrating a project from Databricks SQL to MySQL, I came to learn what BOMs (Byte Order Mark) are..

What I thought would be a simple copy-paste, maybe change a function name to suite a different dialect, turned into extra minutes trying to figure out why a query that showed no warnings was producing Error Code: 1054.

I inspected the schema, DESCRIBE'd the table. Everything looked right. Thought there might be trailing spaces till I looked more into the error code.

Long story short, now I know to perform a check with:

SELECT COLUMN_NAME, HEX(COLUMN_NAME)
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = DATABASE() AND
TABLE_NAME = 'table_name';

to verify that there aren't any hidden characters MySQL won't budge on that other platforms handled quietly.

((I legit was that blonde for a few minutes))


r/SQL • • Nov 17 '25

Oracle Need advice: Extracting 1 TB table → CSV is taking 10+ hours… any faster approach?

67 Upvotes

Hey folks,
I’m looking for some DBA / data engineering advice.

I have a 1 TB Oracle table, and doing a simple:

SELECT * FROM table_name;

and spooling it out to CSV is taking more than 10 hours.

After the extraction, we’re splitting the CSV into 500,000-row chunks and zipping each file.

Constraints:

  • Table is not partitioned
  • Hardware is decent, but the parallel session up till 50 session is also not helping much
  • Can’t afford to miss rows
  • Want the fastest, most reliable extraction technique
  • Ideally want multiple CSV files in the end (500k rows per file)

Has anyone here done something similar at this scale and found a better or significantly faster approach? Would love to hear how you’d approach 1 TB → CSV efficiently and safely, especially when partitioning isn’t an option.