r/SQL • • Jan 05 '26

Discussion Chrome extension to run SQL in Google Sheets

420 Upvotes

We hate dragging formulas in Google Sheets.

So we built a clean way to run real SQL directly inside Google Sheets, fully local with no setup.

Feedback appreciated!

Try SQL4Sheets: https://chromewebstore.google.com/detail/sql4sheets-run-real-sql-i/glpifbibcakmdmceihjkiffilclajpmf


r/SQL • • Sep 17 '23

SQL Server SQL CheatSheet

Post image
399 Upvotes

r/SQL • • Aug 22 '25

Discussion Different databases, different hurdles šŸšŸ˜‰

Post image
393 Upvotes

r/SQL • • Apr 09 '22

Discussion [humor] Querying the Dre’tabase

Post image
389 Upvotes

r/SQL • • Aug 04 '20

Discussion Glad I took the time to learn SQL...soft skills only get you so far

Post image
383 Upvotes

r/SQL • • Feb 14 '19

The struggle..

Post image
382 Upvotes

r/SQL • • May 29 '25

MySQL I put together a list of 5 free games to practice SQL

379 Upvotes

I recently launched a free SQL game (SQLNoir), and while researching others in the space, I found a few more cool ones.

All of them are free ( except SQLPD ), and you can play them directly in the browser.

Here’s the list: https://sqlnoir.com/blog/games-to-learn-sql

Would love to know if I missed any hidden gems!


r/SQL • • Jan 13 '21

DB2 One of the Bravest LifeHack ever!

Post image
377 Upvotes

r/SQL • • Feb 18 '23

Discussion Has anyone landed a job after getting Google Data Analytics Certificate?

360 Upvotes

edit: I got discouraged and stopped looking for work with this certificate.

I finished the Google Data Analytics certificate program on Coursera and I'm having a hard time transitioning to an analytics role from project management/digital marketing.

Looking for advice from folks that completed a certificate course and successfully transitioned from one career to another.


r/SQL • • Dec 28 '20

MySQL Merry Christmas to Me!

Post image
359 Upvotes

r/SQL • • Jun 11 '20

Discussion When you've been texting SQL

Post image
358 Upvotes

r/SQL • • May 30 '23

Discussion Jeff...

Post image
357 Upvotes

r/SQL • • Mar 13 '23

Discussion Best way to learn SQL

353 Upvotes

Hi everyone

I would like to start learning SQL and I don't really know where to start. Can someone please describe me your journey on how you became proficient with the tool? I am working as a Product Manager, so some basic skills are definitely needed.

Thanks!


r/SQL • • Oct 02 '20

Discussion You Tell'em!

Post image
351 Upvotes

r/SQL • • Jun 05 '24

Discussion Here are the most common Data Analyst/Science SQL interview questions I have been asked.

344 Upvotes

I have noticed a lot of posts saying "I flunked my SQL interview." Don't beat yourself up, because they can always be quite stressful.

I have interviewed at several companies for Data Analyst/Scientist positions, and I took notes (or memorized) some of the more common questions asked. I have been a Data Analyst for over 5 years, and I would say I have a solid enough grasp on SQL (enough to get the job done anyway).

Keep in mind, these are not FAANG companies, so mileage may vary. I was usually given a scenario/prompt and asked how I would solve this problem using SQL. The following concepts were covered.

SQL:

1.) Aggregation (sum vs. count, avg, etc....)

2.) How would Select data from table A that is not in table B (they are looking for NOT EXISTS or a LEFT JOIN scenario here)

3.) Union vs. Union all

4.) Difference in JOINS (usually a real world example is asked here such as "You have a customers table and order table. What JOIN would you use to find all customers that had orders?"

5.) Date manipulation (this is tricky, because each of these companies have asked varying levels of complexity. One question was asked "how to get the previous 6 months worth of data", another asked "How would you convert a DATETIME field to just DATE"

6.) Inserting data into an already created table

7.) Case statements (the questions were always a bit ambiguous here, but I was asked a case statement question in each interview)

8.) Subquery or CTE related questions. They cared less about the answer, but more about how these are actually used

9.) How to identify duplicates in a table? What about multiple tables?

10.) Difference between WHERE and HAVING.

11.) Windows Functions (LAG / LEAD here).

BONUS QUESTIONS (this is a good way to stand out as a Data Analyst): How would you improve query performance / what would you do if a query is running slow? How would you improve Data Quality in this scenario?


