- update sql to get nodes for parent terms