TGViewer
Data Analysis Books | Python | SQL | Excel | Artificial Intelligence | Power BI | Tableau | AI Resources Data Analysis Books | Python | SQL | Excel | Artificial Intelligence | Power BI | Tableau | AI Resources @learndataanalysis ยท 53.4K subscribers
Post #1255 4.24K
๐—ข๐—ฟ๐—ฑ๐—ฒ๐—ฟ ๐—ข๐—ณ ๐—˜๐˜…๐—ฒ๐—ฐ๐˜‚๐˜๐—ถ๐—ผ๐—ป in SQL โ†“

1 โ†’ FROM (Tables selected).
2 โ†’ WHERE (Filters applied).
3 โ†’ GROUP BY (Rows grouped).
4 โ†’ HAVING (Filter on grouped data).
5 โ†’ SELECT (Columns selected).
6 โ†’ ORDER BY (Sort the data).
7 โ†’ LIMIT (Restrict number of rows).

๐—–๐—ผ๐—บ๐—บ๐—ผ๐—ป ๐—ค๐˜‚๐—ฒ๐—ฟ๐—ถ๐—ฒ๐˜€ ๐—ง๐—ผ ๐—ฃ๐—ฟ๐—ฎ๐—ฐ๐˜๐—ถ๐—ฐ๐—ฒ โ†“

โ†ฌ Find the second-highest salary:

SELECT MAX(Salary) FROM Employees WHERE Salary < (SELECT MAX(Salary) FROM Employees);

โ†ฌ Find duplicate records:

SELECT Name, COUNT(*)
FROM Emp
GROUP BY Name
HAVING COUNT(*) > 1;
  • ๐Ÿ‘ 7
  • ๐Ÿ˜ 1
More from @learndataanalysis
  1. Sep 23, 2026โœ… Types of Machine Learning Algorithms ๐Ÿค–๐Ÿ“Š 1๏ธโƒฃ Supervised Learning Supervised learning meโ€ฆ
  2. Sep 19, 2026๐Ÿš€ GigaChat 3.5 Reasoning โ€” a new open-source LLM that thinks before it answers. It breaksโ€ฆ
  3. Sep 16, 2026๐ŸŸ  Part 12 โ€” Dashboard Development โ€ข Dashboard layout, Tiled vs Floating, Containers, Deviโ€ฆ
  4. Sep 16, 2026๐Ÿ“Š Tableau Learning Roadmap 2026 If you're starting Tableau from scratch, follow this ordeโ€ฆ
  5. Sep 6, 2026UNPOPULAR OPINION: Excel is still relevant for data analysis. I am often asked by junior dโ€ฆ
  6. Aug 28, 2026โœ… Power BI Basics ๐Ÿ“Š๐Ÿš€ ๐Ÿ‘‰ Power BI is one of the most popular Business Intelligence BI tooโ€ฆ
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 โ†’