Skip to content
Advertisement

Creating a mySQL sub query to list distinct rows from two queries

I have two queries:

and

The first query returns around 4000 values, the second query returns around 4100.

I’m attempting to create a query that will return the rows which are distinct between the two values, I’m attempting this by using a nested or sub query but I’m struggling with syntax here. Having only worked with very simple queries before. Could anyone suggest how I might do this.

Advertisement

Answer

I think this does what you want:

That is more simply written as:

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