|

楼主 |
发表于 2023-9-3 17:27
来自手机
|
显示全部楼层
在duckdb中造了一些数据
create or replace table t10m
as
with t1 as (select (random()*50)::int16 as owner from range(10000))
select
row_number()over()::int as id,a.*
from t1 a,range(1000) b
;
select owner,count(*) from t10m group by owner order by 2;
select id,owner
from t10m
where owner=10
order by id desc
offset 100 rows fetch next 10 rows only;
select count(*) from t10m where owner >=10;
select id,owner
from t10m
where owner>=10
order by id desc
offset 6000000 rows fetch next 10 rows only;
|
|