" and (`store`.sg_function like '%coupon%' or (`store_grade`.sg_function like '%coupon%' and `store`.sg_function = ' '))";