how to use hook_views_query_alter() to modify where condition?
To add a new where clause you can use, add_where

For example : 

$query-&gt;add_where(1,'taxonomy_term_data_node.tid', $value, 'NOT IN');