Hussnain
12/30/2024, 8:11 PMjen
12/30/2024, 8:27 PMHussnain
12/30/2024, 8:35 PMHussnain
12/30/2024, 8:35 PMjen
12/30/2024, 9:19 PMHussnain
12/30/2024, 9:31 PMHussnain
12/30/2024, 9:31 PMHussnain
01/01/2025, 8:43 PM"Select item.id as itemId,item.fullname as itemName,CUSTOMLISTCUSTOMLISTPSGS_PRDT_SIZ1.name AS itemSize, transaction.tranId,salesInvoiced.tranDate,salesInvoiced.amount As baseprice,salesInvoiced.amountnet AS netSales,salesInvoiced.itemCount, transactionLine.id,transaction.id as transaction,transactionLine.memo as description,item.totalQuantityOnHand,location.name as locationName,CUSTOMRECORD_TLS_LIFE_CAT.name AS productLifeStyleCategory,CUSTOMRECORD_TLS_PRODUCT_CATEGORY.name AS productCategory,CUSTOMRECORD_CSEG1.name AS Inventory_MH1_Division,CUSTOMRECORD_CSEG3.name AS Inventory_MH3_Class,AggregateItemLocation.quantityonhand AS locationLevelInventory,AggregateItemLocation.preferredstocklevel FROM salesInvoiced INNER JOIN transaction ON salesInvoiced.transaction = transaction.id INNER JOIN transactionLine ON salesInvoiced.uniquekey = transactionLine.uniquekey INNER JOIN item ON item.id = salesInvoiced.item INNER JOIN location ON transactionLine.location = location.id INNER JOIN CUSTOMRECORD_TLS_LIFE_CAT ON item.custitem_tls_lifestyle_category = CUSTOMRECORD_TLS_LIFE_CAT.id INNER JOIN CUSTOMRECORD_TLS_PRODUCT_CATEGORY ON item.custitem_tls_product_category = CUSTOMRECORD_TLS_PRODUCT_CATEGORY.id LEFT JOIN CUSTOMRECORD_CSEG1 ON item.cseg1 = CUSTOMRECORD_CSEG1.id LEFT JOIN CUSTOMRECORD_CSEG3 ON item.cseg3 = CUSTOMRECORD_CSEG3.id INNER JOIN AggregateItemLocation ON ( AggregateItemLocation.Item = TransactionLine.Item ) AND ( AggregateItemLocation.Location = TransactionLine.Location ) LEFT JOIN CUSTOMLISTCUSTOMLISTPSGS_PRDT_SIZ1 ON transactionLine.custcol_tls_size_new = CUSTOMLISTCUSTOMLISTPSGS_PRDT_SIZ1.id where salesInvoiced.trandate = TO_DATE('2024-12-31', 'YYYY-MM-DD') AND salesInvoiced.itemCount != 0 AND Item.ItemType = 'InvtPart'"
Could you please assist me in optimizing this query? I need to retrieve records for products that are two years old or more. Additionally, I need to include the base inventory price for each product.rico
01/02/2025, 5:33 PMHussnain
01/02/2025, 6:12 PMHussnain
01/02/2025, 6:12 PM