sql functions example