Monday, December 2, 2019

Re: How to write raw SQL or ORM for Count

What you want to hear please cear that one..

Thanks 

On Mon, 2 Dec 2019, 19:13 xiaopeng luo, <xpluo.sim@gmail.com> wrote:
I am new to django ORM, I want query something like this:

input:
AAA    female    1
AAA    female    2
BBB    male       1
BBB    male       3
AAA    male       2



output
AAA    female    3
AAA    male       2
BBB    male       4


Sorry, my english is not good. Thanks for everyone help me.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a297dc1f-6821-4bba-b04c-e8ce271b5a8d%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BAqMUewuq-ugJTBZ-%2BfFrWT8hvNN%3D3-g7V7W3Tzj2iLV3mf7A%40mail.gmail.com.

No comments:

Post a Comment