calculcate statistics by goods