Skip to content
Advertisement

Mysql query dosen’t provide the result needed

I’ve been trying to figure this one out for days but can’t come up with a solution. Here are the table schemes.

table schemes

This is my current query.

The problem is that the query returns as long as there is one article with status bigger than 1. I need a query where all the articles of that order have a status bigger than 1.

Advertisement

Answer

You can do it with NOT EXISTS:

or:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement