Here ia another query problem, I know for most of you guys it is easy.
I have a table say
tbl
id Catagory values
1 Min 0
1 Max 8
2 MIN 18
2 Max NULL
3 MIN NULL
3 Max 60
NB if min or max value is not given for min we take 0 for max we take 1000
each id has min and max catagory of values. I want to count those id which are
<1 not inclusive
between 1 and 18 inclusive
greater than 18 not inclusive
eg for id 1 it has min 0 and max 8, it should be counted under <1 and between 1 and 8
therefore the resultset should look like
catagory count
<1 2
between 1 and 18 3
>18 2
thanks
I have a table say
tbl
id Catagory values
1 Min 0
1 Max 8
2 MIN 18
2 Max NULL
3 MIN NULL
3 Max 60
NB if min or max value is not given for min we take 0 for max we take 1000
each id has min and max catagory of values. I want to count those id which are
<1 not inclusive
between 1 and 18 inclusive
greater than 18 not inclusive
eg for id 1 it has min 0 and max 8, it should be counted under <1 and between 1 and 8
therefore the resultset should look like
catagory count
<1 2
between 1 and 18 3
>18 2
thanks