Skip to content

Instantly share code, notes, and snippets.

@sqlparser
Created December 12, 2023 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sqlparser/a6408f624cb8f2c45b9f91e00c4daf85 to your computer and use it in GitHub Desktop.
Save sqlparser/a6408f624cb8f2c45b9f91e00c4daf85 to your computer and use it in GitHub Desktop.
Couchbase Sample SQL
```sql
SELECT name, (SELECT raw avg(s.ratings.Overall)
FROM t.reviews as s)[0] AS overall_avg_rating
FROM hotel AS t
ORDER BY overall_avg_rating DESC
LIMIT 3;
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment