add distinct option to sqlite backend