众所周知,HQL不是SQL,将使用JAVA执行,所以我有2个关于以下HQL的视图,有人可以告诉我哪一个是正确的吗?
c
内的内容最初将被执行,然后其结果将存储在某处,并在调用c
时重复使用;
c
只是from
内HQL的简称,每次调用c
时都会执行。
HQL:
from(
select
b.un_connect_id,
b.imp_list_no
from
(select a.*,
row_number() over(partition by list_no order by op_day desc, imp_list_no desc, un_connect_id desc) rno
from sssss a
) b
where b.rno = 1
) c
insert overwrite table yyyyyyyyy partition(tmp = 'TMP',channel,business)
select c.un_connect_id,
c.business
insert overwrite table xxxxxx
select c.list_no,
c.customer_no,
c.party_no,
'${nominal_format_date}' as op_day