Update namespace statistics for the period identified by
        offset

def add_namespace_statistics(self, namespace, offset, data_points,
                                 byte_count):
        """Update namespace statistics for the period identified by
        offset"""
        query = 'UPDATE gauged_statistics ' \
            'SET data_points = data_points + %s,' \
            'byte_count = byte_count + %s WHERE namespace = %s ' \
            'AND "offset" = %s; INSERT INTO gauged_statistics ' \
            'SELECT %s, %s, %s, %s WHERE NOT EXISTS (' \
            'SELECT 1 FROM gauged_statistics WHERE namespace = %s' \
            'AND "offset" = %s)'
        self.cursor.execute(query, (data_points, byte_count, namespace,
                                    offset, namespace, offset, data_points,
                                    byte_count, namespace, offset))