LIST
WHERE file.foder = this.file.folder
GROUP BY category
SORT rating DESC