remove dangling AND in SQL statement

@tanghus @DeepDiver1975 @bartv2 @icewind1991 @MTGap one liner, please :+1: and merge