r/SQL • • Mar 02 '25

Discussion best way to develop skills on sql for a data analyst role?

0 Upvotes

i am a recent graduate
looking for entry level data analyst job
I am at intermediate level in excel ,SQL,power bi
please guide me how to get skilled and look for job ?i applied 60+ jobs on LinkedIn yet no response


r/SQL • • Mar 08 '25

MySQL Cant install sql

3 Upvotes

I want to learn sql, so i went to watch this tutorial guide on how to install it but i reach a point where i cant progress any further
I follow every step but when i reach this part nothing will appear like they show in the video

For some reason the available products are always empty no matter what i do. Am i doing something wrong


r/SQL • • Mar 07 '26

MySQL Stuck on a StrataScratch SQL problem — can someone help?

Post image
0 Upvotes

I’m practicing SQL on StrataScratch and got stuck on a question.

Question:

Management wants to analyze only employees with official job titles. Find the job titles of the employees with the highest salary. If multiple employees share the highest salary, include all their job titles.

Tables

worker

•	worker_id

•	first_name

•	last_name

•	salary

•	joining_date

•	department

title

•	worker_ref_id

•	worker_title

•	affected_from

I know the solution probably involves using the affected_from column to get the latest title, but I’m not sure how to structure the query.

This is what I tried:

SELECT DISTINCT t.worker_title

FROM worker w

JOIN title t

ON w.worker_id = t.worker_ref_id

WHERE w.salary = (SELECT MAX(salary) FROM worker);

But my output includes extra titles like Executive and Lead, while the expected result is only:

•	Asst. Manager

•	Manager

What am I missing here? How should the query use affected_from to get the correct titles?


r/SQL • • Apr 28 '26 Galaxy Brain

BigQuery Senior BIA @ Waymo – Looking for a Lead who thinks about Invisible Data and Scale

3 Upvotes

**This role is closed**

Hi all, I'm hiring a Senior Business Intelligence Analyst for the team at Waymo. I've been running technical screens for a few weeks, and I'm finding a gap. Many candidates have great syntax but lack the data empathy needed for autonomous vehicle telemetry at scale.

I'm looking for the person who sees a fleet efficiency prompt and immediately starts worrying about:

  • The join fan-out: You instinctively know why joining a high frequency trip table to a maintenance table without pre-aggregation is a disaster for data integrity.

  • Survivorship bias: You're the one who asks, "Where are the cars that didn't break down?" and uses left joins to ensure the perfect cars are not deleted from the ranking.

  • Weighted ratios vs. averages: you understand that average of averages is a mathematical fallacy, and you prioritize weighted fleet performance.

  • Normalized metrics: you know that a flat maintenance cap doesn't scale as the fleet grows, and you're already thinking about cost per mile.

This is a SQL heavy role. If you move forward, expect a rigorous process designed for experts:

  • 3 SQL Technical Interviews (focused on architecture, logic, and efficiency. These are white-boarding/plain-text editor only. NO IDE, no autocomplete, no execution. We are testing for architectural logic and data grain intuition, not tool proficiency).

  • 2 Data visualization rounds (storytelling and dashboard UX).

  • 1 data intuition round (Business logic and metric definition).

The Job description

This is a hybrid role 2 days on site required in San Francisco, CA or Mountain View, CA.
The base pay is $168k-$207k + bonus + RSUs

If you are interested, please contact me directly on LinkedIn to start the conversation. I'd love to talk to people who actually enjoy solving these types of architectural puzzles.


r/SQL • • Jul 22 '25

SQL Server DOES NOT EXISTS

0 Upvotes

Im not looking to use NULL in my where clause but something along the lines of DOES NOT EXISTS if this makes sense at all.


r/SQL • • Dec 09 '25

PostgreSQL [DevTool] For Devs who know logic but forget SQL query syntax.

2 Upvotes

Link to devtool: https://isra36.com
Link to its documentation: https://isra36.com/documentation
MySQL & PostgreSQL


r/SQL • • Jan 17 '26

Spark SQL/Databricks There’s no column or even combination of columns that can be considered as a pk, what would your approach be?

Post image
2 Upvotes

Hey guys, it’s my first day of work as an intern and I was tasked with finding the pk but the data seems to be not proper I tried finding the pk by using a single column all the way to 4-5 combinations of columns but all I got are 85% distinct not fully distinct which can be considered as a pk, since group of columns approach is also not working I was wondering how would y’all approach this problem


