我需要把下一个查询到标准 SELECT DISTINCT SUBSTRING(id, 1, LENGTH(id)-3) AS id_trunc, MAX(version) as version, MAX(code) as code
FROM theTable
WHERE (version like '%.%' AND NOT version LIKE '%.0' AND event_code
两个表像这样 Empregistration
emp_id;
Name;
EmpTransaction
emp_id
trndate
而且我写SQL这样的查询 SELECT Max(trndate),empregistration.fname
from emptransaction,empregistration
where em
我有类: Entity
@Table(name = "oldusers")
public class User implements UserDetails {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int id;
......
@OneToMany(fetch