Example #1
0
def export_intervals(query, date_entity, interval, fmt):
    return nest_count_keys(count_groups(query, func.to_char(func.date_trunc(interval, date_entity), fmt)))
Example #2
0
def export_intervals(query, date_entity, interval, fmt):
    return nest_count_keys(
        count_groups(query,
                     func.to_char(func.date_trunc(interval, date_entity),
                                  fmt)))