You’ve already invested in ITSM tools, chat applications, automation utilities, and more. Fortify these solutions with intelligent communications so you can drive business processes forward.
With xMatters, you'll never miss a beat.
SELECT DISTINCT C.CustomerID, C.FirstName, C.LastName, C.Email, C.Password, C.Address, C.City, C.State, C.Country, C.Post, C.Phone, C.BestTimes, C.CreateDate, C.LastLogin, C.ContactPref, C.EstGiven, C.JobFini, C.Deposit, C.ActiveCust, C.CustNotes, B1.ImageID AS LatestImageID, B2.Comment AS LatestComment, B2.Poster, B2.PostDate AS Postdate FROM Customers AS C LEFT OUTER JOIN Employees AS E ON C.empID = E.empID LEFT OUTER JOIN (SELECT CustomerID, MAX(PostDate) AS MaxDate FROM blog WHERE (ImageID <> '') GROUP BY CustomerID) AS M1 ON M1.CustomerID = C.CustomerID LEFT OUTER JOIN blog AS B1 ON B1.CustomerID = M1.CustomerID AND B1.PostDate = M1.MaxDate LEFT OUTER JOIN (SELECT CustomerID, MAX(PostDate) AS MaxDate FROM blog AS blog_1 WHERE (Comment <> '') GROUP BY CustomerID) AS M2 ON M2.CustomerID = C.CustomerID LEFT OUTER JOIN blog AS B2 ON B2.CustomerID = M2.CustomerID AND B2.PostDate = M2.MaxDate WHERE (E.Username = @username) AND (C.ActiveCust = 1) ORDER BY C.LastLogin DESC
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.