The are different queries in that the first is driven off purchases (i.e. if there are no purchases, there will be no results even if there are customers); and the second is driven off customer - so there will be results if there are customers, but no purchases).
Both run for me without issue. What version of couchbase server do you have?
Also - if you get the message “No index available for …” then the Index Advisor will tell you which indexes need to be created, and how to created them.
I run the query here you can try it both works also for me but one gives me an index error and thats not my database I cant create indexes because its the tutorial site of couchbase
btw - I think the issue you see in the sample server is Log in - Couchbase database. It says it is fixed in 7.0.4, and that sample server is apparently 7.0.0