TGViewer
Data Analyst Interview Resources Data Analyst Interview Resources @dataanalystinterview · 52.6K subscribers
Post #2232 1.49K
✅ Basic SQL Queries Interview Questions With Answers 🖥️

1. What does SELECT do
– SELECT fetches data from a table
– You choose columns you want to see
Example: SELECT name, salary FROM employees;

2. What does FROM do
– FROM tells SQL where data lives
– It specifies the table name
Example: SELECT * FROM customers;

3. What is WHERE clause
– WHERE filters rows
– It runs before aggregation
Example: SELECT * FROM orders WHERE status = 'Delivered';

4. Difference between WHERE and HAVING
– WHERE filters rows before GROUP BY
– HAVING filters groups after aggregation
Example: WHERE filters orders, HAVING filters total_sales

5. How do you sort data
– Use ORDER BY
– Default order is ASC
Example: SELECT * FROM employees ORDER BY salary DESC;

6. How do you sort by multiple columns
– SQL sorts left to right
Example: SELECT * FROM students ORDER BY class ASC, marks DESC;

7. What is LIMIT
– LIMIT restricts number of rows returned
– Useful for top N queries
Example: SELECT * FROM products LIMIT 5;

8. What is OFFSET
– OFFSET skips rows
– Used with LIMIT for pagination
Example: SELECT * FROM products LIMIT 5 OFFSET 10;

9. How do you filter on multiple conditions
– Use AND, OR
Example: SELECT * FROM users WHERE city = 'Delhi' AND age > 25;

10. Difference between AND and OR
– AND needs all conditions true
– OR needs one condition true

Quick interview advice
• Always say execution order: FROM → WHERE → SELECT → ORDER BY → LIMIT
• Write clean examples
• Speak logic first, syntax next¹

Double Tap ❤️ For More
  • ❤ 6
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 →