megatronixs
Registered User.
- Local time
- Today, 13:55
- Joined
- Aug 17, 2012
- Messages
- 719
Hi all,
I have a query that will give me the results from how many countries come from a criteria.
HK AE 18
HK CN 1
HK TR 1
HK VC 1
I try to get the sum from all inside a separate query that will give me simply: 21
I use the below query but I don't get it :-(
Greetings.
I have a query that will give me the results from how many countries come from a criteria.
HK AE 18
HK CN 1
HK TR 1
HK VC 1
I try to get the sum from all inside a separate query that will give me simply: 21
I use the below query but I don't get it :-(
Code:
SELECT COUNT(*), count(SUBQUERY.ORDERING_INST_NAME) from
(
SELECT Scnr1.ORDERING_INST_COUNTRY, Scnr1.BENEFICIARY_INST_COUNTRY, Count(Scnr1.ORDERING_INST_NAME) AS CountOfORDERING_INST_NAME
FROM Scnr1
GROUP BY Scnr1.ORDERING_INST_NAME, Scnr1.ORDERING_INST_COUNTRY, Scnr1.BENEFICIARY_INST_COUNTRY, Scnr1.DEBIT_ACCOUNT_NUMBER
HAVING (((Scnr1.DEBIT_ACCOUNT_NUMBER)="123456789"))
) AS SUBQUERY
Greetings.