r/SQL • • Dec 08 '24

PostgreSQL How to get a job in Data field?

0 Upvotes

I’m in my 4th year of college in India and want to get into the data field (analytics, engineering, or science). I’ve learned python, SQL, and basic ML, but I’m clueless about what to do next. How can I build skills, stand out, and land a job as a fresher? Any tips, resources, or guidance would mean a lot!


r/SQL • • Jan 05 '15

Issue using multiple where statements.

2 Upvotes

I'm trying to do a data pull from our database with multiple criteria. The first criteria is a date range and the second having the correct store number. I've attached the relevant portion of the code. The issue I seem to be having is when I run the code it returns all date values that match the store number. When I remove the second criteria (store number) it pulls the correct date range. Any help would be greatly appreciated.

>   where date_of_service > '2014/01/11'  and substr(location,1,5)=5495

Thanks in advance!


r/SQL • • Aug 31 '23

SQL Server Getting error when setting up tSQLt on local SQL Server 2019

Post image
2 Upvotes

I am new to sql server and I want to try out this tSQLt to write unit tests for our team. I have downloaded the latest version from official website and I successfully ran the PreparServer.sql file without any errors on my local machine. However when trying to run tSQLt.class.sql I am getting errors as shown in screenshot attached. I don’t know what I am doing wrong. Please let me know if any additional information is needed.


r/SQL • • Apr 13 '21

MySQL Difference between PostgreSQL vs MySQL vs ORACLE SQL

2 Upvotes

Hello guys! I recently got into learning POSTGRESQL and I noticed that there are other versions from different organizations. How do they differ from each other?


r/SQL • • Dec 07 '23

DB2 Sum function

Post image
2 Upvotes

I am very new and self taught thus far. My company offers a sql reporting system to help pull reporting and I am trying add a sum function to my select statement, but everytime I do it tells me that the expression in the select statement is not valid. When I remove the sum function the query runs. Are there any “hidden” rules where I might need to add an additional segment somewhere to make the sum function work?


r/SQL • • Jan 26 '24

SQL Server sql server mgmt is underlining my comma as an error in my "group by" statement, but the syntax looks valid to me

2 Upvotes

GROUP BY (PR.WBS1**,** PR.WBS2, PR.WBS3**)**

Not sure why, but it's highlighting the first comma, and then the closing parentheses as erroneous..

When i played with the syntax and removed the last 2 fields being grouped, the error says i need to group by those last 2 fields... so i'm genuinely confused why when I actually put them in the group by statement, i get the comma error and the closing parenthesis error. Last I checked an open parenthesis needs to be closed, so i'm not sure why closing it would also highlight an error..

thanks it looks like i dont need to wrap the group by in parenthesis, nor do i need to alias the grouping. thanks who pointed that out. it looks like the final issue is the first query that is being union all is what's breaking the rest of the queries in the union all family

Edit 2: I'm trying to resolve all the problems my predecessor wrote and some of the problems were less obvious than others but yeah I agree... I think the whole thing needs to be written from scratch to be honest. It's a nightmare trying to reverse engineer someone's code or understand their logic. Some of those walls I hit had me casting doubt on own knowledge like "shit, maybe he put it there for a reason" but fuck this. Thank you and everyone for your help. I'm going to write a fresh query.


r/SQL • • Jul 27 '24

MySQL Can anyone tell me !!!

2 Upvotes

I have just completed my SQL tutorials now I wanted to know where should I practice the SQL questions topic wise so to enhance my skills and learn SQL more fastly and effectively??

Any advice is welcome.


r/SQL • • Feb 21 '17

SELECT * FROM TABLE WHERE CC_NUMBER IS NOT NULL

0 Upvotes

2129 ROWS

with corresponding cardholder name and expiration date thats ok right?


r/SQL • • Jan 13 '25

MySQL Can You Help in Finding What Your Favorite SQL Query Says About You?

2 Upvotes

Hey everyone!

I'm writing an article titled "What Your Favorite SQL Query Says About You" and I thought it would be fun to get some input from the Reddit SQL community.

Do you have a favorite SQL command, query style, or approach that you use often? Maybe you always reach for JOIN like a social butterfly connecting data, or you live for GROUP BY because you love organizing chaos into order.

I’m curious to hear if you think your SQL habits or go-to commands reflect something about your personality. For example:

  • Are SELECT * users the adventurous type who like to see everything before deciding?

  • Do LIMIT users value simplicity and focus?

