Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- WITH cte (CustomerId)
- AS
- (
- SELECT DISTINCT CustomerId
- FROM Feedbacks
- )
- SELECT CONCAT(c.FirstName, ' ', c.LastName) AS [CustomerName],
- c.PhoneNumber,
- c.Gender
- FROM Customers AS c
- WHERE c.Id NOT IN (SELECT CustomerId FROM cte)
- ORDER BY c.Id ASC
Add Comment
Please, Sign In to add comment