0

我需要一个只有货币历史最后一个值的货币列表,在 sql 中这个查询有效:

    select
      this_.name as y2_,
      this_.id as y3_,
      this_.currency as y4_,
      (select currency_value from currency_history where currency_id = this_.id order by id desc limit 1) as y5_,
      (select date_register from currency_history where currency_id = this_.id order by id desc limit 1) as y6_
  from
      currency this_ 

我怎么能在休眠标准中做到这一点?

4

0 回答 0