grouping views, using deficient sqlite database