Some time you need to show Total number of records and
column value from a SQL Server table.
Below is my Data Table from which I am reading records:

Image 1.
Now Select Column from this table:

Image 2.
Now I want to show one more column which will show
Total Number of records in this table. So First below thought in our mind come:
SELECT COUNT(*) AS TotalRecords, EMPLOYEE_ID,NAME,EMAIL,MOBILE,
COUNTRY
FROM EMPLOYEETEAM
If
you use above query then you will get below error message:

Image 3.
So the right Query is:
SELECT COUNT(*) OVER (PARTITION BY 1) AS TotalRecords,
EMPLOYEE_ID, NAME,
EMAIL, MOBILE, COUNTRY FROM EMPLOYEETEAM

Image 4.