Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Product: add a location_count, user_count & proof_count #445

Closed
raphodn opened this issue Sep 13, 2024 · 0 comments · Fixed by #489, #490, #491 or #492
Closed

Product: add a location_count, user_count & proof_count #445

raphodn opened this issue Sep 13, 2024 · 0 comments · Fixed by #489, #490, #491 or #492

Comments

@raphodn
Copy link
Member

raphodn commented Sep 13, 2024

Story

similar to #419

Queries

Location count

// product id
Price.objects.filter(product_id=product.id).values_list("location_id", flat=True).distinct().count()
// product category
Price.objects.filter(category_tag=category_tag).values_list("location_id", flat=True).distinct().count()

User count

// product id
Price.objects.filter(product_id=product.id).values_list("owner", flat=True).distinct().count()

Proof count

// product id
Price.objects.filter(product_id=product.id).values_list("proof_id", flat=True).distinct().count()
@raphodn raphodn changed the title Product : add a location_count, user_count & proof_count Product: add a location_count, user_count & proof_count Oct 2, 2024
@raphodn raphodn linked a pull request Oct 2, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from Backlog to Done in 💸 Open Prices Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment