SELECT `u` . `Id` , `u` . `FSPNumber` , `u` . `FirstName` , `u` . `LastName` , `u` . `Email` , `u` . `Mobile` , `u` . `RoleStr` , `u` . `JobTitle` , `a` . `IsActive` , `a` . `IsDeleted` , `u` . `IsSuperAdmin` , `u` . `CreatedBy` , `u` . `ImageURL` , `u` . `ParentId` , ( SELECT `u0` . `FirstName` FROM `User_Master` AS `u0` WHERE `u0` . `Id` = `u` . `ParentId` LIMIT ? ) AS `FAPName` FROM `User_Master` AS `u` INNER JOIN `AspNetUsers` AS `a` ON `u` . `Email` = `a` . `Email` WHERE ( ( `u` . `CreatedBy` = ? ) OR ( `u` . `ParentId` = ? ) ) AND ( `u` . `Id` > ? ) ORDER BY `u` . `Id` 