Same as analysistool but with postgresql