Query to make movement of a record
I have this tables
User Description Item
UID Name DeID Dgroup ID DeID Name
1 Jose 1 Printer 1 1 Stylus
2 James 2 Monitor 2 1 Epson
3 2 Viewsonic
Transaction Details
Ttype IID UserName NewUser
Release 1 Jose
Release 2 Jose
Transfer 1 Jose James
Release 3 James
How to query database such that when I select printer in description, It will show the Name in
User table and count how many printer he have. IT will not include if the Item is transferred to
other user.
eg. Printer Monitor
Name count Name count
Jose 1 Jose 0
James 1 James 1
Thanks in advance