Example output:
85007 / 12 / AZ
90210 / 4 / CA
This is about as far as my knowledge takes me:
select count(distinct postalcode) from customers
Any help generating this query would be greatly appreciated.
thanks!
"I need to count distinct postalcodes"?
Do you really mean to count distinct postalcodes or display distinct postalcodes with the counts and their states?
Your example output seems to indicate the latter.
|||
jeskey wrote:
I need to count distinct postalcodes from the customer table and then next to it put the number of times that postalcode was used and the state for the zipcode.
Example output:
85007 / 12 / AZ
90210 / 4 / CA
This is about as far as my knowledge takes me:
select count(distinct postalcode) from customers
Any help generating this query would be greatly appreciated.thanks!
I think what you really need is the count of zipz by zip,state:
Select PostalCode, Count(*), State
From <tables.
group by PostalCode, State
|||yes, that is what i needed to do. thanks for your help! much appreciated.john|||thanks for your help, Rafael answered this post.
No comments:
Post a Comment