Skip to content

OOS listings


Inventory logs for a given sub order num -
with order_product_variation_details as
(
Select product_id, variation_id
from
(
Select o.*,v.id as variation_id from (select * from silver.supply__order_details where sub_order_num = '106459531525120384_1')o --Filter sub_order_num here
left join silver.supply__product_supplier_map psm on o.product_id = psm.product_id and o.supplier_id = psm.supplier_id
left join silver.inventory__variations v on psm.scale_id = v.scale_id and o.variation = v.name
)A
)
Select supplier_id, product_id, variation_id, inventory_updated_timestamp AT TIME ZONE 'Asia/Calcutta' as inventory_update_time,source, supplier_oos, live_inventory as current_value, all_inventory as older_value, projected_orders, pending_orders, dispatched_orders from silver.inventory__inventory_product_inventory_log_v2
where product_id in (select distinct product_id from order_product_variation_details) and variation_id in (select distinct variation_id from order_product_variation_details)
order by inventory_updated_timestamp desc

Order logs for a given product (By referencing the sub order number)
with order_product_variation_details as
(
Select product_id,variation_id,variation
from
(
Select o.*,v.id as variation_id from (select * from silver.supply__order_details where sub_order_num = '106459531525120384_1)o --Filter sub_order_num here
left join silver.supply__product_supplier_map psm on o.product_id = psm.product_id and o.supplier_id = psm.supplier_id
left join silver.inventory__variations v on psm.scale_id = v.scale_id and o.variation = v.name
)A
)
Select od.sub_order_num, od.created_at, ost.name as order_status from
(
Select * from silver.supply__order_details
where product_id in (select distinct product_id from order_product_variation_details)
and variation in (select distinct variation from order_product_variation_details)
)od left join silver.supply__order_status ost on od.order_status = ost.id
order by created_at desc

Product creation and inventory logs -

Product creation details -
Select * from silver.supply__products where id = <Product_ID>
To check for upload method and file details -
Select * from silver.cis__cis_product_merge_view where meesho_pid = <Product ID>
Select * from silver.cis__cis_record where file_ref_id = 'File_ref_ID_from_above_table'
Catalog go live details -
Select * from silver.listing_go_live__listing_go_live_catalog_go_live_activation_status where catalog_id = <Catalog_ID> order by created_at desc
Inventory logs -
Select * from silver.inventory__inventory_product_inventory_log_v2 where product_id = <Product_ID> order by inventory_updated_timestamp desc

Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.