select di.* from trm_in_discount_types_items di inner join trm_in_discount_types dt on di.discount_type=dt.id where dt.efts=19 and dt.name like '%акция%' and di.deleted=0 and dt.deleted=0;