SELECT t.folder, s.updated_at, s.balance, s.equity FROM states s JOIN terminals t ON t.id = s.terminal_id;