DB Docs
API Reference
- Core API Reference
- Collection
- createCollection
- liveQueryCollectionOptions
- createLiveQueryCollection
- createOptimisticAction
- createTransaction
- Electric DB Collection
- electricCollectionOptions
- Query DB Collection
- queryCollectionOptions
- RxDB DB Collection
- rxdbCollectionOptions
- PowerSync Collection
- powerSyncCollectionOptions
- createIndexedDB
- indexedDBCollectionOptions
- React Hooks
- useLiveQuery
AI/LLM: This documentation page is available in plain markdown format at/db/latest/docs/reference/functions/subtract.md
subtract
ts
function subtract<T1, T2>(left, right): WithAggregate<BinaryNumericReturnType, [T1, T2]>;Defined in: packages/db/src/query/builder/functions.ts:538
Type Parameters#
T1#
T1 extends ExpressionLike
T2#
T2 extends ExpressionLike
Parameters#
left#
T1
right#
T2
Returns#
WithAggregate<BinaryNumericReturnType, [T1, T2]>