Distinct Count

68 views
Skip to first unread message

Daniel Fagnan

unread,
Jan 22, 2014, 9:56:10 PM1/22/14
to sk...@googlegroups.com
I'm wondering if I'm missing something to do a distinct count on some property.

With this query: `SELECT count(DISTINCT stream)`, where `stream` is a non-transient property. I get the following error:

```
skyd.ExecutionEngine: Unable to merge: [string "..."]:199: attempt to index local \'a\' (a nil value)
```

This also happens on every property, transient and non-transient. However, a simple `count()` works perfectly.

Any Thoughts?

Daniel Fagnan

unread,
Jan 22, 2014, 10:06:50 PM1/22/14
to sk...@googlegroups.com
Ahh, it seems I needed to have some sort of `GROUP BY` clause. That fixed the issue.

Ben Johnson

unread,
Jan 23, 2014, 9:21:20 AM1/23/14
to Daniel Fagnan, sk...@googlegroups.com
Daniel-

I'm glad you got it figured out. The parser definitely needs some work in how it reports errors. It's pretty rough right now. There's a large refactor of the query/ast package in the LLVM branch which should get merged over fairly soon.

-- 
Ben

Daniel Fagnan

unread,
Jan 31, 2014, 4:36:21 PM1/31/14
to sk...@googlegroups.com, Daniel Fagnan
Thanks. I've been keeping track somewhat of the progress on that branch. Things are looking pretty awesome in there.
Reply all
Reply to author
Forward
0 new messages