I have two tables, each one has 4 fields. A crc
, a title
, a parent
and a parent_type
.
The data in those tables represents files and to which entity they belong to.
A file with the same CRC can belong to multiple entities.
The first table represents a snapshot at one point in time, while the second table represents a snapshot at another point in time.
When a file is "moved" (think of it as a file system mv
operation), the parent
and/or the parent_type
will change.
I want to get a list of the files that were moved between snapshot A and snapshot B.
This is what I currently have: http://sqlfiddle.com/#!5/89f0d4/1
Note that file 1
belongs to 2 different parents. file 4
was added/created. file 2
was moved from 2 GRUP
to 3 GRUP
. That is the one that I'm interested in.