SQL correction (thanks @armm77 for pointing)