COUNT - Counting Rows1 / 10
The COUNT aggregate function counts the number of rows in a table. Try:
SELECT COUNT(*) FROM characters;| character_id | character_name | house |
|---|---|---|
| 1 | Harry Potter | Gryffindor |
| 2 | Hermione Granger | Gryffindor |
| 3 | Ron Weasley | Gryffindor |
| 4 | Draco Malfoy | Slytherin |
| 5 | Luna Lovegood | Ravenclaw |
Ctrl+Enter to submit
COUNT - Counting Rows - Free SQL Practice Online
Practise COUNT - Counting Rows with 10 free, interactive SQL exercises. You type real queries into your browser and get instant feedback on every answer - no database setup, no install, and no signup. It is a fast, hands-on way to learn SQL online and build query skills you can use at work.