How to use [pgsql.scalar]

The reference page of pgsql.scalar has its arguments, constraints and declaration.

Executes an arbitrary SQL statement, and returns the result as a scalar value to caller