How to get records for one customer that exist in two tables but in one of them there are more records. For example in the fist table there are 3 records with different amounts and in the second there are only two of the same recoreds. I need a SQL query to get records from first table that are missing in the second one. If I joint the tables and add where second table.field IS NULL forks only if the customer exists in both tables the record is not in the results.
First Table
Second Table
This query works only in the mentioned above case:
SELECT * from извл Left JOIN вн ON извл.customer=вн.customer Where вн.customer IS NULL;
The result is not what I want
Result os SQL
I wanted to get records that are in the first table but not in the second for existing there customer. In the case that I have attached screenshot from I am expecting one more records for atm01 – 30.