Sectionย 1. Chapterย 6
single
How many?
Swipe to show menu
What if you want to know the exact number of observations in your database? Counting manually sounds like a very very bad idea.
Fortunately, SQL has the built-in functionality of counting rows. To count the number of rows in the whole dataset use COUNT *. For example, we can count the total number of our website being visited by using the following query:
12SELECT COUNT(*) FROM visitors
Please note, that for counting the total number of rows you must place
*within parenthesis, likeCOUNT(*).
Task
Swipe to start coding
Count number of Audi cars sold from audi_cars table.
Solution
Everything was clear?
Thanks for your feedback!
Sectionย 1. Chapterย 6
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat