Updated details query