SQL Junction
2.92K subscribers
17 photos
1 video
7 files
90 links
Download Telegram
Do you want to learn DBT?
Final Results
97%
Yes
0%
No
3%
Not Interested
If this poll gets enough votes , I will come up with DBT session very soon๐Ÿค”
๐Ÿ‘1
SQL Junction pinned Deleted message
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.
๐Ÿšจ SQL Challenge โ€” Real-World Use Case

Youโ€™re given a log table with 3 columns:
๐Ÿ“… record_date,
๐Ÿฆ account_id,
๐Ÿ‘ค user_id

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 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
๐Ÿšจ 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
โค1
This is an urgent hiring ,it looks like to be a data analyst role
Salary for right candidate is around 15-18 LPA
Please reach out to me immediately on LinkedIn
If you are interested
LinkedIn.com/in/adityabansal095
โค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!
๐Ÿšจ 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
Hey Folks
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 โ€“ 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
๐Ÿšจ 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
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
โค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?
โค2
๐Ÿš€ 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 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
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
โค2๐Ÿ‘1