optimasi inner join subquery sql