关键字 distinct 在hibernate中给子表字段排序会报错,该怎么解决

关键字 distinct 在hibernate中给子表字段排序会报错会报一个SQLcommandnotproperlyended错误不知道怎么解

关键字 distinct 在hibernate中给子表字段排序会报错
会报一个  
SQL   command   not   properly   ended
错误   不知道怎么解决   求高人指点

[解决办法]
HQL贴出来