Skip to content

Commit

Permalink
Create orders_view.sql
Browse files Browse the repository at this point in the history
код обновления витрины данных в соответствии с доп.заданием.
  • Loading branch information
KirillZhul committed May 28, 2023
1 parent a9fab0c commit c4ac6a0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions orders_view.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
create or replace view analysis.orders as
select
o.order_id,
o.order_ts,
o.user_id,
o.bonus_payment,
o.payment,
o.cost,
o.bonus_grant,
osl.status_id "status"
from
production.orders o
inner join
production.orderstatuslog osl
on 1 = 1
and o.order_id = osl.order_id
and o.order_ts = osl.dttm
where osl.dttm >= '2022-01-01';

0 comments on commit c4ac6a0

Please sign in to comment.