TGViewer
Data Analytics Data Analytics @sqlspecialist · 111K subscribers
Post #2395 8.49K
✅ Top 10 SQL Statements & Functions for Data Analysis 📊💻

Mastering SQL is essential for data analysts. Here are the most commonly used SQL commands and functions that help extract, manipulate, and summarize data efficiently.

1️⃣ SELECT – Retrieve Data 
Use it to fetch specific columns from a table.
SELECT name, age FROM employees;


2️⃣ FROM – Specify Table 
Tells SQL where to pull the data from.
SELECT * FROM sales_data;


3️⃣ WHERE – Filter Data 
Applies conditions to filter rows.
SELECT * FROM customers WHERE city = 'Delhi';


4️⃣ GROUP BY – Aggregate by Categories 
Groups rows based on one or more columns for aggregation.
SELECT department, COUNT(*) FROM employees GROUP BY department;


5️⃣ HAVING – Filter After Grouping 
Filters groups after GROUP BY (unlike WHERE, which filters rows).
SELECT category, SUM(sales) 
FROM orders
GROUP BY category
HAVING SUM(sales) > 10000;


6️⃣ ORDER BY – Sort Results 
Sorts the result set in ascending or descending order.
SELECT name, salary FROM employees ORDER BY salary DESC;


7️⃣ COUNT() – Count Records 
Counts number of rows or non-null values.
SELECT COUNT(*) FROM products;


8️⃣ SUM() – Total Values 
Calculates the sum of numeric values.
SELECT SUM(amount) FROM transactions;


9️⃣ AVG() – Average Values 
Returns the average of numeric values.
SELECT AVG(price) FROM items;


🔟 JOIN – Combine Tables 
Combines rows from multiple tables based on related columns.
SELECT a.name, b.order_date  
FROM customers a 
JOIN orders b ON a.id = b.customer_id;


SQL Resources: https://whatsapp.com/channel/0029VanC5rODzgT6TiTGoa1v

💬 Tap ❤️ for more!
  • ❤ 12
More from @sqlspecialist
  1. Oct 13, 2026📊 Data Analyst Interview Series — Part 9 Guys, let's continue our Data Analyst Interview…
  2. Oct 13, 2026𝗧𝗢𝗣 𝗙𝗥𝗘𝗘 𝗖𝗢𝗨𝗥𝗦𝗘𝗦 𝗧𝗢 𝗕𝗢𝗢𝗦𝗧 𝗬𝗢𝗨𝗥 𝗦𝗞𝗜𝗟𝗟𝗦 𝗜𝗡 𝟮𝟬𝟮𝟲! Explor…
  3. Oct 12, 20268️⃣ You receive a dataset with inconsistent date formats. How would you clean it? Sample A…
  4. Oct 12, 2026📊 Data Analyst Interview Series — Part 7 Guys, let's continue our Data Analyst Interview…
  5. Oct 12, 2026🚀 𝗪𝗵𝗶𝗰𝗵 𝗧𝗲𝗰𝗵 𝗦𝗸𝗶𝗹𝗹 𝗪𝗶𝗹𝗹 𝗬𝗼𝘂 𝗠𝗮𝘀𝘁𝗲𝗿 𝗶𝗻 𝟮𝟬𝟮𝟲? Want to buil…
  6. Oct 9, 2026“Here, the data is sorted by the second column in descending order and the first five rows…
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 →