I have a table:
State City Class Population
S1 SC1 A 10
S1 SC2 B 5
S1 SC3 A 7
S2 S2C1 B 6
S2 S2C2 A 13
S2 S2C3 A 10
The desired result set from query:
States Count_of_Class_A_Cities Total Population of State
S1 2 22
S2 2 29
Is this possible to do using conditional sum and count aggregates? or pivots? and not using inner count or inner sum statements within a select statement.
Thanks.