Q:

How to update column based on filter of another column? 

I'm trying to basically update a subset of rows in a table using a filter but currently my query is updating all values instead of the intended subset.   I'm not really sure what I'm missing. 
Here's what the current (non working) update looks like. 
UPDATE account_type
SET type_id = 3
FROM my_filter;

I have been able to successfully select the data I want, I just can't figure out how to get the update to work.   I am able to access the fields correctly with the following select statement. 
SELECT account_type FROM my_filter;

But when I attempt to update, it updates every field.   Here's what the (working) join I have looks like, wrapped in a CTE. 
WITH my_filter AS
(
  SELECT account_type.type_id, username
  FROM account_type
  INNER JOIN user ON user.account_id = account_type.account_id
  WHERE username LIKE 'filter%'
)

A:

You need a join condition.   I would guess:
UPDATE account_type
    SET type_id = 3
    FROM my_filter
    WHERE account_type.type_id = my_filter.type_id;

Alternative, you can write this as:
UPDATE account_type
    SET type_id = 3
    FROM user
    WHERE user.account_id = account_type.account_id AND
          user.username LIKE 'filter%';

