Ensure that expansion does not produce duplicate metric paths
Created by: davecromberge
I could not use a 'reduce' in the form of
foldl(fun sets:union/2, H, T) in case the list is empty.
Also, I think that we should discuss a testing strategy here - would be nice to use meck to mock the postgres result for this case. It would also be nice to test the raw sql instead of parsing the SQL for valid sql - does this sound like a good idea?