Okay thank you, so it is better to select one of each combination in one query then count how many of each combination in another query?
Regards, Cheyenne O. Forbes Chief Executive Officer Avapno Omnitech, Limited Chief Operating Officer Avapno Solutions Co. Limited Chief Technology Officer ZirconOne Corperation Chairman Avapno Assets, LLC Bethel Town P.O Westmoreland Jamaica Email: cheyenne.osanu.for...@gmail.com Mobile: +1 (876) 881-7889 <876-881-7889> Landline: +1 (876) 957-1821 skype: cheyenne.forbes1 On Wed, Apr 12, 2017 at 11:27 AM, James Taylor <jamestay...@apache.org> wrote: > The non standard @ syntax is not supported by Phoenix: (@rn:= if((@item = > t.item_id) AND (@type = t.type),@rn + 1, > if((@item:=t.item_id) AND (@type:=t.type),1,1) > > Also, I'd recommend breaking that query up into multiple queries to > pinpoint any other non supported constructs. > > On Wed, Apr 12, 2017 at 6:49 AM Cheyenne Forbes < > cheyenne.osanu.for...@gmail.com> wrote: > >> I was using this (http://rextester.com/VXZONO82847) in MySQL but I am >> not able to use it in Phoenix. Basically what the query does is "select >> only one row where a column combination (type and item_id) is common and >> count how many more of the combination exists". It allows me to add the >> following feature to my notifications system "John Brown and 5 others like >> your post" >> >> Can anyone answer any of these? >> >> 1. Why doesn't it work in Phoenix? >> 2. How can I get that query to work? >> >> Regards, >> >> Cheyenne >> >