Better formatting of sessions queries