models.Tb1.objects.filter(name='seven').count()
models.Tb1.objects.filter(id__gt=1)
models.Tb1.objects.filter(id__lt=10)
models.Tb1.objects.filter(id__lt=10, id__gt=1)
models.Tb1.objects.filter(id__in=[11, 22, 33])
models.Tb1.objects.exclude(id__in=[11, 22, 33])
models.Tb1.objects.filter(name__contains="ven")
models.Tb1.objects.filter(name__icontains="ven")
models.Tb1.objects.exclude(name__icontains="ven")
models.Tb1.objects.filter(id__range=[1, 2])
startswith,istartswith, endswith, iendswith,
models.Tb1.objects.filter(name='seven').order_by('id')
models.Tb1.objects.filter(name='seven').order_by('-id')
models.Tb1.objects.all()[10:20]
from django.db.models import Count, Min, Max, Sum
models.Tb1.objects.filter(c1=1).values('id').annotate(c=Count('num'))
SELECT "app01_tb1"."id", COUNT("app01_tb1"."num") AS "c" FROM "app01_tb1"
WHERE "app01_tb1"."c1" = 1 GROUP BY "app01_tb1"."id"