On the Completeness of Query Languages for Grouped and Ungrouped Historical Data Models