#[0] #[1] the query is
delete from public.note where reactions='{}'
and "renoteId" is null
and "renoteCount"=0
and "repliesCount"=0
and "replyUserId" is null
and "createdAt" <= (CURRENT_DATE - INTERVAL '90 day')
and id not in (select distinct concat("renoteId", "replyId") from public.note)
and "userHost" is not null;
just change the interval to what you want. it doesn't delete local posts and it doesn't delete anything with favorites, boosts or replies