What is the difference between COUNT(*) and COUNT(*) OVER()


Take the following code example:

SELECT MaritalStatus,
       COUNT(*) AS CountResult
       COUNT(*) OVER() AS CountOverResult
       FROM (schema).(table)
       GROUP BY Marital Status

COUNT(*) Returns all rows ignoring nulls right?

What does COUNT(*) OVER() do?

One Response to “What is the difference between COUNT(*) and COUNT(*) OVER()”


Leave a Reply

You must be logged in to post a comment.

Question and Answer is proudly powered by WordPress.
Theme "The Fundamentals of Graphic Design" by Arjuna
Icons by FamFamFam