D
Dawn
Table Account, Field customerid, AccountNo (PK), AccountType(for example:
Saving account; Current account, Qdii, etc )
Rule: One customerid may open several accounts , each with a unique
AccountNo, and each has an AccountType. One customerid can open several
accounts of the same AccountType, but the AccountNos are different.
Job description:
Calculate the count of customerids(No duplication) under the classification
of AccountType.
Problem:
Because the customerid are not unique, the result of the query is
duplicating. Of course ,the job can be done by writing two queries, one for
generating a detailed data pool according to the condition, the other quoting
the first query for generating the collected results.
But if I want to do this job in one query, how to realize it? (for example,
using Word “Distinct “)
Thanks.
Dawn
Saving account; Current account, Qdii, etc )
Rule: One customerid may open several accounts , each with a unique
AccountNo, and each has an AccountType. One customerid can open several
accounts of the same AccountType, but the AccountNos are different.
Job description:
Calculate the count of customerids(No duplication) under the classification
of AccountType.
Problem:
Because the customerid are not unique, the result of the query is
duplicating. Of course ,the job can be done by writing two queries, one for
generating a detailed data pool according to the condition, the other quoting
the first query for generating the collected results.
But if I want to do this job in one query, how to realize it? (for example,
using Word “Distinct “)
Thanks.
Dawn