SQL Junction
Do you want to learn DBT?
This is still
Open
I have only received 50 votes.
I will stop this poll on Monday and will see it from there.
Open
I have only received 50 votes.
I will stop this poll on Monday and will see it from there.
🚨 SQL Challenge — Real-World Use Case
You’re given a log table with 3 columns:
📅
🏦
👤
Task:
🔍 For each account, identify users who came back after 7+ days of inactivity.
Sounds simple, right?
But to solve this, you’ll need to:
* Use
* Calculate gaps between logins per user
* Filter only those who returned after 7+ days
* Do all of this per account, not globally
This is exactly the kind of logic you’ll face in interviews and real projects.
Here’s the SQL solution 👇
🧠 SQL Solution:
WITH user_logins AS (
SELECT
account_id,
user_id,
record_date,
LAG(record_date) OVER (
PARTITION BY account_id, user_id
ORDER BY record_date
) AS prev_login
FROM user_activity_log
),
login_gaps AS (
SELECT *,
DATEDIFF(day, prev_login, record_date) AS gap_days
FROM user_logins
)
SELECT DISTINCT
account_id,
user_id
FROM login_gaps
WHERE gap_days >= 7;
📩 For more such real-world SQL questions?
Join the LinkedIn posts and weekly YouTube drops:
🔗 https://www.youtube.com/playlist?list=PLU1HobJd_JCqjcZwUCc6s8avJutoIjyIF
📌 Stay tuned here for more!
#SQL #DataEngineering #InterviewPrep #SQLInterview
You’re given a log table with 3 columns:
📅
record_date,🏦
account_id,👤
user_idTask:
🔍 For each account, identify users who came back after 7+ days of inactivity.
Sounds simple, right?
But to solve this, you’ll need to:
* Use
LAG() to compare login dates* Calculate gaps between logins per user
* Filter only those who returned after 7+ days
* Do all of this per account, not globally
This is exactly the kind of logic you’ll face in interviews and real projects.
Here’s the SQL solution 👇
🧠 SQL Solution:
WITH user_logins AS (
SELECT
account_id,
user_id,
record_date,
LAG(record_date) OVER (
PARTITION BY account_id, user_id
ORDER BY record_date
) AS prev_login
FROM user_activity_log
),
login_gaps AS (
SELECT *,
DATEDIFF(day, prev_login, record_date) AS gap_days
FROM user_logins
)
SELECT DISTINCT
account_id,
user_id
FROM login_gaps
WHERE gap_days >= 7;
📩 For more such real-world SQL questions?
Join the LinkedIn posts and weekly YouTube drops:
🔗 https://www.youtube.com/playlist?list=PLU1HobJd_JCqjcZwUCc6s8avJutoIjyIF
📌 Stay tuned here for more!
#SQL #DataEngineering #InterviewPrep #SQLInterview
YouTube
SQL Complex interview questions
Share your videos with friends, family, and the world
🚨 Urgent Hiring: Data Analyst / MIS-WFM Manager @ GlobalLogic, Gurgaon
Are you a data-driven professional with a passion for optimizing performance and uncovering insights? Join GlobalLogic in Gurgaon as a MIS & Workforce Management (WFM) Team Manager and take charge of transforming operational efficiency through smart analytics and workforce planning.
In this leadership role, you'll manage a skilled MIS/WFM team, create high-impact dashboards, and collaborate cross-functionally to ensure billing accuracy and data-backed decision-making. Your expertise in Excel, forecasting models, and reporting will drive critical business outcomes.
✅ What You’ll Need:
5+ years in MIS or WFM, ideally in service-based industries
Strong command of Excel (formulas, pivots, macros)
Exposure to Amazon Connect, Monte Carlo simulations, and SARIMA/ARIMA forecasting
Knowledge of BE6 billing models
Bonus: Power BI or Tableau skills
Excellent stakeholder communication & sharp analytical thinking
💼 Key Responsibilities:
Lead MIS & WFM initiatives for reporting, forecasting, and planning
Build dashboards using Excel/Power BI for real-time insights
Monitor and optimize key metrics: staffing, schedule adherence, occupancy
Ensure billing accuracy, reconcile timesheets, and manage invoices
Drive strategic decisions through data storytelling and collaboration
Are you a data-driven professional with a passion for optimizing performance and uncovering insights? Join GlobalLogic in Gurgaon as a MIS & Workforce Management (WFM) Team Manager and take charge of transforming operational efficiency through smart analytics and workforce planning.
In this leadership role, you'll manage a skilled MIS/WFM team, create high-impact dashboards, and collaborate cross-functionally to ensure billing accuracy and data-backed decision-making. Your expertise in Excel, forecasting models, and reporting will drive critical business outcomes.
✅ What You’ll Need:
5+ years in MIS or WFM, ideally in service-based industries
Strong command of Excel (formulas, pivots, macros)
Exposure to Amazon Connect, Monte Carlo simulations, and SARIMA/ARIMA forecasting
Knowledge of BE6 billing models
Bonus: Power BI or Tableau skills
Excellent stakeholder communication & sharp analytical thinking
💼 Key Responsibilities:
Lead MIS & WFM initiatives for reporting, forecasting, and planning
Build dashboards using Excel/Power BI for real-time insights
Monitor and optimize key metrics: staffing, schedule adherence, occupancy
Ensure billing accuracy, reconcile timesheets, and manage invoices
Drive strategic decisions through data storytelling and collaboration
❤1
This is an urgent hiring ,it looks like to be a data analyst role
Salary for right candidate is around 15-18 LPA
Salary for right candidate is around 15-18 LPA
❤1
🚨Hiring Data Analyst Freshers!
If you’re skilled in SQL, Python, Power BI & Excel and can join within 15 days, this is your chance.
Fresh minds. Real data. Big impact.
🔗 Apply now: https://lnkd.in/gP6YgNVK
Tag & share with someone who needs this!
If you’re skilled in SQL, Python, Power BI & Excel and can join within 15 days, this is your chance.
Fresh minds. Real data. Big impact.
🔗 Apply now: https://lnkd.in/gP6YgNVK
Tag & share with someone who needs this!
🚨 Netflix SQL Interview Question Alert!
They asked this in an actual interview:
🎬 "Find the genre of the person with the most Oscar wins… and join using names, not IDs."
Sounds simple? It’s not.
Real-world SQL. Real logic. Real fun. 😄
I just posted a breakdown on LinkedIn — check it out and drop a “Netflix 🔥” to get the full solution!
📎 https://www.linkedin.com/posts/adityabansal095_sql-dataanalytics-sqlinterview-activity-7343592162338422785-OsV9?utm_source=share&utm_medium=member_desktop&rcm=ACoAAB8c2Z8Bcu4nHPJW24bZAavnMChCO7Q0wCQ
#SQL #Netflix #SQLJunction #DataEngineering #InterviewPrep
They asked this in an actual interview:
🎬 "Find the genre of the person with the most Oscar wins… and join using names, not IDs."
Sounds simple? It’s not.
Real-world SQL. Real logic. Real fun. 😄
I just posted a breakdown on LinkedIn — check it out and drop a “Netflix 🔥” to get the full solution!
📎 https://www.linkedin.com/posts/adityabansal095_sql-dataanalytics-sqlinterview-activity-7343592162338422785-OsV9?utm_source=share&utm_medium=member_desktop&rcm=ACoAAB8c2Z8Bcu4nHPJW24bZAavnMChCO7Q0wCQ
#SQL #Netflix #SQLJunction #DataEngineering #InterviewPrep
Linkedin
#sql #dataanalytics #sqlinterview #datascience #database #sqlquery #techinterview #dataengineering #learnsql #bigdata #datajobs…
Dear Data Enthusiasts,
🎬 Netflix interview questions aren’t just cool — they’re designed to mess with your head (in a good way) 🎬
💡𝐐𝐮𝐞𝐬𝐭𝐢𝐨𝐧:
Find the genre of the person with the most Oscar wins.
If there's a tie, return the genre of the person whose…
🎬 Netflix interview questions aren’t just cool — they’re designed to mess with your head (in a good way) 🎬
💡𝐐𝐮𝐞𝐬𝐭𝐢𝐨𝐧:
Find the genre of the person with the most Oscar wins.
If there's a tie, return the genre of the person whose…
🚨 New Video Just Dropped!
📺 Just uploaded a fresh YouTube video where I break down a Hard Google SQL interview question:
🎬 Compare the rating of an actor’s most recent film with the average of all their previous films.
If you’re preparing for SQL interviews or just want to level up your logic — this is a must-watch!
📌 Watch here: https://youtu.be/gZ7ZKtKvL7s
🔥 Don’t forget to like, comment, and share if it helps!
Please help me in reaching 500 subscribers, Guys!!
#SQLJunction #SQLInterview #Google #DataEngineering #InterviewPrep #DataJobs
📺 Just uploaded a fresh YouTube video where I break down a Hard Google SQL interview question:
🎬 Compare the rating of an actor’s most recent film with the average of all their previous films.
If you’re preparing for SQL interviews or just want to level up your logic — this is a must-watch!
📌 Watch here: https://youtu.be/gZ7ZKtKvL7s
🔥 Don’t forget to like, comment, and share if it helps!
Please help me in reaching 500 subscribers, Guys!!
#SQLJunction #SQLInterview #Google #DataEngineering #InterviewPrep #DataJobs
YouTube
Google SQL Interview Question | Calculate Actor Latest VS Average Film Ratings 🔥
🎬 Google SQL Interview Question – Most Recent Film vs Average Rating Explained!
In this video, I break down a real SQL question asked in a Google interview:
👉 For each actor, calculate the difference between the rating of their most recent film and their…
In this video, I break down a real SQL question asked in a Google interview:
👉 For each actor, calculate the difference between the rating of their most recent film and their…
Hey Folks
Apologies
I have been busy with the past month with freelance hiring.
Apologies
I have been busy with the past month with freelance hiring.
Sure! Here's a concise and engaging Telegram post you can use to share your YouTube video in your SQL Junctionchannel:
🚀 NEW VIDEO DROP – SQL Interview Question from Netflix!
🔗 Watch now on YouTube (Netflix SQL Server Complex Interview Question Series | Recommend Pages Based on Friends’ Activity
https://youtu.be/GKY6TN1X4dY)
📌 Problem Statement:
You're given two tables –
Your task?
🎯 Recommend pages to users that they don’t follow but at least one of their friends does.
This was asked in a real Netflix SQL interview!
✅ In the video, I break down:
The logic step-by-step
How to write the SQL query
Key concepts like anti-joins, self joins, and recommendation filtering
Perfect for:
🔸 SQL learners
🔸 Data analyst/engineer interview prep
🔸 Anyone curious how Facebook-style recommendations work under the hood!
👨💻 Watch now & level up your SQL skills!
🎬 Netflix SQL Server Complex Interview Question Series | Recommend Pages Based on Friends’ Activity
https://youtu.be/GKY6TN1X4dY
#SQL #SQLJunction #NetflixInterview #SQLChallenge #DataEngineering #SQLQuery #TechInterview #TelegramLearning
🚀 NEW VIDEO DROP – SQL Interview Question from Netflix!
🔗 Watch now on YouTube (Netflix SQL Server Complex Interview Question Series | Recommend Pages Based on Friends’ Activity
https://youtu.be/GKY6TN1X4dY)
📌 Problem Statement:
You're given two tables –
user_friends and user_pages.Your task?
🎯 Recommend pages to users that they don’t follow but at least one of their friends does.
This was asked in a real Netflix SQL interview!
✅ In the video, I break down:
The logic step-by-step
How to write the SQL query
Key concepts like anti-joins, self joins, and recommendation filtering
Perfect for:
🔸 SQL learners
🔸 Data analyst/engineer interview prep
🔸 Anyone curious how Facebook-style recommendations work under the hood!
👨💻 Watch now & level up your SQL skills!
🎬 Netflix SQL Server Complex Interview Question Series | Recommend Pages Based on Friends’ Activity
https://youtu.be/GKY6TN1X4dY
#SQL #SQLJunction #NetflixInterview #SQLChallenge #DataEngineering #SQLQuery #TechInterview #TelegramLearning
YouTube
Netflix SQL Server Complex Interview Question Series | Recommend Pages Based on Friends’ Activity
🚀 Netflix SQL Interview Question Solved!
In this video, I walk through a real-life SQL interview question asked at Netflix.
📌 Problem Statement:
You're given two tables:
user_friends(user_id, friend_id) – represents the Facebook friendship graph
user_pages(user_id…
In this video, I walk through a real-life SQL interview question asked at Netflix.
📌 Problem Statement:
You're given two tables:
user_friends(user_id, friend_id) – represents the Facebook friendship graph
user_pages(user_id…
🚨 SQL Interview Prep Kit 🚨
1️⃣ Aggregations
2️⃣ Window Functions
3️⃣ Set Operators
4️⃣ Indexing for Performance
5️⃣ SQL for Analytics
🎯 Perfect for quick revision before interviews or weekend practice!
#SQL #InterviewPrep #DataEngineering #SQLJunction
1️⃣ Aggregations
2️⃣ Window Functions
3️⃣ Set Operators
4️⃣ Indexing for Performance
5️⃣ SQL for Analytics
🎯 Perfect for quick revision before interviews or weekend practice!
#SQL #InterviewPrep #DataEngineering #SQLJunction
Average SQL vs Great SQL.pdf
169.7 KB
🚫 Most developers write SQL like this...
✅ But great developers write it like this.
Just shared a visual breakdown of common SQL mistakes — and how to fix them like a pro! ⚡
Perfect for anyone preparing for interviews or writing SQL daily.
📌 Upgrade your query game in 60 seconds.
#SQL #InterviewPrep #SQLTips #SQLJunction #SQLInterview
✅ But great developers write it like this.
Just shared a visual breakdown of common SQL mistakes — and how to fix them like a pro! ⚡
Perfect for anyone preparing for interviews or writing SQL daily.
📌 Upgrade your query game in 60 seconds.
#SQL #InterviewPrep #SQLTips #SQLJunction #SQLInterview
❤2
In this document, I have mentioned a page regarding the IN clause and where exists clause
This is a highly asked interview question, the difference between the two? Which is better for faster execution?
This is a highly asked interview question, the difference between the two? Which is better for faster execution?
❤2
🚀 SQL Interview Trick You Must Know!
Just dropped a brand new video 🎥
👉 Problem: Forward fill
🧠 Covered: A smart use of
If you're preparing for SQL/Data Engineering interviews, this is the kind of trick that separates good from great 👏
Don’t miss this one!
📺 Watch now: https://youtu.be/sBcMQfyb4eU?si=xPgvTcMOdSvAudSx
#SQL #InterviewPrep #DataEngineering #SQLTricks
Just dropped a brand new video 🎥
👉 Problem: Forward fill
NULL values with the last non-null value in a SQL table.🧠 Covered: A smart use of
FIRST_VALUE() and logic building that actually makes sense!If you're preparing for SQL/Data Engineering interviews, this is the kind of trick that separates good from great 👏
Don’t miss this one!
📺 Watch now: https://youtu.be/sBcMQfyb4eU?si=xPgvTcMOdSvAudSx
#SQL #InterviewPrep #DataEngineering #SQLTricks
YouTube
Forward Fill NULLs using FIRST_VALUE() | This SQL Interview Trick Blew My Mind 🤯 | SQL Interview
🔥 SQL Interview Favorite – Forward Fill NULLs Like a Pro!
Have you ever been asked to forward fill `NULL` values in SQL with the last non-NULL value?
This is a classic data engineering interview question — and many folks get stuck here!
👨💻 Problem:
You're…
Have you ever been asked to forward fill `NULL` values in SQL with the last non-NULL value?
This is a classic data engineering interview question — and many folks get stuck here!
👨💻 Problem:
You're…
SQL Junction pinned «🚀 SQL Interview Trick You Must Know! Just dropped a brand new video 🎥 👉 Problem: Forward fill NULL values with the last non-null value in a SQL table. 🧠 Covered: A smart use of FIRST_VALUE() and logic building that actually makes sense! If you're preparing…»
Hey folks 👋
I just created a clean and simple SQL cheat sheet — perfect for quick revision before interviews or while working on projects.
It covers:
🔸 DDL / DML / DCL / TCL
🔸 All types of Joins
🔸 Common Window Functions
🔸 Aggregate functions
🖼️ Check out the full image in the post 👆
📌 Save it for your reference
📤 Share it with someone learning SQL
— Aditya | SQL Junction
#SQL #SQLCheatSheet #DataEngineering #LearningSQL #SQLJunction
I just created a clean and simple SQL cheat sheet — perfect for quick revision before interviews or while working on projects.
It covers:
🔸 DDL / DML / DCL / TCL
🔸 All types of Joins
🔸 Common Window Functions
🔸 Aggregate functions
🖼️ Check out the full image in the post 👆
📌 Save it for your reference
📤 Share it with someone learning SQL
— Aditya | SQL Junction
#SQL #SQLCheatSheet #DataEngineering #LearningSQL #SQLJunction
❤2👍1
🧠 This complex SQL question from Google looked simple… until I actually started solving it.
Let’s just say — a plain
I used a mix of aggregates + window functions to crack it — and the approach might surprise you.
🎥 https://youtu.be/Qvudg-uYwk0?si=IQnB_HofAvXg21oy
#SQL #InterviewPrep #SQLInterview #DataEngineering
Let’s just say — a plain
JOIN wasn’t enough. 😉I used a mix of aggregates + window functions to crack it — and the approach might surprise you.
🎥 https://youtu.be/Qvudg-uYwk0?si=IQnB_HofAvXg21oy
#SQL #InterviewPrep #SQLInterview #DataEngineering
YouTube
SQL Server Complex Interview Question | Find number of flags for videos reviewed by Youtube
🚀 SQL Interview Question | Google SQL Challenge | Window Functions Explained
In this video, I solve a real SQL interview question asked in Google from the StrataScratch platform.
We’ll walk through the problem step-by-step, understand the requirements, and…
In this video, I solve a real SQL interview question asked in Google from the StrataScratch platform.
We’ll walk through the problem step-by-step, understand the requirements, and…
SQL Junction pinned «🧠 This complex SQL question from Google looked simple… until I actually started solving it. Let’s just say — a plain JOIN wasn’t enough. 😉 I used a mix of aggregates + window functions to crack it — and the approach might surprise you. 🎥 https://youtu.be/Qvudg…»
SQL Junction
Senior Data Engineer (Snowflake +DBT +Airflow).docx
#JobAlert #JobOpening
One of my friends in looking for Snowflake Dbt Airflow Data Engineer for Pune and Ahmedabad location
I have put the JD ,if you are looking to switch
Do reach out to me on linkedin
linkedin.com/in/adityabansal095
#DataEngineering #DataEngineerJob
#SQL #CareerOpportunity
One of my friends in looking for Snowflake Dbt Airflow Data Engineer for Pune and Ahmedabad location
I have put the JD ,if you are looking to switch
Do reach out to me on linkedin
linkedin.com/in/adityabansal095
#DataEngineering #DataEngineerJob
#SQL #CareerOpportunity