Below Query
select {product.pk} , count({product.pk}) from {product},{catalogversion},{WishList2Entry},{wishlist2} where {catalogversion.pk}={product.catalogversion} and {WishList2Entry.product}={product.pk} and {catalogversion.version}='Online' and {WishList2Entry.wishlist}={wishlist2.pk} GROUP BY {product.pk} order by count({product.pk}) asc