I am trying to create a table in Oracle as follow:
create table hops.t_distribution AS (select UID, CONTACT_EMAIL, PRODUCT_ID, rank() over(Partition by UID order by to_number(PRODUCT_ID)) as PRIORITY_ORDER from hops.staging_test);
hops.staging_test is basically the same table without the PRIORITY_ORDER column.
However, I am getting an ORA error because you can't order by in a create table statement. Is there another clever way to do this?