MCPcopy Index your code
hub / github.com/TanStack/db / avg

Function avg

packages/db/src/query/builder/functions.ts:647–649  ·  view source on GitHub ↗
(arg: T)

Source from the content-addressed store, hash-verified

645}
646
647export function avg<T extends ExpressionLike>(arg: T): AggregateReturnType<T> {
648 return new Aggregate(`avg`, [toExpression(arg)]) as AggregateReturnType<T>
649}
650
651export function sum<T extends ExpressionLike>(arg: T): AggregateReturnType<T> {
652 return new Aggregate(`sum`, [toExpression(arg)]) as AggregateReturnType<T>

Callers 9

getAggregateFunctionFunction · 0.50
group-by.test-d.tsFile · 0.50
createGroupByTestsFunction · 0.50
subqueries.test.tsFile · 0.50
select.test.tsFile · 0.50
group-by.test.tsFile · 0.50
functions.test.tsFile · 0.50

Calls 1

toExpressionFunction · 0.85

Tested by 1

createGroupByTestsFunction · 0.40