I think this should do it, I adapted from
this StackOverflow answer. You may need to switch the table name based on whether or not your logs are unicode (BPASessionLog_NonUnicode vs BPASessionLog_Unicode). You can also join with the BPASession and BPAProcess tables if you would like the process name as well.
Select
sessionnumber,
Sum(
IsNull(DataLength(sessionnumber), 1)
+ IsNull(DataLength(seqnum), 1)
+ IsNull(DataLength(stageid), 1)
+ IsNull(DataLength(stagename), 1)
+ IsNull(DataLength(stagetype), 1)
+ IsNull(DataLength(processname), 1)
+ IsNull(DataLength(pagename), 1)
+ IsNull(DataLength(objectname), 1)
+ IsNull(DataLength(actionname), 1)
+ IsNull(DataLength(result), 1)
+ IsNull(DataLength(resulttype), 1)
+ IsNull(DataLength(startdatetime), 1)
+ IsNull(DataLength(enddatetime), 1)
+ IsNull(DataLength(attributexml), 1)
+ IsNull(DataLength(automateworkingset), 1)
+ IsNull(DataLength(targetappname), 1)
+ IsNull(DataLength(targetappworkingset), 1)
) session_log_size
From
BPASessionLog_NonUnicode
Group By
sessionnumber
------------------------------
Nicholas Zejdlik
RPA Developer
------------------------------