Hi Team,
I need help in writing below aggregate query. Use co.elastic.clients.elasticsearch.core.SearchRequest co.elastic.clients.elasticsearch._types.query_dsl.Query. I want to convert below sql query to elastic query.
SELECT
group AS SummaryGroup,
COUNT(*) AS NoteCount,
SUM(AmountParticipation) AS Invested,
SUM(PrincipalBalance) AS OutstandingPrincipal,
SUM(PrincipalRepaid) AS PrincipalRepaid,
SUM(InterestPaid) AS InterestPaid
FROM mytable
WHERE
IsSold = 1 AND LenderID = 4477943
GROUP BY group
ORDER BY group desc
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.