select * from tbl_OFS_SkuRatings with (nolock) where ownerId = and ownerType = and skuId = select round( avg( cast( myRating as float ) ), 2 ) avgRating, count( myRating ) totalRatings from tbl_OFS_SkuRatings with (nolock) where ownerId = and ownerType = and skuId = select myRating from caller.qmd_getSkuRatings where userId =