我有表:
env | app | prop_file | prop | value
qa1 e a a testa
qa1 g b a testa
qa1 s c a testb
qa2 s a b testc
qa2 s d b testc
qa3 a a b testc
qa4 z g c testb
qa4 x a c testb
我需要以下结果:
env | prop_file | prop | value
qa1 a a testa
qa1 c a testb
我将尝试总结一下,我只需要给定“prop”的“值”在特定“env”中不匹配的结果。如果“prop_file”或其他列不匹配,那么没关系。同样在结果中,我需要不匹配列的道具文件。实际上,我也可以接受以下结果:
env | prop_file | prop | value
qa1 a a testa
qa1 b a testa
qa1 c a testb
我尝试了一堆连接、组和计数,但似乎无法确定正确的语法!快把我逼疯了。如果需要,我可以在我的源表中提供更多示例。