思路:
1. 使用context + having + rank 过滤出每天涨幅前5的股票
2. 使用pivot by 转换成截面(宽表)模式
date = stretch(2024.01.01..2024.01.10, 100)
sym = take("A"+string(0..9), 100)
incPersent = rand(1.0, 100)
t = table(date, sym, incPersent)
select incPersent from ( select * from t context by date csort incPersent desc having rank(incPersent) < 5 ) pivot by date, sym