What is the error?
Can I ask what is pop_stdev? Postgres has stddev_pop database function not pop_stdev.
regards,Amul