This is a "count()" method for querysets:

http://docs.djangoproject.com/en/dev/ref/models/querysets/#count

However, for this, it may be easiest to use raw sql within Django:

http://docs.djangoproject.com/en/dev/topics/db/sql/

-Raman


On May 13, 6:43 pm, Up2L8 <miller...@gmail.com> wrote:
> Is there a way to do something like this in django?
>
> SELEC COUNT(t1.id), COUNT(t2.id)
> FROM Test_testrun t1
> LEFT JOIN Test_testrun t2 ON t2.id = t1.id AND t2.passed=True
>
> Sorry for my newbness, I've been searching for awhile now with no
> luck.
>
> Eric

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to