Added the normalization of query definition