Skip to content

[Feature Request]: Support CTE statement entity collection #445

Description

@JackWang032

Topic

Enhance existing features

Description

The temporary result set created in a CTE statement can be collected.

WITH sales_data AS (
    SELECT product_id, SUM(amount) AS total_sales
    FROM orders
    WHERE order_date >= '2023-01-01'
    GROUP BY product_id
),
top_products AS (
    SELECT product_id, total_sales
    FROM sales_data
    WHERE total_sales > 10000
)
SELECT p.name, tp.total_sales
FROM top_products tp
JOIN products p ON tp.product_id = p.id
ORDER BY tp.total_sales DESC;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhance existing featureimprovementImprove existing feature

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions