Using alias in tx look up sql query