Hi,
Here's my deal. I have a customers table, and newly created table MSA data table. The MSA (metropolitan statistical area) table contains a lot of statistical information, including zip codes and for each zip code, a related MSA name. However, not all zip codes have a corresponding MSA name, that is some zip codes have a NULL for MSA name.
That said, I need a query that can associate the zip codes from the customers table to the MSA table, and create a grouping or count of customers per MSA NAME.
That is, select all zip codes from customers where the zip code matches the zip code in the MSA table where MSA name is NOT null.
So far the only way I've successfully done this is by creating an intermediary table with customer data and the MSA name.
That is, I don't know how to GROUP BY MSA name without the MSA name being in the same table as customers. Does that make sense.
So, I am wondering if there's a way I can get rid of the intermediary table altogether, in order to run this query.
Thanks much
Here's my deal. I have a customers table, and newly created table MSA data table. The MSA (metropolitan statistical area) table contains a lot of statistical information, including zip codes and for each zip code, a related MSA name. However, not all zip codes have a corresponding MSA name, that is some zip codes have a NULL for MSA name.
That said, I need a query that can associate the zip codes from the customers table to the MSA table, and create a grouping or count of customers per MSA NAME.
That is, select all zip codes from customers where the zip code matches the zip code in the MSA table where MSA name is NOT null.
So far the only way I've successfully done this is by creating an intermediary table with customer data and the MSA name.
That is, I don't know how to GROUP BY MSA name without the MSA name being in the same table as customers. Does that make sense.
So, I am wondering if there's a way I can get rid of the intermediary table altogether, in order to run this query.
Thanks much