Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

sql - Remove duplicates in a Django query

from django.db.models import Count
from app.models import Email

duplicate_emails = Email.objects.values('email').annotate(email_count=Count('email')).filter(email_count__gt=1)
Source by sqlerrors.com #
 
PREVIOUS NEXT
Tagged: #sql #Remove #duplicates #Django #query
ADD COMMENT
Topic
Name
6+1 =