getDownloads to HQL