Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No way to bind aggregate to variable in query #51

Open
gburd opened this issue Aug 6, 2020 · 2 comments
Open

No way to bind aggregate to variable in query #51

gburd opened this issue Aug 6, 2020 · 2 comments
Labels

Comments

@gburd
Copy link

gburd commented Aug 6, 2020

The datomic docs have an example query of the form:

[:find ?year (median ?namelen) (avg ?namelen) (stddev ?namelen)
 :with ?track
 :where [?track :track/name ?name]
        [(count ?name) ?namelen]
        [?medium :medium/tracks ?track]
        [?release :release/media ?medium]
        [?release :release/year ?year]]

Our query syntax doesn't allow the [(count ?name) ?namelen] clause.

Between this and mozilla#647 I'm not sure we can implement a top-sites like query directly. (That might not be true, and could just a reflection of my ignorance, though!)

Original by @thomcc

@gburd gburd added the A-query label Aug 6, 2020
@gburd
Copy link
Author

gburd commented Aug 6, 2020

Possibly a duplicate of mozilla#750?

Original by @thomcc

@gburd
Copy link
Author

gburd commented Aug 6, 2020

Yep, dupe of that.

Original by @rnewman

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant