Skip to content

can sequelize create union all query like below? #8836

@ruiann

Description

@ruiann
select SUM(price) as "SUM(price)", type, 'a' as "sub"
from sale_record
where price between 200 and 300 and profit between 0 and 100
group by type
union all
select SUM(price) as "SUM(price)", type, 'b' as "sub"
from sale_record
where price between 300 and 400 and profit between 100 and 200
group by type
union all
select SUM(price) as "SUM(price)", type, 'c' as "sub"
from sale_record
where price between 300 and 400 and profit between 200 and 300
group by type

I've found groupedLimit property in findAll api, but no detail information for it. After looked test cases, I found it only support only one field in groupedLimit.on in test cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions