TGViewer
Data Analyst Interview Resources Data Analyst Interview Resources @dataanalystinterview ยท 52.6K subscribers
Post #2159 2.15K
๐Ÿ”ฅ SQL Scenario-Based Interview Q&A (Most Asked ๐Ÿ’ฏ)

Think like a Data Analyst ๐Ÿ‘‡

๐Ÿ“Š Q1. Find the Nth highest salary (not just 2nd/3rd)?

๐Ÿ‘‰ Use DENSE_RANK() or ROW_NUMBER()
๐Ÿ‘‰ Filter where rank = N
๐Ÿ‘‰ Handle duplicates carefully

๐Ÿ“Š Q2. Find common records between two tables?

๐Ÿ‘‰ Use INNER JOIN
๐Ÿ‘‰ Or INTERSECT (if supported)
๐Ÿ‘‰ Based on matching columns

๐Ÿ“Š Q3. Find records present in both tables but with different values?

๐Ÿ‘‰ JOIN on key
๐Ÿ‘‰ Compare columns in WHERE
๐Ÿ‘‰ Useful for data mismatch checks

๐Ÿ“Š Q4. Count number of orders per day + running total?

๐Ÿ‘‰ GROUP BY order_date
๐Ÿ‘‰ Use SUM() OVER (ORDER BY date)

๐Ÿ“Š Q5. Find users who never placed any order?

๐Ÿ‘‰ LEFT JOIN orders
๐Ÿ‘‰ Filter WHERE order_id IS NULL
๐Ÿ‘‰ Or use NOT EXISTS

๐Ÿ“Š Q6. How do you delete duplicate rows but keep one?

๐Ÿ‘‰ Use ROW_NUMBER() with PARTITION BY
๐Ÿ‘‰ Delete where row_number > 1
๐Ÿ‘‰ Always test with SELECT first โš ๏ธ
๐Ÿ‘‰ Backup before deleting


๐Ÿ”ฅ React with โค๏ธ for more such questions
  • โค 4
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 โ†’