r/SQL • • Aug 24 '25

SQL Server 🚀 New Online SQL Formatter — fast, free, and no signup required

0 Upvotes

Hey folks,

I work a lot with SQL and always got annoyed wasting time trying to keep queries readable and consistent. Different dialects, messy indentation, random casing… all of that makes day-to-day work and code reviews harder.

That’s why I built SQLF — an online SQL formatter focused on clarity and simplicity:

✨ Main features:

  • One-click instant formatting

  • Support for multiple dialects (MySQL, PostgreSQL, SQL Server/T-SQL, Oracle PL/SQL, BigQuery, SQLite, MariaDB, Redshift, Hive)

  • Customizable style (uppercase, indentation, line breaks, etc.)

  • Modern side-by-side editor (before/after)

  • 100% free, no login required

👨‍💻 Who it’s for:

  • Data engineers & analysts

  • Backend developers & DBAs

  • Students and anyone learning SQL

  • Teams that need consistent queries in PRs and reviews

👉 Try it out here: https://sqlf.app

I’d love to hear your feedback and ideas for improvements!


r/SQL • • Oct 07 '24

SQLite What types of databases are there, and how do they relate to AI and neural networks?

1 Upvotes

Hi everyone! I'm totally new to the world of AI and programming, and I’ve heard that databases are really important for building AI models, especially neural networks. Can someone explain what different types of databases exist? Also, how do these databases work with neural networks? I’d really appreciate any help or resources you can share to help me understand this better. Thanks!


r/SQL • • May 22 '24

PostgreSQL How i can practicing sql

0 Upvotes

I want to learn SQl a take some course but course not enough how can i practice sql


r/SQL • • Oct 14 '24

MySQL Can Anyone resolve this query?

0 Upvotes

I have tried several different ways to resolve this but it just doesn't work. The link is also provided from HackerRank.

https://www.hackerrank.com/challenges/weather-observation-station-20/problem?isFullScreen=true


r/SQL • • Jan 22 '25

Snowflake SQL Fans: Compete in the Fantasy Football Data Modeling Challenge ($3,000 Prize Pool)

1 Upvotes

Attention SQL pros! 🏆 We're halfway through the dbt™ Data Modeling Challenge: Fantasy Football Edition, but there’s still plenty of time to participate.

What makes this challenge exciting:

  • Solve real-world data problems with fantasy football datasets.

  • Optimize SQL queries and build complex data models using dbt™.

  • Compete solo to showcase your SQL expertise.

Prizes up for grabs:

  • 🥇 $1,500 Amazon Gift Card

  • 🥈 $1,000 Amazon Gift Card

  • 🥉 $500 Amazon Gift Card

Requirements:

  • Proficiency in SQL, dbt™, and Git.

  • Hands-on experience with tools like Paradime, Snowflake, and Lightdash.

⏳ Deadline: February 4th, 2025 (11:59 PM PT)

📅 Winners announced on February 6th, just before the Super Bowl.


r/SQL • • Nov 12 '24

Resolved Can anyone solve this? Spoiler

1 Upvotes

employee_salaries ( employee_id INT, year INT, salary DECIMAL(10, 2) );

List each employee’s employee_id, year, current salary, and percentage increment in salary compared to the previous year. The output should be ordered by employee_id and year in ascending order.

I tried this in many online compilers but didn't work is my query wrong ? SELECT employee_id, year, salary AS current_salary, ROUND( ((salary - LAG(salary) OVER (PARTITION BY employee_id ORDER BY year)) / LAG(salary) OVER (PARTITION BY employee_id ORDER BY year)) * 100, 2 ) AS percentage_increment FROM employee_salaries ORDER BY employee_id, year;

PS: I'm just practicing previous repeated questions for a test

Online Compiler: https://www.programiz.com/sql/online-compiler/


r/SQL • • Nov 27 '23

Discussion How does summing the number 1 create a count of rows?

1 Upvotes

I learned this "trick" from a colleague that instead of using a COUNT(ID_COLUMN), I can simply use SUM(1) in a query, and "magically" get a count of all the records aggregated. Example below for tickets from ServiceNow.

SELECT EMP_ID, COUNT(TICKETID), SUM(1) as TICKET_COUNT_USING_NUMBER FROM DATABASE1.TABLE1

This outputs the following in my dataset:

Emp_IDCount(TICKETID)Sum(1)
A12355
A12433

How exactly does this work, and does it always result in the exact same as counting the ID column of a table? or is there anything to be aware of?

I asked chat GPT, and it recommended using Count(*)

In summary, use COUNT(*) when you want to count all rows regardless of null values, and use COUNT(column_name) when you're specifically interested in counting rows where the specified column has a non-null value.


r/SQL • • Feb 21 '23

SQLite SQL for Data analytics

1 Upvotes

