Any example where from could be used with update query.
update albums
set num = jsonb_set(num, '{folders}', to_jsonb(coalesce(sq.counts, 0)), false)
from (select s.album_id, COUNT(s.album_id) as counts
from file_system s
where is_dir = true
group by s.album_id
order by s.album_id) as sq
where albums.id = sq.album_id;
Any example where
from
could be used withupdate
query.