def rowsBeforeItem(self, item, count):
        currentSortAttribute = self.currentSortColumn.sortAttribute()
        value = currentSortAttribute.__get__(item, type(item))
        firstQuery = self.inequalityQuery(
            AND(currentSortAttribute == value,
                self.itemType.storeID < item.storeID),
            count, False)
        results = self.constructRows(firstQuery)
        count -= len(results)
        if count:
            secondQuery = self.inequalityQuery(currentSortAttribute < value,
                                               count, False)
            results.extend(self.constructRows(secondQuery))
        return results[::-1]