blob: 0ffe2b08eb05fb0c9d324a1bda2a556d74a91916 [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001drop dataverse tpch if exists;
2create dataverse tpch;
3use dataverse tpch;
4
5create type OrderType as closed {
6 o_orderkey: int32,
7 o_custkey: int32,
8 o_orderstatus: string,
9 o_totalprice: double,
10 o_orderdate: string,
11 o_orderpriority: string,
12 o_clerk: string,
13 o_shippriority: int32,
14 o_comment: string
15}
16
17create nodegroup group1 if not exists on nc1, nc2;
18create dataset Orders(OrderType)
ramangrover29669d8f62013-02-11 06:03:32 +000019 primary key o_orderkey on group1;
vinayakb38b7ca42012-03-05 05:44:15 +000020
21write output to nc1:"/tmp/push_limit.adm";
22
23for $o in dataset('Orders')
24where $o.o_totalprice > 100
25order by $o.o_orderkey
26limit 10 offset 5
27return { "price": $o.o_totalprice, "date": $o.o_orderdate }
28