Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想每十行得到一行,例如,我定义一个表如下,
t=table(1..1000 as id, rand(1.0, 1000) as value)
然后我想得到id%10为1的行。这个sql语句怎么写?
试试这个 sql:
select * from t where rowNo(id) % 10 = 0
函数 rowNo 返回表中每一行的索引位置。