Can you post your current SQL code to see where your starting point is? I am 90% sure I know how to get this straightened out for you, but need to see what you're working with first.
Loop1 Systems: SolarWinds Training and Professional Services
- LinkedIN: Loop1 Systems
- Facebook: Loop1 Systems
- Twitter: @Loop1Systems