Skip to content

Instantly share code, notes, and snippets.

@JorgeMichelena
Created September 19, 2022 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JorgeMichelena/e89296779efab860c3673d34cf8619e4 to your computer and use it in GitHub Desktop.
Save JorgeMichelena/e89296779efab860c3673d34cf8619e4 to your computer and use it in GitHub Desktop.
from django.db.models import Max, Avg
query = Target.objects.aggregate(difference=Max("radius_in_mts") - Avg("radius_in_mts"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment