Felix18807
Programmer
I have a query which groups together duplicate accounts within a database. It has the following fields
GroupID, AccountIDs, AccountCreatedDate, AddressPopulation
(GroupID indicates thats the AccountIDs belong together)
What I want to be able to produce is
1) A Count of AccountIDs within a GroupID Where AccountCreatedDate is the most recent (max) within that group AND where AddressPopulation is the maximum within that group.
AND
2) A Count as above where the most recent is NOT the most populated..
The goal being to prove/disprove if the most recently produced accounts contain the largest amount of address information for the purposes of merging accounts.
I hope this makes sense...
I am either being silly and missing something basic or this involves subqueries which are not my forte
Many thanks for reading this.
GroupID, AccountIDs, AccountCreatedDate, AddressPopulation
(GroupID indicates thats the AccountIDs belong together)
What I want to be able to produce is
1) A Count of AccountIDs within a GroupID Where AccountCreatedDate is the most recent (max) within that group AND where AddressPopulation is the maximum within that group.
AND
2) A Count as above where the most recent is NOT the most populated..
The goal being to prove/disprove if the most recently produced accounts contain the largest amount of address information for the purposes of merging accounts.
I hope this makes sense...
I am either being silly and missing something basic or this involves subqueries which are not my forte
Many thanks for reading this.