I have a number of different tables that represent different company divisions
Division A has ID number, Salary, age, car.
I need to create a query that counts people according to their pay band
and then be able to apply this query to different divisions.
I have created another table 'IncomeRange' that has 3 values, higher income, medium income, lower income. I want to use this table to query the different Company divions to give me a breakdown of how many people fall in which salary range.
eg.
Division A Table
ID Salary Age Car
001 13000 21
002 55000 45 BMW
003 23000 19 Honda
004 16000 25
005 18000 24 Mini
006 16000 18
IncomeRange Table
higher income medium income lower income
20000 15000 1000
The query should give me
number of ppl earning more then 20000, number of people greater then medium but less then higher. number of people earning low pay but less then medium.
High Medium Low
2 3 1
So by adjusting the vaules in the Income Rnage table I can get different results
Division A has ID number, Salary, age, car.
I need to create a query that counts people according to their pay band
and then be able to apply this query to different divisions.
I have created another table 'IncomeRange' that has 3 values, higher income, medium income, lower income. I want to use this table to query the different Company divions to give me a breakdown of how many people fall in which salary range.
eg.
Division A Table
ID Salary Age Car
001 13000 21
002 55000 45 BMW
003 23000 19 Honda
004 16000 25
005 18000 24 Mini
006 16000 18
IncomeRange Table
higher income medium income lower income
20000 15000 1000
The query should give me
number of ppl earning more then 20000, number of people greater then medium but less then higher. number of people earning low pay but less then medium.
High Medium Low
2 3 1
So by adjusting the vaules in the Income Rnage table I can get different results