SELECT		WebStatValue	AS 'ProductID',
        	COUNT(*)        AS 'Views'
FROM		WebStat
WHERE		WebStatSite     = 'BagCo'
AND			WebStatType	    = 'Product'
AND     	DATE( WebStatTimestamp ) BETWEEN '{{{FromDate}}}' AND '{{{ToDate}}}'
GROUP BY	WebStatValue
ORDER BY	Views DESC,
			WebStatValue