starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

Use qualify row_number() ... not support select *

Open wmtbnbo opened this issue 1 year ago • 2 comments

When I execute the following SQL statement.

select a.* from tablea a qualify row_number() over (partition by a.id order by a.date desc) = 1;

I will receive an exception message.

ERROR 1064 (HY000): Getting syntax error. Detail message: Can't support result other than column..

Adjust the statement to select a.id,a.name from tablea a qualify row_number() over (partition by a.id order by a.date desc) = 1;

The statement can run normally.

wmtbnbo avatar Oct 10 '24 06:10 wmtbnbo

good enhancement

wangsimo0 avatar Oct 10 '24 12:10 wangsimo0

Hi, I'd like to try it. Could you please assign this to me? Thanks! @wangsimo0

gjjjj0101 avatar Dec 25 '24 13:12 gjjjj0101

We have marked this issue as stale because it has been inactive for 6 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to StarRocks!

github-actions[bot] avatar Jun 30 '25 11:06 github-actions[bot]