This is wrong:
WITH DISTINCT channel.name AS channelName, channel.date AS date,
programDiscoveryByDevice.device AS device, discoveryByDevice.count AS
count, sum(discoveryByDevice.count) AS *total*
*you can't do distinct on an aggregated row*
*and if you return the individual *discoveryByDevice.co
Hi,
In the following query I'm getting the correct result for device and count
but for *total* I'm getting the sum of duplicate relations also, but I want
to avoid the sum of duplicates, I only want the sum of unique relations.
Please help me to correct the query.
MATCH
(genre:Genre)-[:HAS_CHANNEL