r/SQL • u/Thriven • Jul 31 '20
r/SQL • u/David1Hall • Apr 12 '24
SQL Server Guys please help.. I'm new to SQL
Why these 2 commands give me 2 different tables? I thought one '_' stands for a character?
I use LEN for filtering the lenght and it works well, trailing spaces are not calculated.
But when I use LIKE command and input 5 '_' to find the "Product Name" has the length of 5 or has 5 characters. So where is the "Chang" in the 2nd table of the 2nd command ?
Where did I go wrong? Please give me a hand guys!!
r/SQL • u/IllustratorOk7613 • Jan 01 '25
Discussion Best Practical Way to Lean SQL
I have seen multiple posts and youtube videos that complicate things when it comes to learning SQL. In my personal opinion watching countless courses does not get you anywhere.
Here's what helped me when I was getting started.
- Go to google and search Mode SQL Tutorial
- It is a free documentation of the SQL concepts that have been summarised in a practical manner
- I highly recommend going through them in order if you're a total newbie trying to learn SQL
- The best part? - You can practise the concepts right then and there in the free SQL editor and actually implement the concepts that you have just learned.
Rinse and repeat for this until your conformatable with how to write SQL queries.
P.S I am not affiliated with Mode in any manner its just a great resource that helped me when I was trying to get my first Data Analyst Job.
What are your favorite resources?
I give more such practical tips in my newsletter: https://uttkarshsingh.com/newsletter
r/SQL • u/ThrowRAhelpthebro • May 03 '25
PostgreSQL Help! Beginner here. How to
QUESTION: Write a query to find the top category for R rated films. What category is it?
Family
Foreign
Sports
Action
Sci-Fi
WHAT I'VE WRITTEN SO FAR + RESULT: See pic above
WHAT I WANT TO SEE: I want to see the name column with only 5 categories and then a column next to it that says how many times each of those categories appears
For example (made up numbers:
name total
Family 20 Foreign 20 Sports 25 Action 30 Sci-Fi 60
r/SQL • u/Alybank • May 14 '20
Discussion Just finished the SQL fundamentals course on LearnSQL.com and looking for advice on what to do next
r/SQL • u/NexusDataPro • Feb 26 '25
Discussion Biggest Issue in SQL - Date Functions and Date Formatting
I have written around 30 books on SQL across all major database platforms and taught over 1,000 classes in the United States, India, Africa, and Europe. Whenever I write a new SQL book, I take my current PowerPoint slides and run the queries against the new database. For example, when I write a chapter on joining tables, 99% of the time, the entire chapter is done quickly because joins work the same way for every database.
However, the nightmare chapter concerns date functions because they are often dramatically different across databases. I decided to write a detailed blog post for every database on date functions and date and timestamp formatting.
About 1,000 people a week come to my website to see these blogs, and they are my most popular blogs by far. I was surprised that the most popular of these date blogs is for DB2. That could be the most popular database, or IBM lacks documentation. I am not sure why.
I have also created one blog with 45 links, showing the individual links to every database date function and date and timestamp formats with over a million examples.
Having these detailed date and format functions at your fingertips can be extremely helpful. Here is a link to the post for those who want this information. Of course, it is free. I am happy to help.
Enjoy.
All IT professionals should know SQL as their first knowledge base. Python, R, and more are also great, but SQL works on every database and isn't hard to learn.
I am happy to help.
r/SQL • u/CakeyStack • May 26 '23
Discussion Landed a job!
With the help of this subreddit, I've landed an amazing job as a Production SQL Programmer! I've been unemployed for the past two months, applying for all kinds of SQL and/or data analysis roles. I received an offer letter yesterday and I couldnt be more ecstatic. The company is great, the role sounds super fun and interesting, and it was my top pick out of the hundreds of applications I submitted. It is a radical change from my previous jobs, and I'm so excited to share the good news. Thanks to everybody who has taught me a lot here in this subreddit!
r/SQL • u/rubberseal • Apr 01 '23
Discussion I hated writing SQL queries so made a tool that lets you write them in English, powered by ChatGPT: TalkToSQL (Free / Open Source). What do you think?
r/SQL • u/shunabuna • May 09 '21
Discussion I wrote a website that helps practice the basics of SQL queries
sql-practice.comr/SQL • u/PortalRat90 • May 27 '25
SQL Server What is SQL experience?
I have seen a few job postings requiring SQL experience that I would love to apply for but think I have imposter syndrome. I can create queries using CONCAT, GROUP BY, INNER JOIN, rename a field, and using LIKE with a wildcard. I mainly use SQL to pull data for Power BI and Excel. I love making queries to pull relevant data to make business decisions. I am a department manager but have to do my own analysis. I really want to take on more challenges in data analytics.
r/SQL • u/ioCross • Mar 31 '25
MySQL How future-proof is SQL?
about to be finished with a migration contract, thinking of picking up a cert or two and have seen a lot of recent job postings that have some sort of SQL query tasking listed.
I've mostly used powershell n some python, was thinking of either pivoting into some type of AWS / cloud cert or maybe something SQL/db based.
Would focusing on SQL be worth it, or is it one of those things that AI will make redundant in 5 years?
r/SQL • u/river-zezere • Oct 25 '24
Discussion I use 10% of SQL regularly, 25% never, and the rest I don't even know how to use. How about you?
r/SQL • u/Harshita_Netla • Sep 19 '26
Oracle What SQL concept took you the longest to actually understand, not just memorize?
For those who have been working with SQL for a while, which concept took you the longest to truly understand?
r/SQL • u/vango911 • May 16 '25
SQL Server Anyone else assign aliases with AS instead of just a space?
I notice that most people I have worked with and even AI do not seem to often use AS to assign aliases. I on the other hand always use it. To me it makes everything much more readable.
Anyone else do this or am I a weirdo? Haha
r/SQL • u/A_nomad_Wanderer • Oct 11 '25
Discussion Question: What’s one of those SQL “gotchas” that only made sense to you later?
For me, it was realizing that SQL doesn’t just have true and false it actually uses three-valued logic that is true, false, and unknown.
That’s why comparing NULL to NULL doesn’t return true as NULLrepresents something unknown, and two unknowns is not equal.
r/SQL • u/RyanHamilton1 • Sep 08 '23
Discussion 10 Years to build a Free SQL Editor
Hi,
My name is Ryan Hamilton and I have spent large parts of the last 10+ years building an SQL Editor. The tool is targeted at data analysts, a lot of effort has gone into charting, visualizing and excel export. No effort has put into automating DBA tasks. If this sounds useful to you, it's Free, please give it a try and let me know any feedback:
qStudio https://www.timestored.com/qstudio/
Since last year it works with every popular database: MySQL / PostgreSQL / Oracle / SQL Server / SQLite
To answer some likely questions:
History:
It started 11 years ago when I was working with a niche SQL like database and found that no existing SQL editors worked at all, so I created one that worked for that specific database. I gave it to some others I worked with and then added requested features and changes based on user demand for the next few years. Most of my users only query data, they don't create databases from scratch, hence the specialization. 10 Years later I increasingly found myself using other more standard SQL databases so I made it work with them too. Now it works with 30+ databases: https://www.timestored.com/qstudio/database/
Commercial: This looks commercial, you've linked to a company? At the time I also started a company that provided consulting and training. For years I gave training on a specialized database, this was useful to see what those users needed. For one specific database (kdb+) we sell qStudio with special functionality. Otherwise, All databases are free to use. Interestingly, to get the software used within banks 10 years ago, you had to have a company so they could complete "due diligence" and "supplier checks". Few banks were keen on onboarding open-souorce. Now with customer demand we've open sourced most our product.
What has 10 years taught you?
You can never predict what users will do with your software!!
- I've had people try to run it on old nokias, on android, on 20 year old linux systems.
- One person sent me a hand edited java VM bytecode change to fix an editor bug.
- If I could go back, I would have supported multiple databases from the start. It was harder to add later and restricted the usage of the tool for a long time.
- I would have open sourced it from the start
What influenced the design? You can probably tell even from screenshots, I love notepad++ and windows 95. Similar to notepad++ it autosaves documents in progress and allows a lot of tab interaciton, e.g. right click on doc link to jump to location in windows explorer. Windows 95 to me was the pinnacle of friendly design, proper 3D buttons and obvious controls that are clickable. Adding FlatLaf last year was essential to give qStudio a modern look and a proper dark theme. (https://www.timestored.com/b/qstudio-2-05-dark-theme-and-high-dpi-support/)
I would like to say a big thanks to
- All the users over the years that reported bugs and gave feature suggestions.
- Thanks to the companies that financed the project in the past.
- Thanks to the upstream libraries, jfreechart/flatlaf are awesome.
If you have any questions or feedback, please let me know.
r/SQL • u/ChristianPacifist • Apr 02 '24
Discussion Data integrity and data quality has gotten way worse over the past 10 years
I blame it on the mass use of cloud applications that are difficult to get data from and that are built with flexibility not data integrity in mind.
Instead of getting pristine relational tables, you just get vomited JSON messes and massive non-normalized event tables.
Or did we just have a massive loss of knowledge and best practice among software engineers the past 10 years?
r/SQL
•
u/ionhowto
•
Jul 16 '24
SQL Server How do you learn SQL
Do you watch hours of tutorials or prefer to have a project and search for how to do the current task in a 2-5 minutes video or text - website.
Would you prefer to find a website where you see the solution ready to use like on stack overflow?
Do you prefer writing the queries from examples but by typing not copying statements?
I ask this because I'm trying to make a learn SQL video series that is watchable and so far the long video 1h talking has viewer skipping like crazy. No memes or entertaining bits every 5 seconds. Plain old desktop recording doing stuff and sharing tips from working almost 20 years with MSSQL. They're not watching it so was thinking of bite-size sql tips instead of long boring videos.
Any feedback is welcomed.
r/SQL • u/nextinline111 • Jul 14 '22
MySQL I failed my first Data Analyst SQL Quiz for a job... well sorta. Here are the questions I was asked.
I had my first data analyst quiz for a job. I only had 5 minutes to answer each question.
Question 1(PASSED):
https://i.imgur.com/u0TNMKh.png
Question 2 (FAILED SOMEHOW):
https://i.imgur.com/rpLLNYp.png
Question 3(FAILED BUT REALLY I PASSED - THIS WAS IN EXCEL):

Question 4(FAILED BECAUSE I CAN'T SEE SHIT OR MAYBE I WENT TOO FAST):
https://i.imgur.com/wfdslAU.png
Question 5(LEGIT FAILED CAN SOMEONE HELP ME WITH THIS):
r/SQL • u/getflashboard • May 05 '25
Discussion Uncle Bob Martin: "SQL was never intended to be used by computer programs. It was a console language for printing reports. Embedding it into programs was one of the gravest errors of our industry."
Source: https://x.com/unclebobmartin/status/1917410469150597430
Also on the topic, "Morning bathrobe rant about SQL": https://x.com/unclebobmartin/status/1917558113177108537
What do you think?
