Skip to content
Advertisement

I want to sum the lengths when PROPRIETAI = ‘PRIVE’ in the same line

resultat of the code

I want to sum the lengths when PROPRIETAI = ‘PRIVE’ in the same line with sql and this is my code :

and I want this table resultat

table result

I try to make some changes but it’s not working

Advertisement

Answer

Replace all values of type_struc with NULL when proprietai = 'PRIVE'

That will ensure you only ever get one ‘PRIVE’ output row, and so all the lengths will be aggregated.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement