more SQL simplication
yet more SQL simplication