Seeing the Big Picture: SUM, AVG, and COUNT
Explore how to use SQL aggregate functions SUM AVG and COUNT to summarize and analyze data. Learn to write queries that calculate totals averages and counts, apply filters, and interpret results for practical data insights.
Step 1: Start with a question
So far, you’ve been exploring individual rows—every employee, every record. Now let’s think bigger.
What if you asked: What’s the total salary cost for the company?
Instead of listing all employees, you want a single number, the total sum of all salaries.
Prompt: Write a SQL query that calculates the total of all salaries from the employees table.
Powered by AI
5 Prompts Remaining
Step 2: Run and observe
AI will likely produce:
Run it. You’ll see a single number.
Reflect: