Под заказSELECT `qty`+`qty_msk`-`rez_minsk`-`rez_msk` as `qt`,`qty`-`rez_minsk` as `qt_minsk`, `qty_msk`-`rez_msk` as `qt_msk`,`modx_site_content_tmc`.`unit`,`modx_site_content_tmc`.`stock_status`,`modx_site_content_tmc`.`will`,`modx_site_content_tmc`.`status_tov`,`packing` FROM `modx_site_content_tmc` LEFT JOIN `modx_site_content_sklad` ON `modx_site_content_sklad`.`sku`=`modx_site_content_tmc`.`sku` WHERE `modx_site_content_tmc`.`resource`=164221