blob: f51e455d24579ab13ffc4c00afa9f689954a381e [file] [log] [blame]
vinayakb38b7ca42012-03-05 05:44:15 +00001use dataverse demo_aql;
2
3declare type DBLPType as open {
4 id: int32,
5 dblpid: string,
6 title: string,
7 authors: string,
8 misc: string
9}
10
11declare nodegroup group1 on nc1, nc2;
12
13declare dataset DBLP(DBLPType)
14 partitioned by key id on group1;
15
16write output to nc1:"/tmp/110-self-join-dblp.adm";
17
18set simthreshold '.5f';
19
20for $k in (
21 for $i in dataset('DBLP')
22 for $j in dataset('DBLP')
23 where $i.title ~= $j.title
24 order by $i.id, $j.id
25 return {'dblp1': $i, 'dblp2': $j}
26)
27where $k.dblp1.id < $k.dblp2.id
28return $k