JustATheory
IS-IT--Management
Hi,
I need to do a count of a count field in one query, it's just not happening. Basic idea:
Table
Account State
123 CA
456 CA
789 HI
122 WA
Selct State, count(state)CNT from Table
Group by STATE;
Result:
State CNT
CA 2
HI 1
WA 1
What I need to include as a subquery is counting the CNT so that the results are:
CNT CountOfCNT
2 1
1 2
I keep receiving errors, and it seems that this would be an easy subquery, what is the next step?
Any help is welcomed!
JustATheory
I need to do a count of a count field in one query, it's just not happening. Basic idea:
Table
Account State
123 CA
456 CA
789 HI
122 WA
Selct State, count(state)CNT from Table
Group by STATE;
Result:
State CNT
CA 2
HI 1
WA 1
What I need to include as a subquery is counting the CNT so that the results are:
CNT CountOfCNT
2 1
1 2
I keep receiving errors, and it seems that this would be an easy subquery, what is the next step?
Any help is welcomed!
JustATheory