per dendrolog:

przydzielone(dendrolog)
from TBP where 
	current and
	(user1Answer.username=:dendrolog or user2Answer.username=:dendrolog);

wykonane(dendrolog)
from TBP where 
	current and
	((user1Answer.username=:dendrolog and user1Answer.accepted) or
	(user2Answer.username=:dendrolog and user2Answer.accepted));


pelne rozbiory(dendrolog)
from TBP where 
	current and
	((user1Answer.username=:dendrolog and user1Answer.accepted and user1Answer.type = blaba.FULL) or
	(user2Answer.username=:dendrolog and user2Answer.accepted and user2Answer.type = blaba.FULL));

odp spec(dendrolog)
from TBP where 
	current and
	((user1Answer.username=:dendrolog and user1Answer.accepted and user1Answer.type != blaba.FULL) or
	(user2Answer.username=:dendrolog and user2Answer.accepted and user2Answer.type != blaba.FULL));

kolizje(dendrolog)
size(from TBP where current and user1Answer.username=:dendrolog or
  user2Answer.username=:dendrolog and state = ...)


laczne:

przydzielone
size(from TBP where current and user1Answer != null)
+ size (from TBP where current and user2Answer != null);

wykonane
size(from TBP where current and user1Answer != null and user1Answer.accepted)
+ size (from TBP where current and user2Answer != null and user2Answer.accepted);

pelne
size(from TBP where current and user1Answer != null and user1Answer.accepted and user1Answer.type = blaba.FULL)
+ size (from TBP where current and user2Answer != null and user2Answer.accepted and user2Answer.type = blaba.FULL);

specjalne
size(from TBP where current and user1Answer != null and user1Answer.accepted and user1Answer.type != blaba.FULL)
+ size (from TBP where current and user2Answer != null and user2Answer.accepted and user2Answer.type != blaba.FULL);

kolizje
2*size(from TBP where current and (state = sss.COLLISION or state = sss.INACCEPTANCE or state = sss.COLLISION_SOLVED))

TODO:
1. Z
2. J
3. C
4. M
5. X
6. statsy
7. superkasia
8. niespójności (przejmowanie przez superdendrologa)
9. od nowa


