Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>>If a rep works on 4 projects, they're still only 1 rep.
>Right, Either will give you that.
I tried the cnt(Distinct repid) as repcnt, but it still returned 14 rather than 9.
Each manager has 2 teams. A rep can spend time on either team. The task is to find the average time per rep for each manager's team AND manager overall. the average is simple: Sum(time4team) / RepCnt4Team = team avg time/rep
The same for manager overall: sum(alltime) / repcnt
The problem is when a rep is on both teams, they can't get counted twice.
I'll eventually figure it out, but it gets uglier the closer I get...
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement