Anyone got a nice script to calculate for each value in tblStatus a count in tblFoo.
So the result in the case below would be
Status | Count
Status1 1
Status2 1
Status3 1
Status4 2
tblFoo
==========================
StatusID | Foo
1 asdf
4 yhjhfh
3 etherh
2 asfasw
4 asdfsadf
tblStatus
==========================
StatusID | Status
1 Status1
2 Status2
3 Status3
4 Status4
So the result in the case below would be
Status | Count
Status1 1
Status2 1
Status3 1
Status4 2
tblFoo
==========================
StatusID | Foo
1 asdf
4 yhjhfh
3 etherh
2 asfasw
4 asdfsadf
tblStatus
==========================
StatusID | Status
1 Status1
2 Status2
3 Status3
4 Status4