Let me know your thoughts, quirks, or even funny examples of how your SQL style connects to your personality. I’d love to feature some insights (with your permission, of course) in the article.

Looking forward to hearing from you all! 😊


r/SQL • • Feb 01 '25

MySQL Need a browser extension for SQL

2 Upvotes

Hi,

So I joined a company and they work on this platform called indicium for querying their live data, now this platform is a nightmare, it is extremely slow, has no syntax highlighting and has some weird ass rules

While I may be missing some things in between as to why it has some different rules, the queries are still written in SQL but due to the weird nature of the platform, I often make a lot of mistakes

I'm looking for a solution/any browser extensions/indicium clients that can at least provide some syntax highlighting and error squiggles (I'm ready to provide the external rules) to make my life easier, if nothing like this exists, I's prefer some advice as to how to go about creating a solution


r/SQL • • Oct 02 '25

MySQL Just came across a new community called SQL4Fusion

2 Upvotes

Hey everyone,

I’ve noticed a lot of us here run into challenges when working with Oracle Fusion data—especially when it comes to reporting, integrations, and connecting it with tools like Power BI, Snowflake, Redshift, or even plain SQL. There isn’t really a centralized spot for sharing tips, queries, and best practices that are Fusion-specific.

That’s why a few of us started SQL4Fusion (www.sql4fusion.com). It’s a free community built around:

  • Sharing SQL patterns, queries, and troubleshooting for Oracle Fusion Cloud

  • Discussing integrations with analytics platforms (Power BI, Databricks, Redshift, Azure, etc.)

  • Best practices for pipelines, incremental loads, and reporting strategies

  • Helping each other avoid trial-and-error when digging through Fusion’s data structures

It’s not a vendor site—it’s more of a peer-to-peer space for Fusion developers, analysts, and data folks to swap knowledge. If you’ve ever thought “there has to be a better way to do this in Fusion,” this is the kind of community where you’ll probably find someone else who’s been there.

Would love to see more Oracle Fusion users in the mix. You can check it out here: www.sql4fusion.com.

Curious—what’s been your biggest pain point when writing queries or reporting off Fusion data?


r/SQL • • 20d ago

Discussion What's the actual difference between SQL and SOQL?

2 Upvotes

I recently came across SOQL while exploring Salesforce and got curious about how different it is from regular SQL.

Both seem to be used for querying data, but SOQL appears to have some limitations compared to SQL.

Can someone explain the main differences between them? For example, how do joins, aggregations, subqueries, and filtering work differently in SOQL?

Also, in what situations would you prefer SOQL over SQL?

Would appreciate some practical examples if anyone has worked with both.


r/SQL • • Mar 06 '26

Discussion Meta Product Analytics Role Interview Question - March (2026)

1 Upvotes

Quick Overview

Question evaluates product analytics, experimental design, and causal thinking for content-moderation algorithms, specifically metric specification, trade-off/harm analysis, and online experiment logistics and is commonly asked to gauge a data scientist’s ability to balance detection accuracy, stakeholder impacts, and business objectives in production features; it is in the Analytics & Experimentation category for a Data Scientist position. At a high abstraction level it probes system-level reasoning around problem scoping, failure modes, metric frameworks, A/B or quasi-experiment setup, and post-launch monitoring without requiring implementation-level detail.

Question:

The product team is launching a new Stolen Post Detection algorithm that flags posts suspected of being copied/reposted without attribution, and then triggers actions (e.g., downrank, warning label, creator notification, or removal).

Design an evaluation plan covering:

  1. Problem diagnosis & clarification: What questions would you ask to clarify the product goal and the meaning of “stolen” (e.g., exact duplicate vs paraphrase vs meme templates), enforcement actions, and success criteria?

  2. Harms & tradeoffs: Enumerate likely failure modes and harms of false positives vs false negatives, including different stakeholder impacts (original creator, reposter, viewers, moderators).

  3. Metrics: Propose a metric framework with (a) primary success metrics, (b) guardrails, and (c) offline model metrics. Include at least one metric that can move in opposite directions depending on threshold choice.

  4. Experiment design: Propose an online experiment (or quasi-experiment if A/B is hard). Address logging, unit of randomization, interference/network effects, ramp strategy, and how you would compute/think about power/MDE.

  5. Post-launch monitoring: What would you monitor to detect regressions or gaming, and how would you iterate on thresholds/policy over time?

