Fixed raised total query