This is a little dangerous to do without discussions about the data with the applications group. A problem can arise if the ORDERSTATUS column can have other values than listed above which would break the new query’s logic. In this case after talking to the applications team, ‘I’ and ‘C’ are the only two possible values so our new logic is sound. This also means that an index on ORDERSTATUS seems to make sense. Including the OrderID and CustomerID column in this index, which are join criteria to the Item and ShipmentDetails tables, also makes sense. If those columns were not included, an expensive Key Lookup would most likely be performed on the Orders table so the joins could be accomplished.