UNPKG

arlet-db

Version:

A simple database manager for Node.js

20 lines (17 loc) 545 B
[🏠 Inicio](../README.md) ## avg Method The avg method returns the average of the values in a specified column of a specified table. ### Syntax ```javascript async avg(tableName, column) ``` ### Parameters * tableName (String): The name of the table to average values from. * column (String): The name of the column to average values from. ### Returns * The average of the values in the specified column. ### Example ````javascript const averageValue = await db.avg('tableName', 'column'); console.log(averageValue); ````