'Returns the top discount codes used.
QuerySet = [
\'coupon__percentage_discount\': 22,
\'coupon__code\': \'12\',
\'coupon__used_count\': \'2\','

@classmethod
def get_top_discount_codes_used(cls, course_id):

    return cls.objects.filter(order__status='purchased', coupon__course_id=course_id).values('coupon__code', 'coupon__percentage_discount').annotate(coupon__used_count=Count('coupon__code')).order_by('-coupon__used_count')
