Returns avg value of columns for rows matching the given criteria (applied with `filter` and `exclude` if set before). :return: avg value of columns :rtype: Union[int, float, list]
(self, columns: Union[str, list[str]])
| 860 | return await self._query_aggr_function(func_name="sum", columns=columns) |
| 861 | |
| 862 | async def avg(self, columns: Union[str, list[str]]) -> Any: |
| 863 | """ |
| 864 | Returns avg value of columns for rows matching the given criteria |
| 865 | (applied with `filter` and `exclude` if set before). |
| 866 | |
| 867 | :return: avg value of columns |
| 868 | :rtype: Union[int, float, list] |
| 869 | """ |
| 870 | if not isinstance(columns, list): |
| 871 | columns = [columns] |
| 872 | return await self._query_aggr_function(func_name="avg", columns=columns) |
| 873 | |
| 874 | async def update(self, each: bool = False, **kwargs: Any) -> int: |
| 875 | """ |