As far as your rights go, yes, you can query the book. As far as whether an agent or publisher will be interested, only if you've managed to sell at least a few thousand copies on your own. At which point they may decide one of two things:
a) If the book is good enough that you sold that many copies on your own, they should be able to sell even more with their resources.
b) The book has just about maxed-out on its sales potential. There won't be enough sales after this to make it worth their while to publish it.
If the book is doing very, very well indeed and sales are steadily growing you have a chance at a). But even if the answer is b), if you've sold a few thousand copies they may be very interested in seeing your next project based on the success of this one.
If the book isn't selling, and you eventually write something else and the time comes to send it to agents, you are far better off not mentioning the self-published book.