Sometimes we need to summarize the data in the table, instead of the data itself. To facilitate these types of retrieval, SQL provides five Aggregate functions, SQL Aggregate functions are quite consistent in all major SQL implementations. As follows: the AVG () function of 1.1AVG () calculates the sum of its column values by counting the number of rows in the table, and obtains the average value of the column AVG (
Sometimes we need to summarize the data in the table, instead of the data itself. To facilitate these types of retrieval, SQL provides five Aggregate functions, SQL Aggregate functions are quite consistent in all major SQL implementations. As follows: the AVG () function of 1.1 AVG () calculates the sum of its column values by counting the number of rows in the table, and obtains the average value of the column // AVG (
Sometimes we need to summarize the data in the table, the Hong Kong server, without the data itself, the Hong Kong virtual host, in order to facilitate these types of retrieval, the virtual host, SQL provides five Aggregate functions, SQL Aggregate functions are quite consistent in all major SQL implementations. As follows:
1.1 AVG () function
AVG () calculates the average value of a column by counting the number of rows in the table and calculating the sum of its column values.
// AVG () Example: select avg (prod_price) AS avg_priceFROM Products;