query laws