Discussion:
MongoDB Query with groupby and condition and select
(too old to reply)
d***@gmail.com
2018-12-05 17:17:49 UTC
Permalink
am new to MongoDB , could you please convert below Query into MongoDB Query

SELECT ID, country, states, state_map
FROM world
WHERE state_status = 'Y'
GROUP BY country

Each country should have multiple states.so states is a list.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/ee372821-b6a8-4ead-948d-91b1c7184c48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Robert Cochran
2018-12-06 01:07:31 UTC
Permalink
Hi!

I think you would highly benefit by taking a MongoDB University class. Any
one of the M101* series of courses will be very helpful to you. They are a
lot of fun to take and give you an excellent grasp of MongoDB.

Thanks

Bob
Post by d***@gmail.com
am new to MongoDB , could you please convert below Query into MongoDB Query
SELECT ID, country, states, state_map
FROM world
WHERE state_status = 'Y'
GROUP BY country
Each country should have multiple states.so states is a list.
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.

For other MongoDB technical support options, see: https://docs.mongodb.com/manual/support/
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+***@googlegroups.com.
To post to this group, send email to mongodb-***@googlegroups.com.
Visit this group at https://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/f2bd626f-2d16-42f8-8343-24c2d6b93fa9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...