I have a table that contains my Service Orders and for the service orders there could be many service troubles. I need to a query that will get the results as folows: Joe went to fix a problem and opened service order number 1. The issue was not resolved, customer calls back. Now Bob goes to fix the issue that Joe didn't resolve. Out of this Joe is docked a repeat service. Joe has 1 repeat. The next day customer calls back: issue is not resolved and Joe goes out to fix the problem. Now Bob is docked a repeat. Bob has 1 repeat. The issue was not resolved and Joe is sent to fix the issue again. Joe is docked another repeat. Now joe has 2 repeats. Issue still not resolves and Bob goes out to fix the problem. Joe is docked another repeat. Now Joe has 3 repeats. Issue still not resolved and Bob is sent out again to fix problem. Bob is docked a repeat. Now Bob has 2 repeats and Joe has 3 repeats for the same service order.

The serv_trouble is numeric. The serv_order has a start date and a closed date in another table. Unfortunately the Serv_trouble does not have a date assigned.

I need ideas for how to write this type of query. Below is a sample of the table:

Serv_Trouble TechID Tech ServOrder
1 1 joe 1
2 2 bob 1
3 1 joe 1
4 1 joe 1
5 2 bob 1
6 2 bob 1
7 1 joe 1
1 1 joe 2
2 1 joe 2
3 2 bob 2
4 2 bob 2
5 3 larry 2
7 2 bob 2

Any help will be very, and I mean very appreciated. I have searched most SQL sites for ideas but non seem to solve something like this.