Invalid query: Unknown column 'flow' in 'where clause'