0

I have (24.1.4.20) view in clickhouse and want change order by columns inside over() of row_number().

create or replace view data.v1 as
select row_number() over(order by COLUMNS({p_order_by:String})) as rn,
       ...

Is it possible to use something like this?

select *
from   data.v1(p_order_by = 'col1,col2,col3...')

1 Answer 1

1

According to https://clickhouse.com/docs/en/sql-reference/statements/select#dynamic-column-selection

{p_order_by:String} is regexp so you could try to use col1|col2|col3

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.