SELECT
cscart_categories.category_id,
cscart_categories.parent_id,
cscart_categories.id_path,
cscart_category_descriptions.category,
cscart_categories.position,
cscart_categories.status,
cscart_categories.company_id,
cscart_categories.company_id
FROM
cscart_categories
LEFT JOIN cscart_category_descriptions ON cscart_categories.category_id = cscart_category_descriptions.category_id
AND cscart_category_descriptions.lang_code = 'en'
WHERE
1 = 1
AND (
cscart_categories.usergroup_ids = ''
OR FIND_IN_SET(
0, cscart_categories.usergroup_ids
)
OR FIND_IN_SET(
1, cscart_categories.usergroup_ids
)
)
AND cscart_categories.status IN ('A')
AND cscart_categories.parent_id IN (278)
AND cscart_categories.id_path LIKE '271/278/%'
AND cscart_categories.company_id = 1
ORDER BY
cscart_categories.is_trash asc,
cscart_categories.position asc,
cscart_category_descriptions.category asc