TGViewer
Data Analyst Interview Resources Data Analyst Interview Resources @dataanalystinterview ยท 52.6K subscribers
Post #2156 2.36K
๐Ÿ”ฅ SQL Scenario-Based Q&A (Part 3)
Think like a real analyst ๐Ÿ‘‡

๐Ÿ“Š Running Total (Cumulative Sum)?

๐Ÿ‘‰ Use SUM() OVER()
๐Ÿ‘‰ PARTITION BY (optional)
๐Ÿ‘‰ ORDER BY for sequence

๐Ÿ“Š Top N records per group?

๐Ÿ‘‰ Use ROW_NUMBER() / RANK()
๐Ÿ‘‰ PARTITION BY category
๐Ÿ‘‰ Filter where rank โ‰ค N

๐Ÿ“Š Find duplicate records?

๐Ÿ‘‰ GROUP BY + HAVING COUNT(*) > 1
๐Ÿ‘‰ Or use ROW_NUMBER()
๐Ÿ‘‰ Helps in data cleaning

๐Ÿ“Š Delete duplicate rows (keep one)?

๐Ÿ‘‰ Use CTE + ROW_NUMBER()
๐Ÿ‘‰ Delete where row_num > 1
๐Ÿ‘‰ Keep latest/oldest using ORDER BY

๐Ÿ“Š Employees earning more than their manager?

๐Ÿ‘‰ Self JOIN on employee table
๐Ÿ‘‰ Compare employee salary > manager salary
๐Ÿ‘‰ Classic interview favorite

๐Ÿ”ฅ React โ™ฅ๏ธ if you want Part 4
  • โค 5
More from @dataanalystinterview
  1. Oct 7, 2026๐Ÿš€๐—ฃ๐—ฎ๐˜† ๐—”๐—ณ๐˜๐—ฒ๐—ฟ ๐—ฃ๐—น๐—ฎ๐—ฐ๐—ฒ๐—บ๐—ฒ๐—ป๐˜ ๐—ง๐—ฟ๐—ฎ๐—ถ๐—ป๐—ถ๐—ป๐—ด | ๐—•๐—ฒ๐—ฐ๐—ผ๐—บ๐—ฒ ๐—ฎ ๐—™๐˜‚๐—น๐—น๐˜€๐˜๐—ฎ๐—ฐโ€ฆ
  2. Oct 7, 2026๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ ๐—ฃ๐—ผ๐˜„๐—ฒ๐—ฟ ๐—•๐—œ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜! ๐Ÿ”ฅ Learn Power BI through these FREE learninโ€ฆ
  3. Oct 1, 2026๐Ÿ”ฅ Top 10 Theoretical Interview Questions Every Data Analyst Must Prepare ๐Ÿ“Š Data Analystโ€ฆ
  4. Sep 29, 2026๐Ÿš€ Excel Formulas Fundamentals โ€” Part 10 ๐Ÿ“Š Conditional Functions (SUMIF, SUMIFS, COUNTIF,โ€ฆ
  5. Sep 29, 2026๐—™๐—ฅ๐—˜๐—˜ ๐—ฅ๐—ฒ๐˜€๐—ผ๐˜‚๐—ฟ๐—ฐ๐—ฒ๐˜€ ๐—ง๐—ผ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐—”๐—œ ๐—ถ๐—ป ๐Ÿฎ๐Ÿฌ๐Ÿฎ๐Ÿฒ๐Ÿš€ โ€‹ Explore 6 free resourceโ€ฆ
  6. Sep 29, 2026๐Ÿ“Š Tableau Learning Roadmap โ€” Part 2 Connecting to Data Before creating visualizations inโ€ฆ
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook โ†’Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 โ†’