tags:

views:

16

answers:

0

Hi all,

I have a QUERY

SELECT
    p.*,
    b.sBoutiqueName,
    (SELECT SUM( nViewCount )
        FROM `COV_PRODUCT_STATS_COUNT`
        WHERE nProductID = p.nProductID) AS nViewCount,
    (SELECT SUM( nLinkClickCount )
        FROM `COV_PRODUCT_STATS_COUNT`
        WHERE nProductID = p.nProductID) AS nLinkClickCount,
    (SELECT SUM( nWishListCount)
        FROM `COV_PRODUCT_STATS_COUNT`
        WHERE nProductID = p.nProductID) AS nWishListCount,
    (SELECT SUM( nReferredCount)
        FROM `COV_PRODUCT_STATS_COUNT`
        WHERE nProductID = p.nProductID) AS nReferredCount
FROM `COV_PRODUCTS` p
LEFT JOIN `COV_BOUTIQUE` b
    ON p.nBoutiqueID=b.nBoutiqueID
WHERE 1 AND p.bDeleted=0
ORDER BY nLinkClickCount DESC
LIMIT 0,10

Now I want to sort this query's Result set by "p.nBoutiqueID asc"

Any one can tell how i can do it by using MYSQL