Hi friends
The following query returns list of our cliens requests (categorywise we mark each each client request under a category for example finance,accounts,bugs etc.,),
category,total no of requests
SELECT ClientGroup.fk_clientid, Client.cl_name, Task.fk_catid, Category.Catname,
count(ClientGroup.fk_clientid) as [TotalReq]
FROM Category INNER JOIN
Task ON Category.Catid = Task.fk_catid INNER JOIN
ClientGroup ON Task.Taskid = ClientGroup.fk_taskid INNER JOIN
Client ON ClientGroup.fk_clientid = Client.Clientid
Group by ClientGroup.fk_clientid, Client.cl_name, Task.fk_catid, Category.Catname
how can i modify abv query to return additional info like count(uncompleted requests) i.e requests we've not finished
and count(completed requests) i.e request which finished .(actually 5 th col in abv select list is sum of these 2 new cols).
To know whether a request is finished or not there is field in task table i.e completed(0 or 1)
Relations:
Here the table Task pimary key table to ClientGroup and Category
Thanks for ur ideas
cheers
The following query returns list of our cliens requests (categorywise we mark each each client request under a category for example finance,accounts,bugs etc.,),
category,total no of requests
SELECT ClientGroup.fk_clientid, Client.cl_name, Task.fk_catid, Category.Catname,
count(ClientGroup.fk_clientid) as [TotalReq]
FROM Category INNER JOIN
Task ON Category.Catid = Task.fk_catid INNER JOIN
ClientGroup ON Task.Taskid = ClientGroup.fk_taskid INNER JOIN
Client ON ClientGroup.fk_clientid = Client.Clientid
Group by ClientGroup.fk_clientid, Client.cl_name, Task.fk_catid, Category.Catname
how can i modify abv query to return additional info like count(uncompleted requests) i.e requests we've not finished
and count(completed requests) i.e request which finished .(actually 5 th col in abv select list is sum of these 2 new cols).
To know whether a request is finished or not there is field in task table i.e completed(0 or 1)
Relations:
Here the table Task pimary key table to ClientGroup and Category
Thanks for ur ideas
cheers