Re: [appengine-java] Need help in writing a query
Hie Sorry for providing incomplete info. The complete entity is: Distt, City, Area, emp-name And the where clause is where distt == some dist so result should come like Hydarea1 5 hydarea2 20 Mum area3 5 Calarea5 8 Calarea6 9 So what is the solution in this case? Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com On Sun, Jun 13, 2010 at 9:26 AM, aswath satrasala aswath.satras...@gmail.com wrote: Hi, I guess, this may not turn out to be correct always. If it is done in a transaction and both of the entities are in the same entity group, then this will work. -Aswath On Sat, Jun 12, 2010 at 8:24 PM, RAVINDER MAAN rsmaan...@gmail.comwrote: Instead of getting these values with query best option is to store this values when you add new employee.So create one more dataset with fields city, area and employeecount.whenever you add new employee update the count .then you can get the count with simple query select employeecount from newdataset where city==city area==area On Sat, Jun 12, 2010 at 8:05 PM, Vik vik@gmail.com wrote: Hie I have following data set: City, Area emp-name and have to write a query which shows number of employees by city and area. So data should display like: Delhirohini 5 Delhinehru10 Hyd madhapur 6 Hyd hitech 24 Cheanni park 20 So what the query should be? Please advise Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Regards, Ravinder Singh Maan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Need help in writing a query
Hie I have following data set: City, Area emp-name and have to write a query which shows number of employees by city and area. So data should display like: Delhirohini 5 Delhinehru10 Hyd madhapur 6 Hyd hitech 24 Cheanni park 20 So what the query should be? Please advise Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Need help in writing a query
Instead of getting these values with query best option is to store this values when you add new employee.So create one more dataset with fields city, area and employeecount.whenever you add new employee update the count .then you can get the count with simple query select employeecount from newdataset where city==city area==area On Sat, Jun 12, 2010 at 8:05 PM, Vik vik@gmail.com wrote: Hie I have following data set: City, Area emp-name and have to write a query which shows number of employees by city and area. So data should display like: Delhirohini 5 Delhinehru10 Hyd madhapur 6 Hyd hitech 24 Cheanni park 20 So what the query should be? Please advise Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Regards, Ravinder Singh Maan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Need help in writing a query
or you can use select count(this) from entityname where city==city area==area On Sat, Jun 12, 2010 at 8:24 PM, RAVINDER MAAN rsmaan...@gmail.com wrote: Instead of getting these values with query best option is to store this values when you add new employee.So create one more dataset with fields city, area and employeecount.whenever you add new employee update the count .then you can get the count with simple query select employeecount from newdataset where city==city area==area On Sat, Jun 12, 2010 at 8:05 PM, Vik vik@gmail.com wrote: Hie I have following data set: City, Area emp-name and have to write a query which shows number of employees by city and area. So data should display like: Delhirohini 5 Delhinehru10 Hyd madhapur 6 Hyd hitech 24 Cheanni park 20 So what the query should be? Please advise Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Regards, Ravinder Singh Maan -- Regards, Ravinder Singh Maan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Need help in writing a query
Hi, I guess, this may not turn out to be correct always. If it is done in a transaction and both of the entities are in the same entity group, then this will work. -Aswath On Sat, Jun 12, 2010 at 8:24 PM, RAVINDER MAAN rsmaan...@gmail.com wrote: Instead of getting these values with query best option is to store this values when you add new employee.So create one more dataset with fields city, area and employeecount.whenever you add new employee update the count .then you can get the count with simple query select employeecount from newdataset where city==city area==area On Sat, Jun 12, 2010 at 8:05 PM, Vik vik@gmail.com wrote: Hie I have following data set: City, Area emp-name and have to write a query which shows number of employees by city and area. So data should display like: Delhirohini 5 Delhinehru10 Hyd madhapur 6 Hyd hitech 24 Cheanni park 20 So what the query should be? Please advise Thankx and Regards Vik Founder www.sakshum.com www.sakshum.blogspot.com -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- Regards, Ravinder Singh Maan -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.comgoogle-appengine-java%2bunsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.