Created
July 29, 2022 05:14
-
-
Save iamsardorbek/c4ae6ef1d09cf6b7bc4b840b0029f6ff to your computer and use it in GitHub Desktop.
assortment_check_equipment.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select t.Company_Id, | |
(select k.Name | |
from Md_Companies k | |
where k.Company_Id = t.Company_Id) Company_Name, | |
t.Assortment_Id, | |
(select k.Name | |
from Tmcg_Assortments k | |
where k.Company_Id = t.Company_Id | |
and k.Assortment_Id = t.Assortment_Id) Assortment_Name, | |
t.Product_Id, | |
(select k.Name | |
from Mr_Products k | |
where k.Company_Id = t.Company_Id | |
and k.Product_Id = t.Product_Id) Product_Name | |
from Tmcg_Assortment_Person_Type_Inventories t | |
where exists (select * | |
from Mr_Product_Inventories k | |
where k.Company_Id = t.Company_Id | |
and k.Product_Id = t.Product_Id | |
and k.Inventory_Kind = 'E') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment