mod(y, x) remainder of y/x
postgres=# -- mod(y, x) remainder of y/x postgres=# select mod(9,4); mod ----- 1 (1 row) postgres=#