straighted out sql expectations