H
hswerdfe
I amusing an MS Access 2003 and I
I have 2 tables The first one is "people" and looks like this
First_N, Last_N, Age
================
sue, smith, 23
bob, smith, 42
sherri, smith, 81
bill, black, 9
john, black, 51
sherri, black, 22
My second table is "AgeRange" and looks like this
MinAge, MaxAge, AgeType
======================
0, 30, young
31, 65, middle
66, 150, old
I am looking for a query that tells me how many people of each last
name are of each AgeType.
the output I am looking for would look something like this.
Last_N, AgeType, Number
=====================
smith, young, 1
smith, middle, 1
smith, old, 1
black, young, 2
black, middle, 1
black, old, 0
I don't care if rows with zeros are omitted or not.
I know how to do the grouping and the counting, but not how two link
two tables with a range of values like this.
If anybody has a solution or a good tutorial on this I would
appreciate any help you can give me,
Note I am looking for a general solution as my actual range table has
13 rows not 3 and my main table has something like 500,000 rows.
Thanks in advance,
Howie
I have 2 tables The first one is "people" and looks like this
First_N, Last_N, Age
================
sue, smith, 23
bob, smith, 42
sherri, smith, 81
bill, black, 9
john, black, 51
sherri, black, 22
My second table is "AgeRange" and looks like this
MinAge, MaxAge, AgeType
======================
0, 30, young
31, 65, middle
66, 150, old
I am looking for a query that tells me how many people of each last
name are of each AgeType.
the output I am looking for would look something like this.
Last_N, AgeType, Number
=====================
smith, young, 1
smith, middle, 1
smith, old, 1
black, young, 2
black, middle, 1
black, old, 0
I don't care if rows with zeros are omitted or not.
I know how to do the grouping and the counting, but not how two link
two tables with a range of values like this.
If anybody has a solution or a good tutorial on this I would
appreciate any help you can give me,
Note I am looking for a general solution as my actual range table has
13 rows not 3 and my main table has something like 500,000 rows.
Thanks in advance,
Howie