Subtree query: range query on [tin[v], tout[v]]. Works for sum, min, max, XOR, GCD. Path query (root to ): prefix query to tin[v] if using add/subtract trick.
For general paths, you need more tools. Ancestor check: is ancestor of if tin[u] <= tin[v] and tout[v] <= tout[u]. This is .
For path queries between arbitrary nodes, combine Euler tour with LCA to split the path into two root-to-node paths.