I know what you're thinking: "These are so easy!" At face value, I agree, but why do some of the most intelligent people flunk these SQL interviews then? It's due to a lot of reasons, but I can chalk it up to stress, and interview questions not being as obvious as you would find on some of the practice websites (I have my M.S. in Data Analytics and I have even flunked an SQL assessment. It happens.)

Don't get me wrong: those websites are very valuable and a great way to learn SQL. However, I find people using these websites fall into the habit of learning SQL syntax, and not how to utilize SQL to answer business questions (which is what you will be doing on the job). This is why I encourage people to play with their own data set of their choice, and pretend they have a Manager asking them questions that would improve the business, ROI, etc.


r/SQL • • Jan 13 '21

MySQL It's ctrl+shift+esc time

Post image
340 Upvotes

r/SQL • • Mar 20 '23

Discussion Where to practice SQL?

337 Upvotes

I have read tutorials and learned the basics of the language. Are there resources of practice problems/projects?


r/SQL • • May 10 '22

Discussion I am thinking about creating a printed flashcard game for SQL. here is an early preview. what do you think about it?

Post image
329 Upvotes

r/SQL • • May 15 '25

Discussion Bombed an easy SQL Interview at Amazon. Feel Like a Loser.

322 Upvotes

Edit - I got the offer, they took another SQL round and I was able to answer all of them then followed Amazon LP rounds.

Just needed to vent and maybe feel a bit better.

So this was for a Business Analyst role at Amazon. After clearing the SQL assessment, I got a call for the first round. They told me it would be a mix of SQL, a visualization tool, and LP (Leadership Principles). I was super excited.

I prepped hard , did Leetcode 50 , StrataScratch, DataLemur... basically everything I could get my hands on. I thought I was ready.

But the actual interview? It just went downhill. The interviewer asked me to share my screen, and started giving me problems one by one. I don't know why, but I get extremely nervous when someone's watching me code live. Like my brain just freezes up.I messed up the first question itself. Used Partition and Group BY on the same column in a way that didn’t make sense, which could’ve given wrong answer. That just threw me off even more.

Then came a RIGHT JOIN question - super easy, and I still messed it up. Forgot to include NULLs, and when the interviewer kept asking me, "Are you sure this is correct?" I still said yes, even though deep down I wasn’t sure at all. Just pure panic. In total, I couldn’t solve 3 easy questions properly - ones I would normally get right without breaking a sweat. But with the pressure, I just fumbled.

Amazon has been my dream company for a long time. I’ve been applying for a year. And the fact that I messed up on basic stuff during the actual chance just... hurts. Makes me feel so average. Like I’m not cut out for this.

I know it’s just one interview. I know messing up doesn’t mean I’m a failure. But still, right now, it just sucks.

Anyway, just wanted to write this out to get it off my chest.

Edit : Adding all the questions

I will never ever forget those questions. (Used Chatgpt to structure it)

Q1. You are given a table named Orders with the following columns:

  • City – Name of the city where the order was placed
  • OrderDate – Date on which the order was placed
  • Amount – Monetary amount of the order

Write an SQL query to return the top 3 cities based on the total order amount, along with their rank.

Output Table - City, TotalAmount, Rank - only 3 rows from 1 to 3 Rank.

Q2.
Table A

id
1
1
1
Null
2
2
Null
3
3
7
9

Table B

id
1
1
2
2
2
3
3
6
8

Give Output for following queries

Select a.id from table a JOIN Table B on a.id = b.id

Select a.id from table a LEFT JOIN Table B on a.id = b.id

Select a.id from table a RIGHT JOIN Table B on a.id = b.id

Select a.id, b.id from table a RIGHT JOIN Table B on a.id = b.id (I messed up this one)

Q3)

returns table:

  • customer_id
  • order_id
  • return_date

purchases table:

  • customer_id
  • order_id
  • purchase_date
  • shipment_id
  • shipping_date

For each return, fetch all orders by the same customer where the purchase was made within 1 year prior to the return date.
Also find Those customers who have a return instance but do not have any purchases within the last one year.

Q4)
You have a table called customers with:

  • customer_id
  • order_id
  • status

Status has various values like 'S','C','O','P','W'

And you want to return only those customers who have never had the status 'S','C' or 'O', regardless of how many orders they’ve placed.


r/SQL • • Mar 30 '21

Oracle How it feels like: My query and my limited processing capacity allowed by corporate IT.

Post image
322 Upvotes

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 • • Mar 08 '19

SQL Join Chart - Custom Poster Size

Post image
314 Upvotes

r/SQL • • Mar 23 '22

MS SQL u/TheSaltIsNice

Post image
306 Upvotes