select p.iPax, p.iPackageID, p.vName, i.fRate, p.vInclusion, i.iChips, i.iNNPC, i.iMPC, i.iInventory, p.vShortDesc, p.vChoiceOfLiquor, p.cType, i.dInv from dz_package p left join dz_inventory i on p.iPackageID = i.iPackageID where i.iPackageID = '1' and (p.cStatus = 'A' and i.cStatus = 'A') and i.dInv = '2022-07-06' and p.cBookType NOT IN ('SNP', 'AGT') and i.iInventory > 0 order by i.dInv DESC LIMIT 1