Link to home
Start Free TrialLog in
Avatar of emi_sastra
emi_sastra

asked on

Query Data using GreenDao

Hi All,

I have a SQL Query below:

SELECT
*
FROM TMPRICELIST A
INNER JOIN
(
SELECT
BarangCode
, MAX(PriceDate) AS MaxPriceDate
from TMPRICELIST
GROUP BY BarangCode
) B

ON A.BarangCode = B.BarangCode
AND A.PriceDate = B.MaxPriceDate

How could I query it using GreenDao using Java ?

Thank you.
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

greenDAO is open source and is supported by its developers and its community.
So it would seem that should be your first stop for a solution

I must say that if it's not obvious how to do it, or even if you can, the API is already working against you. That's a standard problem with ORM APIs
Avatar of emi_sastra
emi_sastra

ASKER

Hi CEHJ,

What should I do ?

Thank you.
Ask the developers. You could probably have already done it by now with raw SQL

Please close duplicate https://www.experts-exchange.com/questions/29043855/Query-OData-Using-Java-Android.html
- Please close duplicate https://www.experts-exchange.com/questions/29043855/Query-OData-Using-Java-Android.html

I think this is not duplicate, query direct from Odata is different via ORM, am I right ?

Thank you.
-      greenDAO is open source and is supported by its developers and its community.
So it would seem that should be your first stop for a solution

I hope I don't need to go to greenDao Forum to get solution.
I believe experts here have the solution.

Thank you.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.