Django increment Then value in Annotate Count -


let's have query set a.

a.annotate(c=count(case(when(name='jack',then=i) 

now, each time a.name == 'jack', c set i. how can increment each time happens? first case, i = 1, 2nd i=2 etc.


Comments

Popular posts from this blog

service - Android MediaPlayer calls onCompletion before it already finished -

javascript - Training Neural Network to play flappy bird with genetic algorithm - Why can't it learn? -

javascript - Create a stacked percentage column -