The below is a small section of a query that I need help with. This section produces a count of records where both the EmailAddress and DateOfBirth are duplicated.
The commented out line should produce a count of records where the EmailAddress is duplicated but the DateOfBirth differs. i.e. Identify users who share an email address (assuming two users would have different date of births).
SELECT
u.EmailAddress,
u.DateOfBirth,
COUNT(*) over (partition by u.EmailAddress, DateOfBirth) AS EmailAndDoBDup,
--COUNT(*) where EmailAddress is duplicate but DateOfBirth is unique (in the aggregated results)
FROM [User] AS u
Thanks