View Single Post
Quote:
Originally Posted by RobTrew View Post
The task table has a context field, the value of which is either NULL or the id of a particular context.

To count only tasks which have an assigned context, you need to add the condition and (context is not null) to any Select ... from task lines in the SQL.

For example:
Code:
select "ALL ACTIONS", count(*) from task where (projectinfo is null) and (childrenCount=0);
could be edited to:

Code:
select "ACTIONS WITH CONTEXTS", count(*) from task where (projectinfo is null) and (childrenCount=0) and (context is not null);
Thanks a lot!