Пример #1
0
class OtherCube(Space):
    date = dimension.Tree('Date', ['Year', 'Month', 'Day'], int)
    place = dimension.Tree('Place', ['Region', 'Country', 'City'], str)

    total = measure.Sum('Total')
    count = measure.Sum('Count')
    average = measure.Average('Average', 'total', 'count')
Пример #2
0
class AnotherCube(Space):
    date = dimension.Tree('Date', ['Year', 'Month'], int)
    place = dimension.Tree('Place', ['Region'], str)

    other_total = measure.Sum('Other Total')
    other_count = measure.Sum('Other Count')
    other_average = measure.Average('Average', 'other_total', 'other_count')
Пример #3
0
class VersionCube(Space):
    version = dimension.Version('Version', str)
    place = dimension.Tree('Place', ['Region', 'Country', 'City'], str)
    total = measure.Sum('Total')
    average = measure.Average('Average', 'total', 'count')
Пример #4
0
class Post(Space):
    date = dimension.Tree('Date', ['Year', 'Month', 'Day'], int)
    author = dimension.Tree('Author')
    words = measure.Sum('Number of Words')
    signs = measure.Sum('Number of Signs')
    average = measure.Average('Average', 'signs', 'words')