• thank you, that's pretty clever. I was close, but probably would not have gotten the answer on my own. and I'm actually working in oracle on this specific query, but this is the only forum I am a member of. so I had to do minor tweaks to your solution, but it is exactly what I was looking for. thanks!