Hi, On this question only I took some step deep and able to find out one part and need your help on the second half. This requires a good understanding of Django annotation and subquery features If you have this thank for reading and helping me in advance I am facing problem to filter calls on account.contact list which are realted by contact phone no with and calls phone no can any one help writing this query
On Thu, Jun 6, 2019 at 7:47 PM Devender Kumar <deven...@teknikmantra.com> wrote: > Account /Lead Model > account_name > contact m2m realtion > > contact Model > name > phone No > > calls Model > caller no # person phone no who is calling > agent no # person who is picking the call (CRM user) > status <inbound,outbound, missed> > timestamp > duration > > calls model is populated with some third party software and we are map its > caller no and agent no their is no direct relationship > > I want to get the list of accounts in particular date range with: > total no of contact it have , > how many time its contact have called > how many calls where missed inbound outbound etc > > > > > > > > > > > > > > > On Thu, Jun 6, 2019 at 4:49 PM Chetan Ganji <ganji.che...@gmail.com> > wrote: > >> Right now its an open ended question. >> >> If you post code for your models here, someone can help you. >> >> On Thu, Jun 6, 2019, 4:38 PM Devender Kumar <dev1en...@gmail.com> wrote: >> >>> Hi, >>> I am working on CRM project and stuck with REPORTING part. >>> >>> I have Accounts , Lead , contact, Calls ,Concern modules >>> account/Lead can have multiple contacts >>> contacts have multiple calls and concerns >>> calls have different status like Incoming outgoing missed call etc >>> >>> Question >>> I need to create a reporting system >>> In this I have to give a functionality like so >>> list of accounts with counts of : >>> contacts, total calls,incoming, outgoing etc >>> >>> how can list all this count for a given date ranges calls on all >>> accounts >>> >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Django users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to django-users+unsubscr...@googlegroups.com. >>> To post to this group, send email to django-users@googlegroups.com. >>> Visit this group at https://groups.google.com/group/django-users. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/django-users/1cb5c003-7cbc-4d54-ae5b-21403e543b95%40googlegroups.com >>> <https://groups.google.com/d/msgid/django-users/1cb5c003-7cbc-4d54-ae5b-21403e543b95%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> For more options, visit https://groups.google.com/d/optout. >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-users+unsubscr...@googlegroups.com. >> To post to this group, send email to django-users@googlegroups.com. >> Visit this group at https://groups.google.com/group/django-users. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-users/CAMKMUjtMaEncd6LF1J%2BmgKxA_NpL1FLFz5_UXi_JMLDD%3Du52Vw%40mail.gmail.com >> <https://groups.google.com/d/msgid/django-users/CAMKMUjtMaEncd6LF1J%2BmgKxA_NpL1FLFz5_UXi_JMLDD%3Du52Vw%40mail.gmail.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at https://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/CALmCJr7ApqHCCsm73t%3DiuvzOYwE44Vh7pcdpH2bNkb-aH015fw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-users/CALmCJr7ApqHCCsm73t%3DiuvzOYwE44Vh7pcdpH2bNkb-aH015fw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALZ%3DbEL-FcgFqpjJtN9Up0JuOJ4WtO_fVKrPBERSYWKK%2B1r_gQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.