Implement simple column derivation from nested queries