$res = \Bitrix\Iblock\SectionTable::getList([
'order' => ["LEFT_MARGIN" => "ASC"],
'select' => [
'ID', 'NAME', 'LEFT_MARGIN', 'RIGHT_MARGIN', 'CODE', 'UF_UDS_ID'],
"filter" => array(
"IBLOCK_ID" => CATALOG_IBLOCK,
"ACTIVE" => "Y",
"GLOBAL_ACTIVE" => "Y",
"UF_UDS_ID" => false,
'DIFF' => 1,
),
'runtime' => [
new ExpressionField('DIFF', '(%s - %s)', ['RIGHT_MARGIN', 'LEFT_MARGIN'])
],
]);