Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum(Count(distinc(Serie)))


Buen dia  nuevamente solicitando su ayuda

Tengo el siguiente calculo por scrip

Count (Distinct Serie) as Cuenta_serie

y en una tabla

Sum(Cuenta_Serie)

Estoy tratando de generar el dato en el scrip pero me da error

Sum(count(distinct Serie) as Cuenta_Serie

Me podrian ayudar como debe quedar la formula para realizar un conteo y la suma de ese conteo x scrip,  Gracias

4 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Sum(count(distinct Serie)) as Cuenta_Serie


there is not the last parenthesis )

Gysbert_Wassenaar

You can't nest aggregation functions in the script. So use either sum(Serie) or count(distinct Serie). If you need the sum of the counts then you need to create a table with the counts first and then calculate the sums on that new table.


talk is cheap, supply exceeds demand
Not applicable
Author

Si que pena se me fue ese parentesis ,  pero el dato que me da es cero

Not applicable
Author

mmmm ok  Gracias