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

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -