Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a interesting Problem,..
ID | Value |
23 | 00:02:00 |
23 | 00:02:00 |
24 | 00:04:30 |
i have this table and i want for der result of the value 00:06:30 because the ID 23 is double and than distinct of the ID is 1.
00:02:00 and 00:04:30 is 00:06:30. But i have problems with the if clause. I tried the folling expression :
if(count(ID) = count(distinct ID),Value) as NewValue
but it not work with sum because of the if clause that i can sum all values..also i tried to put it in the script but "invalid expression"
Hi,
are You talking about loading data from source?
If I understand well you want to sum up all the same ID's?
Yo can use straight table after loading data =sum(DISTINCT Value)
Hi,
In the script you can create a resident load there add the prefix Distinct on field name.
So it creates unique record for ID and value. Alias the value as DistValue and use sum function on DistValue.
Regards,
Srini.
Hi,
Try expression like this : INTERVAL(SUM(DISTINCT Value),'h:mm:ss')
Let me know if this help you.
Regards,
Sokkorn