0

Spec : Jdk 1.7,Mongodb 3.0.12,Win-10

I have gone thru all of the Mongo's docs : http://mongodb.github.io/mongo-java-driver/3.4/driver/tutorials/

I have done some samples suggested by Professionals on Filter & projections.

Question I am still not able to achieve the following equivalence of an SQL query in MongoDB's NO-SQL

"Select cola, colb, colc, cold  from Table web-services where cola='1000' and colb='DAO' and group by colc order by colb DEC"

I need a simple example in Mongodb 3.x API to have Filters with Projections for the values passed to keys in the SQL query above.

Please share if any body have thoughts

with regards Karthik

Community
  • 1
  • 1
N.S.Karthik
  • 485
  • 13
  • 29
  • 1
    You could not have looked very thoroughly. The basic search phrase of ["MongoDB Join Tables"](https://www.google.com/search?q=mongodb+join+tables) Points you directly to the relevant documentation. And then linked answers on this very site shortly afterwards. – Neil Lunn Jul 27 '17 at 04:10
  • The [SQL to Aggregation Mapping Chart](https://docs.mongodb.com/manual/reference/sql-aggregation-comparison/) in the MongoDB documentation should be a helpful reference for rough query equivalence. You will have translate into the appropriate syntax for your driver. There's an [Aggregation tutorial](http://mongodb.github.io/mongo-java-driver/3.4/driver/tutorials/aggregation/) in the Java driver tutorials which you mention in your question, so try that code as a starting point. – Stennie Jul 27 '17 at 04:17

0 Answers0