Guest User

Untitled

a guest
Feb 21st, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. select UserId,UserName, from ch_userregistration
  2.  
  3. select ReceiverId, COUNT(Message) from ch_singleconversation WHERE
  4. SenderId = '1002' AND MsgStatus='Y' GROUP BY ReceiverId
  5.  
  6. UserId UserNeme`
  7. -----------------
  8. 1001 Mohan
  9. 1002 Raj
  10. 1003 Mahesh
  11. 1004 rahul
  12.  
  13. ReceiverId Count
  14. ---------------------------
  15. 1002 8
  16. 1004 4
  17.  
  18. UserId UserName Count
  19. ----------------------------
  20. 1001 Mohan 0
  21. 1002 Raj 8
  22. 1003 Mahesh 0
  23. 1004 rahul 4
Add Comment
Please, Sign In to add comment