> > An approach to do this is: first group by each result, then order by the > descending order of the count of each result and finally retrieving the > first entry from that. >
Sorry, the approach should be as follows: First group by result, then order by the descending order of the count of each result and finally retrieving the first entry from that. On Thu, Sep 24, 2015 at 9:50 PM, Maheshakya Wijewardena <mahesha...@wso2.com > wrote: > Hi Lasantha, > > Thank you for the references. > > What I want to is something similar to the following: > > Suppose you have an input stream and there are multiple number of > processing logics. Each logic will generate a result after consuming the > events the stream. What I'm trying to do is obtaining the most frequent > outcome out of these multiple processing logics. i.e. what result has been > produced most. > > An approach to do this is: first group by each result, then order by the > descending order of the count of each result and finally retrieving the > first entry from that. > > I was wondering whether this type of task can be done with Siddhi. > > > Best regards. > > On Thu, Sep 24, 2015 at 8:34 PM, Lasantha Fernando <lasan...@wso2.com> > wrote: > >> Hi Maheshakya, >> >> Ordering of events for real-time analytics need to be done within a time >> frame or an event frame. Siddhi does have a sort window processor that can >> be used to sort events within the window itself. >> >> You can find the documentation at [1] or refer to our test cases at [2]. >> If you can describe your use case in more detail, we might be able to point >> you to some constructs in Siddhi language that would let you achieve the >> 'order by' characteristics of a standard SQL query. >> >> [1] >> https://docs.wso2.com/display/CEP400/Inbuilt+Windows#InbuiltWindows-sortsort >> [2] >> https://github.com/wso2/siddhi/blob/master/modules/siddhi-core/src/test/java/org/wso2/siddhi/core/query/window/SortWindowTestCase.java >> >> Thanks, >> Lasantha >> >> On 24 September 2015 at 18:13, Maheshakya Wijewardena < >> mahesha...@wso2.com> wrote: >> >>> Hi, >>> >>> Does SiddhiQL support "ORDER BY" statement? I couldn't find that in the >>> documentation[1]. >>> >>> Best regards, >>> >>> [1] https://docs.wso2.com/display/CEP400/SiddhiQL+Guide+3.0 >>> >>> -- >>> Pruthuvi Maheshakya Wijewardena >>> Software Engineer >>> WSO2 : http://wso2.com/ >>> Email: mahesha...@wso2.com >>> Mobile: +94711228855 >>> >>> >>> >>> _______________________________________________ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> *Lasantha Fernando* >> Senior Software Engineer - Data Technologies Team >> WSO2 Inc. http://wso2.com >> >> email: lasan...@wso2.com >> mobile: (+94) 71 5247551 >> > > > > -- > Pruthuvi Maheshakya Wijewardena > Software Engineer > WSO2 : http://wso2.com/ > Email: mahesha...@wso2.com > Mobile: +94711228855 > > > -- Pruthuvi Maheshakya Wijewardena Software Engineer WSO2 : http://wso2.com/ Email: mahesha...@wso2.com Mobile: +94711228855
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev