Sort based on multiple tags

My filing structure is primarily two levels, for example: /work/customer and /family/name, but not entirely, for example /personal has no second level.
I would like to use "sort into sub-folders" using tags. I know that I can specify the first or last tag, however is there any way to specify the second or Nth tag? Also, what happens if there are less than N tags?
I would like to use "sort into sub-folders" using tags. I know that I can specify the first or last tag, however is there any way to specify the second or Nth tag? Also, what happens if there are less than N tags?