[DOCS-880] add use case 'distinct' to agg sql chart Created: 12/Dec/12 Updated: 14/Mar/14 Resolved: 12/Dec/12 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | v1.0 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Kay Kim (Inactive) | Assignee: | Kay Kim (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: | |
| Days since reply: | 9 years, 48 weeks, 6 days ago |
| Description |
|
db.final.aggregate( } }, } } ) |
| Comments |
| Comment by Kay Kim (Inactive) [ 14/Mar/14 ] | |
|
Hi Luke – To request new features, you can open a SERVER ticket rather than a DOCs (documentation ticket). | |
| Comment by Luke Thompson [ 14/Mar/14 ] | |
|
That distinct('executor').length doesn't do what I'm asking in the SELECT GROUP - it just tells me how many distinct items there are, not the count of each distinct item. ... I was looking at writing that myself, but I found someone already did it! This was what I was after: It would be really nice to embed that into the real shell instead of having to add it to my environment by hand. Would it be possible to raise that? | |
| Comment by Kay Kim (Inactive) [ 12/Mar/14 ] | |
|
Hi Luke – instead of the the SQL to MongoDB page. Sorry for the confusion. Also, in the mongo shell, we do have a distinct() method (http://docs.mongodb.org/manual/reference/method/db.collection.distinct) which returns an array of distinct values, so you could also do:
Regards | |
| Comment by Luke Thompson [ 11/Mar/14 ] | |
|
Was this example removed? I was looking for it here: http://docs.mongodb.org/master/reference/sql-comparison/ I was looking for a better way of doing this: Which I'm always implementing like this: Ideally the shell would support this: | |
| Comment by auto [ 12/Dec/12 ] | |
|
Author: {u'date': u'2012-12-12T21:56:03Z', u'email': u'samk@10gen.com', u'name': u'Sam Kleinman'}Message: merge: | |
| Comment by auto [ 12/Dec/12 ] | |
|
Author: {u'date': u'2012-12-12T17:44:42Z', u'email': u'kay.kim@10gen.com', u'name': u'kay'}Message: |