Sha256: e73caa4a8dbfc7b17ec732f7f4a5ee67467c1565d77b3694ef453764d2752046

Contents?: true

Size: 545 Bytes

Versions: 5

Compression:

Stored size: 545 Bytes

Contents

// vim: ft=javascript
// For each Arizona brewery get the brewery's name, location, and a list of
// competitors' names -- where competitors are other breweries that are
// geographically close to their location
{
  "statement": "SELECT bw1.name AS brewer, bw1.geo AS location, (SELECT VALUE bw2.name FROM breweries bw2 WHERE bw2.name != bw1.name AND abs(bw1.geo.lat - bw2.geo.lat) <= 0.1 AND abs(bw2.geo.lon - bw1.geo.lon) <= 0.1) AS competitors FROM breweries bw1 WHERE bw1.state = 'Arizona' ORDER BY bw1.name LIMIT 3",
  "pretty": true
}

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
mt-libcouchbase-1.4.03 ext/libcouchbase/example/analytics/queries/16-theta-join.json
mt-libcouchbase-1.4.02 ext/libcouchbase/example/analytics/queries/16-theta-join.json
mt-libcouchbase-1.4.01 ext/libcouchbase/example/analytics/queries/16-theta-join.json
mt-libcouchbase-1.4.0 ext/libcouchbase/example/analytics/queries/16-theta-join.json
libcouchbase-1.3.2 ext/libcouchbase/example/analytics/queries/16-theta-join.json