我正在尝试使用 dplyr 图书馆,我是新来的。我将如何为下面的sql执行此操作?
dplyr
select v1, v2, max(v2) as v3 from (select v1, v2 from data1 where v1<10) group by v1, v2;
k10s72fa1#
data1 %>% filter(v1<10) %>% group_by(v1,v2) %>% summarize(v3 = max(v2)) %>% ungroup()
1条答案
按热度按时间k10s72fa1#