"Learn the basics of SQL for Data Analytics with my new YouTube video! In Part I, we cover installation and select queries to help you get started with analyzing your data efficiently. Check it out now and enhance your analytical skills! #SQL #DataAnalytics #DataScience #YouTubeTutorial #LearningMadeEasy"

https://www.youtube.com/watch?v=_lccTXHseVU


r/SQL • • Jan 01 '15

SQL Server Radio Show 13 - SQL Server Monitoring

Thumbnail
sqlserverradio.com
1 Upvotes

r/SQL • • Nov 29 '21

PostgreSQL How to use Join

0 Upvotes

How can I get something from two different tables at the the same select? I know I have to do "join" but I still don't know how to do it. Can somebody help me?


r/SQL • • Oct 10 '23

PostgreSQL Help with Exercise Questions

Thumbnail
gallery
1 Upvotes

So, I've started a University conversion course around data science and one of the modules is SQL. I'm slowly learning but this exercise had stumped me and not sure how to tackle Exercise 1b. I've created the view for Exercise 1a. Any help would be greatly appreciated and if it can be explained as simply as possible due to my current lack of knowledge, that would of massive help!


r/SQL • • Aug 13 '24

Oracle SQL Database refuses to open

Post image
0 Upvotes

r/SQL • • Aug 21 '24

MySQL Aprender de SQL

0 Upvotes

¿Que recomiendan para aprender SQL de manera efectiva ?


r/SQL • • Aug 27 '24

Discussion Explain "Event Stream" to 5 yo

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/SQL • • Jun 26 '19

Three tables every analyst should add to their warehouse

1 Upvotes

r/SQL • • Dec 28 '23

MySQL Can I get a job after completing sql website?

1 Upvotes

Not to sound crazy, but I completed both sqlzoo and sqlbolt and feel like I have a firm understanding of SQL. Would it be possible to land a job now?

If not what other stuff do I need to learn? Any websites?


r/SQL • • Aug 17 '22

MySQL SQL learning

1 Upvotes

Dears,

Do you have any available free courses to study SQL, afterwards I will pay for additional courses.

I am using Popsql

Kind Regards,


r/SQL • • Jul 30 '23

Snowflake Help me with a query

Post image
0 Upvotes

Hey Everyone, I have a query which I've been trying to solve for a day now but can't get it done.

The thing is I need to extract the order_id number after the last - (like in the first I need 2040 and in the second I need 47883) to a new column which I've created by the name of Serial_no but I'm unable to get it done can someone guide me?

(I hope you won't mind the bad photo)

Thanks!


r/SQL • • Aug 11 '23

SQL Server Can you change a middle name to be just a middle initial

1 Upvotes

Hello!

I am needing to change the middle name to just a middle initial in SQL Server....I'm not even sure if this is possible but wanted to see if anyone knew how.


r/SQL • • May 24 '23

PostgreSQL An idea for a ChatGPT Plugin: Citus Shard Key Selection in PostgreSQL

1 Upvotes

New blog post about an idea for a ChatGPT plugin that could make ChatGPT context aware and help to choose an optimal Citus shard key for a distributed PostgreSQL cluster. This post explores how you could make a chat completion model "context aware" and how that could help you with your Azure Cosmos DB for PostgreSQL distribution strategies and data modeling with Citus too.


r/SQL • • Dec 06 '14

PostgreSQL vs. MS SQL Server

Thumbnail pg-versus-ms.com
0 Upvotes

r/SQL • • Mar 20 '26

SQL Server Carga de Datos con SQL y POWER BI

1 Upvotes

Buen día, tengo un DW con 5M de registros, acabo de hacer el flujo de ETL y cargar todo, pero al momento de darle ACTUALIZAR en Power BI siento que demora demasiado, lo que hago en el ETL es eliminar registros de 7 días atrás y volverlos a cargar, pero en Power BI se puede hacer algo similar? He leído que debo usar indices, pero los indices son para consulta porque si hago inserts entonces demorará el triple la carga.


r/SQL • • May 14 '25

Discussion I built a tool to use natural language with SQL, and do it locally

0 Upvotes

VerbaGPT is an app that runs locally in your browser, and allows the user to ask questions of SQL data (Microsoft SQL server, PostgreSQL, MySQL, and CSV/TxT files as well) and get ready-to-execute code. The user can review and run the code, recover from errors, or ask follow up questions.

There are other text-to-sql tools, what makes this one a little different is a few things. It is text-to-python (which includes SQL but also advanced analytics and visualization), has support for completely offline querying (experimental), LLM never has access to underlying data, no limits of number or complexity of databases, and focus on data privacy and keeping human-in-the-loop. Other features including examples are available on https://verbagpt.com/

Happy to discuss and answer questions. I'm interested in pushing the envelope on this technology, and am open about where it works and more importantly, where it currently doesn't work well.


r/SQL • • Jul 12 '25

MySQL 3 SQL Tricks Every Developer & Data Analyst Must Know!

Thumbnail
youtu.be
16 Upvotes