hql语句:
select mag.mag_id,
count(distinct record.magId, record.articleId, record.screenNum)
from Magazine mag,
ArticleTemplateRecord record
where mag.mag_id=record.magId and
mag.brand_id=656
group by mag.mag_id
报错:
org.hibernate.hql.ast.QuerySyntaxException: expecting CLOSE, found ',' near line 1, column 46
也就是说,distinct record.magId后不希望出现','
请问这用hql该怎么写,别说用sql处理,谢谢!