我有两张桌子:
customer
和schema_id
架构表有:schema_id, period, amt, updated_date
我需要加入客户和模式,但只检索加入的最新记录而不是其他记录。
customer table
cust_id name schema_id
1 ABC 1
模式表
schema_id period amt updated_date
1 1 100 2010-4-1
1 2 150 2011-4-1