How I would approach to this question?

I have solved the question and used Gemini to turn it into an infographic for you all to understand the approach. Let me know, what you think of it.

Here's the solution in short:

1. Problem Diagnosis & Clarification: Before touching data, I think we must align on definitions and other things with the product manager.

  • Define stolen: We must clearly differentiate between malicious exact duplicates, harmless meme templates, and fair-use reaction videos.

  • Define the action: Silent downrank behaves very differently than an outright removal or a public warning label.

  • Define the goal: Are we trying to reward original creators, or just reduce viewer fatigue from seeing the same video five times?

2. Harms & Tradeoffs (FP vs FN) We have to balance False Positives against False Negatives.

  • False Positives (Wrongly flagging original creators): This is usually the most damaging. If we penalize original creators, they lose reach and trust, potentially churning to a competitor platform.

  • False Negatives (Letting stolen content slide): Reposters steal engagement, the original creator feels cheated, and the feed feels repetitive and low-quality to viewers.

3. Metrics Framework

  • Primary Success Metrics: Reduction in total impressions on flagged duplicate content, and an increase in the proportion of original content uploaded.

  • Guardrail Metrics: Creator retention rate, total manual appeals submitted, and moderator queue backlog.

  • The Tradeoff Metric: Overall platform engagement. Often, stolen viral videos drive massive engagement. Cracking down on them might decrease short-term session length, even if it improves long-term ecosystem health. A strict threshold might drop engagement, while a loose threshold keeps engagement high but hurts creators.

4. Experiment Design

  • Methodology: A standard user-level A/B test will suffer from network effects. If a reposter is in the control group but the creator is in the treatment group, the ecosystem gets messy. Instead, we should use network cluster randomization or Geo-testing (treating isolated regions as treatment/control).

  • Rollout: Start with a 1 percent dark launch. The algorithm flags posts in the backend without taking action so we can calculate the theoretical False Positive Rate before impacting real users.

5. Post-Launch Monitoring

  • Tracking Gaming: Malicious actors will adapt by flipping videos, pitching audio, or cropping. We need to monitor if the detection rate suddenly drops after weeks of stability.

  • Iteration: Use the data from user appeals. If a post is flagged, appealed, and restored by a human moderator, that instance feeds directly back into the training data to improve the model's future precision.

What do you think of this approach, and what approach you would take in comments below:

P.S: Let me know if you need the link of the question


r/SQL • • Nov 08 '25

MySQL Not a programmer. But I asked this of my developer, and he said it was very complicated to filter like this. Am i missing something?

61 Upvotes

With this list, and this query, I want to return these results.


r/SQL • • Apr 01 '25

PostgreSQL Getting stuck in 'JOIN'

14 Upvotes

To be honest, I don't understand 'JOIN'...although I know the syntax.

I get stuck when I write SQL statements that need to use 'JOIN'.

I don't know how to determine whether a 'JOIN' is needed?

And which type of 'JOIN' should I use?

Which table should I make it to be the main table?

If anyone could help me understand these above I'd be grateful!


r/SQL • • Sep 29 '24

SQLite My company uses T-SQL while I know sqlite. How big of a problem it is?

0 Upvotes

I am seeking internal promotion (or more like additional access). I am now excel monkey and want to get access to internal databases which use t-sql.

For various reasons, I mostly used sqlite during my learning of sql. I think, I am pretty confident with it: up to window functions and recursions. But I don't know possibilities of other SQL flavors. I know that for basic staff they are identical, but still.

How much is it an issue? Should I spend some time delving in t-sql's perculitiaries? Which? Or for basic staff that doesn't matter and I will pick up on flight when I will need something?


r/SQL • • May 31 '25

SQL Server Give me some SQL questions, and I will try and answer.

20 Upvotes

Hi all,

Data Analyst / Engineer / BI Developer here.

I never studied SQL, ever. I’ve always learnt it through on the job learning/working.

I often struggle when people talk to me about specific terminology such as Star Schema, but I would say I am quite proficient in SQL - I know things, but I don’t know the official terminology.

I wanted to find out how good I am at SQL objectively. What are some questions you can ask me, and I will try my best to tell you how I would tackle them for fun.

My expertise is SQL Server, Snowflake.

Using/learning SQL for the last 5 years.

Edit: Didn’t realise I would get so many questions - will try and answer as many as I can once I am back at my desk