How to execute custom query?

I want to execute a custom query in my postgresql database. I analyse in internet but i don’t got a result. if anyone know about this context. please reply and guide me for solve this problem.

@mariappan can you please post custom query here or provide some additional info?

Perhaps you can use a view and pass filters= ?