[IMP] use left join in query and add grouped boolean field