我有两个表考虑a和b,表a有c,d,e,f列。考虑两个表的连接列是“f”。我想检索条件在('c','d','e')中的数据,但条件e应该只出现一次,f和日期的组合按升序排列。有人能帮我吗?
3hvapo4f1#
你好像在描述 row_number() :
row_number()
select t.* from (select t.*, row_number() over (partition by f, e order by date desc) as seqnum from t ) t where seqnum = 1;
1条答案
按热度按时间3hvapo4f1#
你好像在描述
row_number()
: