添加新评论

You want embedded queries, which not all SQLs support. In t-sql you'd have something like

select  r.registration, r.recent, t.id, t.unittype
from    ( 
    select  registration, max([date]) recent
    from    @tmp 
    group by 
        registration
    ) r
left outer join 
    @tmp t 
on  r.recent = t.[date]
and r.registration = t.registration 

添加新评论

受限制的 HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。