AggregateCommand.year(value: Expression<string>): Object

    聚合操作符。返回日期字段对应的年份。

    Object

    语法如下:

    我们使用 对 字段进行投影,获取对应的年份: