I am trying to build complex mysql query but its returning wrong results...
SELECT b.name AS batch_name, b.id AS batch_id, COUNT(DISTINCT s.id)
I have got the solution, i was joining lots of queries together and that's by some results are doubling. thanks.