SELECT `p`.`id`, `c`.`added`, `c`.`mutual` FROM `sys_profiles` AS `p` INNER JOIN `sys_accounts` AS `a` ON (`a`.`id` = `p`.`account_id`) LEFT JOIN `bx_persons_data` AS `pp` ON (`pp`.`id` = `p`.`content_id` AND `p`.`type` = 'bx_persons') {join_connections}