Це відео не доступне.
Перепрошуємо.

How to use annotate and aggregate on Django querysets

Поділитися
Вставка
  • Опубліковано 30 січ 2023
  • Tutorial on how to use annotate and aggregate on Django querysets
    In this video we'll analyze use cases for annotate() and aggregate() functions used on django querysets in order to retrieve a summary of statistics interesting for the user
    🔥 Join the Facebook group:
    / djangoninjas 🚀
    🔥 Follow pyplane on:
    ➜ instagram: / pyplane_code
    ➜ pinterest: / pyplane
    ➜ facebook: / pyplane
    🔥 More on python and django:
    ➜ blog.pyplane.com
    #pythondjango #djangotutorial #djangoproject
    django 4, python web framework, django aggregation, django tutorial, django making queries, django annotate, django orm, django querysets, django querydict, django programming, django tutorial 2023, django development, django database, django framework tutorial, django framework python, django db model, python django web development

КОМЕНТАРІ • 26

  • @mr.h3758
    @mr.h3758 2 місяці тому

    Clear and simple, perfect !

  • @SisiraSomaratne
    @SisiraSomaratne Рік тому

    So Simple!, so Clear!
    Thank you very much!
    Two or three days reading and studying of Django documentation is finished by 15 min.

  • @oparesimon
    @oparesimon Рік тому +1

    I wish you can make a part 2 or even more tutorials on this.
    What if you want to use the aggregate and annotate with some conditions?
    Eg. 1 - Where you want to sum the 3 most minimum of each customer. assuming each customer has made at least 3 purchases.
    Eg. 2. Where you sum the purchase of each customer, excluding the purchase of a particular product or excluding the product with a specific amount.

    • @Pyplane
      @Pyplane  Рік тому

      Maybe I’ll include this topic in a Django Project tutorial which I’ll publish in the near future 😎🙌

  • @piyushgupta4714
    @piyushgupta4714 2 місяці тому

    very good tutorial

  • @oparesimon
    @oparesimon Рік тому +1

    Very good tutorial. I can confidently tell you that, for some few months now, I've been combing the whole UA-cam for such a video & I am not getting it. God bless you so much.

    • @Pyplane
      @Pyplane  Рік тому

      Thanks! 🙌 Glad you liked the video ✨

  • @sagargautam6787
    @sagargautam6787 3 місяці тому

    Thanks bro

  • @anunnaki_7
    @anunnaki_7 Рік тому +2

    Hi, this is a Greate tutorial, but I have question, in minute 10:07 you used this query "Customer.objects.filter(id=1).aggregate(Count('purcheses__amount))" to get the count of purchases for each customer.
    why did you need to specify "purcheses__amount" in the Count function to get the purchases count, why not specified just the "purchases" only, it will count the purchases for each user.
    in short, we need to count the purchases for each customer, not the purchases__amount, so is it will be more logical to put the "purchases" there not "purcheses__amount"

    • @Pyplane
      @Pyplane  Рік тому +2

      This is why you shouldn’t do copy & paste 🫣 you are 100% correct 🙌

    • @061N
      @061N Рік тому

      You are a great student.

  • @Omar00113
    @Omar00113 Рік тому

    I am currently building a dashboard for a side project with a django backend. I was planning on using raw sql queries and was procrastinating because of how ugly that would be. This tutorial is very timely. Thanks

    • @Pyplane
      @Pyplane  Рік тому +1

      Glad you liked it and good luck on the project 🙌✨

  • @damianrutkowski1161
    @damianrutkowski1161 Рік тому

    Super prosty i uzyteczny tutorial, jak zwykle. Łapka w górę zasłużona

    • @Pyplane
      @Pyplane  Рік тому +1

      Dzięki Damian! Pozdr 🙌✨

  • @tshiamomotshabi9862
    @tshiamomotshabi9862 Рік тому

    Love these types of content, very insightful.

    • @Pyplane
      @Pyplane  Рік тому

      Thank you! 🙌✨

  • @djangodeveloper2973
    @djangodeveloper2973 Рік тому

    Amazing. Thanks

  • @yogeshyts
    @yogeshyts Рік тому

    very informative video for absolute beginners

  • @developer-pf2fl
    @developer-pf2fl Рік тому

    What an amazing tutorial . Thankyou

    • @Pyplane
      @Pyplane  Рік тому +1

      Thanks for watching! 🙌

  • @HackSoft
    @HackSoft Рік тому

    Well explained ✨

    • @Pyplane
      @Pyplane  Рік тому +1

      Thank you! Glad you liked it ✨🙌

  • @ilyosbekkarshiboyev7134
    @ilyosbekkarshiboyev7134 Рік тому

    Good luck thank you