correct sql for querying contact leader

Sql for querying contact leader and creating new contact
is wrong. Correct it.