AVG

AVGで平均を求めることが出来る。

https://www.postgresql.jp/docs/9.4/functions-aggregate.html

postgresdb1=# SELECT * FROM products;
 id |    name    | price  |  tax  | quantity | discount
----+------------+--------+-------+----------+----------
  1 | ペン       | 100.00 | 10.00 |       50 |     5.00
  2 | ノート     | 200.00 | 10.00 |       10 |     3.00
  3 | ペンケース | 250.00 | 10.00 |       10 |     3.00
  3 | 消しゴム   |  50.00 | 10.00 |        5 |     8.00
(4 行)

postgresdb1=# SELECT AVG(price) FROM products;
         avg          
----------------------
 150.0000000000000000
(1 行)

postgresdb1=#

平均価格を出した。