Skip to content

开窗函数问题 #2209

@JaydenZuo111

Description

@JaydenZuo111

问题描述及重现代码:数据库分表后,跨表使用开窗函数按日期排序,每张表的第一个日期为1,不能顺序排序

// c# code
await fsql.Context.Postgresql.Queryable<formname>()
            .Where(a => a.Date > DateTime.Parse("2023-12-1")
            .ToListAsync(a => new {
                a.Name,
                a.Date,
                ToRank = SqlExt.RowNumber().Over().OrderByDescending(a.Date).ToValue()
            });

数据库版本

pgsql 18.0

安装的Nuget包

Freesql.provider.Postgresql 3.5.306

.net framework/. net core? 及具体版本

.net core, .net9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions