In table B I have 3 apps with three records each.
I need a query which will return "yellow.gif" for a sum of the three scores is 0 (as in 3070)
and "red.gif" if the sum is 1 or more and less t

han 9 (as in 3059)
and "green.gif" if the sum of the 3 app scores is 9 or more (as in 3100)
TBL A
id val txt
92 1 yellow.gif
93 2 red.gif
94 3 green.gif
TBL B
ID app score
11 3100 3
13 3100 3
12 3100 3
16 3059 1
17 3059 2
15 3059 1
18 3070 0
19 3070 0
20 3070 0
The result needs to look like:
3070 yellow.gif
3059 red.gif
3100 green.gif
Thanks for your help,
Nick