from typing import Any, Optional

from django.db.models.expressions import Func
from django.db.models.query_utils import Q

class Aggregate(Func):
    name: Any = ...
    filter_template: str = ...
    window_compatible: bool = ...
    filter: Any = ...
    def __init__(self, *args: Any, filter: Optional[Any] = ..., **kwargs: Any) -> None: ...

class Avg(Aggregate): ...

class Count(Aggregate):
    template: str = ...
    def __init__(self, expression: str, distinct: bool = ..., filter: Optional[Q] = ..., **extra: Any) -> None: ...

class Max(Aggregate): ...
class Min(Aggregate): ...
class StdDev(Aggregate): ...
class Sum(Aggregate): ...
class Variance(Aggregate): ...
