please help me to optimise this sql query, it taks long time to return result.

Printable View