blob: 934387bc0cfe5f37761b1fef9db7b3f12c0e7f2a [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001use dataverse events;
2
3declare type UserType as open {
4 name: string,
5 email: string,
6 interests: {{string}},
7 address: AddressType,
8 member_of: {{
9 {
10 sig_name: string,
11 chapter_name: string,
12 member_since: date
13 }
14 }}
15}
16
17declare type AddressType as closed {
18 street: string,
19 city: string,
20 zip: string,
21 latlong: point
22}
23
24declare nodegroup group1 on nc1, nc2;
25
ramangrover29669d8f62013-02-11 06:03:32 +000026declare dataset User(UserType) primary key name on group1;
vinayakb38b7ca42012-03-05 05:44:15 +000027
28write output to nc1:"/tmp/q1.adm";
29
30for $user in dataset('User')
31where some $i in $user.interests
32 satisfies $i = "movies"
33return {"name": $user.name}