Computing Counts

  • 07/10/2023
  • SQL
No Comments
  • Can count individual attribute values COUNT(branch_name) COUNT(DISTINCT branch_name)
¨  Can also count the total number of tuples

COUNT(*)

🞑 If used with grouping, counts total number of tuples in each group

🞑 If used without grouping, counts total number of tuples

¨  Counting a specific attribute is useful when:

🞑 Need to count (possibly distinct) values of a particular attribute

🞑 Cases where some values in input multiset may be NULL

  • As before, COUNT ignores NULL values (more on this next week)

About us and this blog

We are a digital marketing company with a focus on helping our customers achieve great results across several key areas.

Request a free quote

We offer professional SEO services that help websites increase their organic search score drastically in order to compete for the highest rankings even when it comes to highly competitive keywords.

Subscribe to our newsletter!

More from our blog

See all posts
No Comments