Bitrix24. Activities+Owners

See the unique owner of the Activit—É (the name of a particular lead, contact or deal). Analyze Activities by type of membership in leads, deals or contacts. Build overlay graphics for each type of Activities.
Click "Show SQL after loading" If you want to see SQL editor. See the details here (3)
Select "Next".