Take a look at okm_node_base table you will see a column named nbs_context, you have two option set NBS_CONTEXT='okm_root' ( that means only okm_root or childs) or NBS_CONTEXT <> 'okm_trash' ( that means all except trash or childs)
Moderator: dedisoft