template out necessary function
This commit is contained in:
parent
a8027b8447
commit
7d0166aab2
@ -13,7 +13,7 @@ target AS (select $${"scenario":{"quota_rep_descr":"10032 - BRYAN HILL","part_gr
|
|||||||
JOIN LATERAL json_each(def->'months') je ON true
|
JOIN LATERAL json_each(def->'months') je ON true
|
||||||
JOIN LATERAL json_to_record(je.value) as r (amount numeric, qty numeric) ON TRUE
|
JOIN LATERAL json_to_record(je.value) as r (amount numeric, qty numeric) ON TRUE
|
||||||
)
|
)
|
||||||
select * from newm
|
--select * from newm
|
||||||
,GLD AS (
|
,GLD AS (
|
||||||
SELECT
|
SELECT
|
||||||
N1COMP COMP
|
N1COMP COMP
|
||||||
@ -135,7 +135,13 @@ select * from newm
|
|||||||
FROM
|
FROM
|
||||||
mmix
|
mmix
|
||||||
)
|
)
|
||||||
select * from mmixp
|
SELECT
|
||||||
|
t.*
|
||||||
|
,x.*
|
||||||
|
FROM
|
||||||
|
newm t
|
||||||
|
--need to build this function
|
||||||
|
JOIN LATERAL get_closest(pick_from_json) x ON true
|
||||||
|
|
||||||
,closest AS (
|
,closest AS (
|
||||||
SELECT
|
SELECT
|
||||||
|
Loading…
Reference in New Issue
Block a user