Table "count.sample"

testdb=# \d sample
               Table "count.sample"
 Column |  Type   | Collation | Nullable | Default 
--------+---------+-----------+----------+---------
 id     | integer |           |          | 
 name   | text    |           |          | 
 age    | integer |           |          | 
testdb=# SELECT * FROM sample;
 id | name | age 
----+------+-----
  1 | 佐藤 |  20
  2 | 鈴木 |  30
  3 | 渡辺 |  25
    |      |    
testdb=# SELECT sum(age) FROM sample;
 sum 
-----
  75
(1 row)

いいなと思ったら応援しよう!