SELECTDISTINCT(user_id)
FROMaacgb2v5_usergroups as ug1
INNERJOINaacgb2v5_usergroupsAS ug2 ON ug2.lft>=ug1.lft AND ug1.rgt>=ug2.rgt
INNERJOINaacgb2v5_user_usergroup_mapAS m ON ug2.id=m.group_id
WHERE ug1.id IN (8)

SELECTDISTINCT(user_id)
FROMaacgb2v5_usergroups as ug1
INNERJOINaacgb2v5_usergroupsAS ug2 ON ug2.lft>=ug1.lft AND ug1.rgt>=ug2.rgt
INNERJOINaacgb2v5_user_usergroup_mapAS m ON ug2.id=m.group_id
WHERE ug1.id IN (7)

SELECT user_id, category_id, role FROMaacgb2v5_kunena_user_categoriesWHERE role IN (1,2)

SHOWFULLCOLUMNSFROM `aacgb2v5_kunena_sessions`

SELECT*FROMaacgb2v5_kunena_categoriesORDERBY ordering, name

SELECTCOUNT(*) FROMaacgb2v5_kunena_topicsAS tt WHERE tt.hold IN (0) AND tt.category_id IN (2,6,4,8,7,3) AND tt.last_post_time>'1510626112' AND tt.moved_id='0'