Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn The COUNT() Function | Aggregate Functions
Introduction to SQL (60/40)

bookThe COUNT() Function

COUNT() is a function that allows you to count rows in a table or count how many rows match certain criteria.

Let's see an example:

12
SELECT COUNT(name) FROM country;
copy

To count the total number of rows in the table, we can use the following syntax:

12
SELECT COUNT(*) FROM country;
copy
question mark

Which SQL query counts all rows in the country table?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 5. ChapterΒ 3

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

bookThe COUNT() Function

Swipe to show menu

COUNT() is a function that allows you to count rows in a table or count how many rows match certain criteria.

Let's see an example:

12
SELECT COUNT(name) FROM country;
copy

To count the total number of rows in the table, we can use the following syntax:

12
SELECT COUNT(*) FROM country;
copy
question mark

Which SQL query counts all rows in the country table?

Select the correct answer

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 5. ChapterΒ 3
some-alt