ВЫБРАТЬ Current.Status,
Current.UserID as UserID,
Current.UserAccountID as C_UserAccID,
Current.Implementation_Type as C_ImpType,
Current.ClientID as C_ClientID,
tbl_clients.ClientName,
parent.LastModifiedDate as PLastModifiedDate,
parent.ParentUserAccountID as PUserAccID,
parent.Implementation_Type as PImpType,
parent.IterationNum as PIterationNum,
parent.Description as PDescription,
parent.GSheetID as PGSheetID
ОТ tbl_useraccounts AS Текущий
ВЛЕВО ПОДКЛЮЧИТЬ tbl_useraccounts AS родительский на
parent.ParentUserAccountID = Current.UserAccountID
ВНУТРЕННЕЕ СОЕДИНЕНИЕ tbl_clients на Current.ClientID =
tbl_clients.ClientID
ГДЕ Current.UserID = '7'
и Current.Status! = '2'
и parent.ParentUserAccountID! = ''
и parent.Implementation_Type = '4'
порядок по родительскому элементу.LastModifiedDate descv