Try adding endts to the group by.
i.e.
GROUP BY 1,2,3, endts;
Attachments
Library
Quick Reference
Archives
Sample Index
2012 Indexes