Updated query for analysis