Michael, Please help me with the solution off the error. -Sukaant Chaudhary <http://in.linkedin.com/pub/sukaant-chaudhary/33/ba8/479>
On Fri, Mar 6, 2015 at 7:58 PM, Michael Hunger < [email protected]> wrote: > something like > > reduce(min = 1000, x in [genderReach, ageGroupReach,dayPartReach] | case x > < min then x else min end) as minimum > > > > > Am 06.03.2015 um 09:19 schrieb Sukaant Chaudhary < > [email protected]>: > > > > Michael, > > I've the following query and I want the minimum by comparing the columns > > > > Query: > > MATCH > (genre:Genre)-[:HAS_CHANNEL]->(channel:Channel)-[:HAS_PROGRAM]->(program:Program)-[:HAS_SUBSCRIBER_JOINED]->(subscriber:Subscriber), > (totalViewTime:TotalViewTime), > > > (subscriber)-[genderRelation:HAS_PROGRAM_GENDER]->(gender:Gender)-[relationGenderTotalViewTime:HAS_PROGRAM_TOTAL_VIEW_TIME]->(totalViewTime), > > > (subscriber)-[ageGroupRelation:HAS_PROGRAM_AGE_GROUP]->(ageGroup:AgeGroup)-[relationAgeGroupTotalViewTime:HAS_PROGRAM_TOTAL_VIEW_TIME]->(totalViewTime), > > > (subscriber)-[dayPartRelation:HAS_PROGRAM_DAY_PART]->(dayPart:DayPart)-[relationDayPartTotalViewTime:HAS_PROGRAM_TOTAL_VIEW_TIME]->(totalViewTime) > > WHERE channel.name IN ["hollywood on", "chowtime on"] > > AND (channel.date >= "2014-02-02" AND channel.date <= "2015-02-02") > > AND program.programId=relationGenderTotalViewTime.programId > > AND program.programId=relationAgeGroupTotalViewTime.programId > > AND program.programId=relationDayPartTotalViewTime.programId > > RETURN DISTINCT relationGenderTotalViewTime.date AS genderDate, > relationAgeGroupTotalViewTime.date AS ageGroupDate, > relationDayPartTotalViewTime.date AS dayPartDate, program.duration AS > programDuration, totalViewTime.duration AS viewDuration, channel.serviceId > AS serviceId, relationGenderTotalViewTime.reach AS genderReach, > relationAgeGroupTotalViewTime.reach AS ageGroupReach, > relationDayPartTotalViewTime.reach AS dayPartReach > > > > Output: > > Here I want to combine the output as reach genderReach, ageGroupReach, > dayPartReach > > > > genderReach | ageGroupReach | dayPartReach | reach > > 1 | 2 | 1 | 1 > > 1 | 2 | 2 | 1 > > 2 | 1 | 1 | 1 > > 1 | 1 | 1 | 1 > > > > with the same single date as date which matches all (genderDate, > ageGroupDate, dayPartDate) > > Also suggest if some of the relations declared above can be minimised as > HAS_PROGRAM_TOTAL_VIEW_TIME is repeated again and again, if possible I want > to minimise that as well. > > > > > > -Sukaant Chaudhary > > <image004.png> > > > > On Fri, Mar 6, 2015 at 12:33 PM, Michael Hunger < > [email protected]> wrote: > > I don't unterstand your question. > > > > > >> Am 06.03.2015 um 05:26 schrieb Sukaant Chaudhary < > [email protected]>: > >> > >> Anyone having any idea, please help me!! > >> > >> -Sukaant Chaudhary > >> <image004.png> > >> > >> On Thu, Mar 5, 2015 at 3:41 PM, Sukaant Chaudhary < > [email protected]> wrote: > >> Hi, > >> I want to use object of relation for multiple relations, how to do that > in the highlighted line below: > >> > >> MATCH > (genre:Genre)-[:HAS_CHANNEL]->(channel:Channel)-[:HAS_PROGRAM]->(program:Program)-[:HAS_SUBSCRIBER_JOINED]->(subscriber:Subscriber), > (totalViewTime:TotalViewTime), > >> > >> > (subscriber)-[genderRelation:HAS_PROGRAM_GENDER]->(gender:Gender)-[relationTotalViewTime:HAS_PROGRAM_TOTAL_VIEW_TIME]->(totalViewTime), > >> > >> > (subscriber)-[ageGroupRelation:HAS_PROGRAM_AGE_GROUP]->(ageGroup:AgeGroup)-[relationTotalViewTime]->(totalViewTime) > >> > >> WHERE channel.name IN ["hollywood on", "chowtime on"] > >> AND (channel.date >= "2014-02-02" AND channel.date <= "2015-02-02") > >> AND program.programId=relationGenderTotalViewTime.programId > >> RETURN DISTINCT relationTotalViewTime.date AS date, program.duration AS > programDuration, totalViewTime.duration AS viewDuration, channel.serviceId > AS serviceId, relationTotalViewTime.reach AS reach > >> ORDER BY date; > >> > >> > >> Please help !! > >> > >> -Sukaant Chaudhary > >> <image004.png> > >> > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups "Neo4j" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > >> For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "Neo4j" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > For more options, visit https://groups.google.com/d/optout. > > > > > > -- > > You received this message because you are subscribed to the Google > Groups "Neo4j" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Neo4j" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Neo4j" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
