ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolai Tikhonov <ntikho...@apache.org>
Subject Re: Affinity
Date Tue, 03 Jan 2017 07:28:20 GMT
Hi Anil,
It seems that it will not work correctly but I'm not sure 100%. Let's ask
guru SQL.

Could you please look at the following query? (We have two simple table:
Person and PersonDetail collocated by p.equivalentId)

SELECT p.name as name, dupPerson.dupCount as count, pd.startDate as sdt,
pd.endDate as edt  from PERSON_CACHE.PERSON p
JOIN (select equivalentId, count(*) dupCount from PERSON_CACHE.PERSON group
by equivalentId ) dupPerson on p.equivalentId = dupPerson.equivalentId //
to get the number of persons with same equivalent Idjoin
DETAILS_CACHE.PersonDetail pd on p.equivalentId = pd.equivalentId
JOIN (select equivalentId, max(enddate) as enddate from
DETAILS_CACHE.PersonDetail  group by equivalentId) maxPd on p.equivalentId
= maxPd.equivalentId and maxPd.endDate = pd.endDate
WHERE p.personId = '100'"

On Mon, Jan 2, 2017 at 4:06 PM, Anil <anilklce@gmail.com> wrote:

> Hi,
> I did not use group by query to determine the duplicate count or latest
> details as sub query. i used it as join.
> if group by query works in ignite , my join query also should work.
> I am not sure if IGNITE-3860 relates to my query. Correct me if I am
> wrong.
> Thanks.

View raw message