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