select count(distinct A,B,C)from table,就是在table表中根据ABC三个字段去掉重复后求count。 hql 应该如何 写。
[quote][b]select count(*) as record_count from(select distinct A,B,C from t_test ) as temp_table;[/b][/quote]这个可以的,我测试了。嵌套查询,要把你要查询的记录作为一张临时表来查!楼主可以试试!