ie., I want the No.of service for each category Id and for dist_id and dist_name..... The cat_id should not be duplicated.
Plz help me out of thios query as I need it badly. I've done it using crosstab query wizard in Access. here is the query
TRANSFORM Count(tb_consumer.Service_No) AS CountOfService_No
SELECT tb_distribution.Dist_Id + " - " +tb_distribution.Dist_Name AS Id_Name
FROM (tb_category INNER JOIN tb_consumer ON tb_category.SNO = tb_consumer.SNO) INNER JOIN tb_distribution ON tb_consumer.Area_Id = tb_distribution.Area_Id
GROUP BY tb_distribution.Dist_Id, tb_distribution.Dist_Name
It's actually like distribution wise and category wise service count list...ok!
If any one can, plz tell me how to write or convert the same to ORACLE or SQL Server.