in the order by clause you could add the COUNT(pNo) desc, this will sort the branch no in ascending order and the highest property count will be on top for that branch or you could just sort it on the count. there are actually couple of ways like using max or nested selects etc.
baki100
Junior Poster in Training
79 posts since Apr 2009
Reputation Points: 12
Solved Threads: 14