divide the results of 2 queries in a new query

T

tim S

I have one query that give me the number of "stores" in
each state.

I have another query that give me the number of "stores"
that are considered an "18" store.

How do I create a query that will tell me the percent of
stores that are "18" stores in each state, represented as
a percent.
 
J

John Spencer (MVP)

Join the two queries together on the State field and then do the arithmetic

SELECT Q18.State, Q18.StoreCount/QAll.StoreCount as Ratio
FROM Q18 Inner Join QAll
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top