What is the best way to retrieve the posts that have tickets for sale?
I only have the Event Tickets and Event Tickets Plus plugin.
I found this way to get the posts with tickets in it. However, it still lists the events that are sold out or have tickets that are not on sale anymore.
One approach would be to take your existing result set then iterate through all of the tickets and discard those that are not current or are out of stock. You could then cache the result.
It would probably also be possible to craft one or more queries to get at the same data; which works and performs best probably depends on the number of events and tickets you are dealing with.