AQL: Querying TinySocial AsterixDB

Query 0-A - Exact-Match Lookup

use dataverse TinySocial;

for $user in dataset FacebookUsers
where $user.id = 8
return $user;
javascript here

Query 0-B - Range Scan

use dataverse TinySocial;

for $user in dataset FacebookUsers
where $user.id >= 2 and $user.id <= 4
return $user;

Query 1 - Other Query Filters

use dataverse TinySocial;

for $user in dataset FacebookUsers
where $user.user-since >= datetime('2010-07-22T00:00:00')
and $user.user-since <= datetime('2012-07-29T23:59:59')
return $user;

Query 2-A - Equijoin


Query 2-B - Index join


Query 3 - Nested Outer Join


Query 4 - Theta Join


Query 5 - Fuzzy Join


Query 6 - Existential Quantification


Query 7 - Universal Quantification


Query 8 - Simple Aggregation


Query 9-A - Grouping and Aggregation


Query 9-B - (Hash-Based) Grouping and Aggregation


Query 10 - Grouping and Limits


Query 11 - Left Outer Fuzzy Join