SQL Playground
TutorialsPlayground
SQL FormatterSQL MinifierSyntax ValidatorJSON to SQLCSV to SQLSQL to JSONER Diagram Generator
Daily ChallengeInterviewsCheat SheetBlog

© 2026 SQL Playground. Built for developers.

PrivacyTermsAboutRSS Feed
SQL Playground
TutorialsPlayground
SQL FormatterSQL MinifierSyntax ValidatorJSON to SQLCSV to SQLSQL to JSONER Diagram Generator
Daily ChallengeInterviewsCheat SheetBlog
Initializing...
Chapter 4: Aggregation
4-1
Your Progress

Aggregate Functions

SQL provides functions to perform calculations on a set of values.

  • COUNT(*): Returns the number of rows.
  • SUM(column): Returns the total sum of a numeric column.
  • AVG(column): Returns the average value.
SELECT COUNT(*) FROM orders;

Task: Calculate the total amount (SUM) of all orders in the orders table.

Loading...
Run a query to see results