HTTP status codes are specific to the HTTP protocol. So, if the request is successful, meaning, nothing went wrong with the HTTP negotiation, then you should return HTTP status 200 OK.
The fact that the number of result rows in a successfully completed query happens to be zero is completely irrelevant to the protocol that you use for communication.
So, do not mix the two: return a perfectly valid successful response, carrying an empty result set.
As a matter of fact, in my opinion, even if the execution of your query resulted in an error like "unknown table or view", you should still not mix error codes which are specific to your application with HTTP error codes. As far as HTTP is concerned, there was a perfectly valid HTTP request, which is now receiving a perfectly valid HTTP response, and any information about what your application did while servicing the request, like what the results are, or why the results could not be obtained, should be included within the application-specific payload of the response, and is none of HTTP's business.