Only insert rollup stat if it exists.
Better formatting of query.