AnsweredAssumed Answered

Self Join Relationship Confusion

Question asked by LiamNeville on Apr 15, 2015
Latest reply on Apr 15, 2015 by philmodjunk


Self Join Relationship Confusion


Hey guys,

I think i have misunderstood how self join relationship work.

Lets say for example i have a table called 'Animals', with the fields;
animal - text
amount - number
cat_match - text global of 'cat' as the data

Then i had 4 records with animal as 'dog', 1 record with animal as 'cat', and any numbers in their amount fields.

Then i create a self join relationship of the table, calling it 'cat_only', setting 'animal' = 'cat_match'

I thought doing this would then make the 'cat_only' table have only the one record where 'animal' was set to cat. Also giving me the ability to do a calculation such as sum, but to limit the result of only adding up the cat's amounts.

I hope that is clear enough. Do i have this completely wrong, and they are not meant to work that way? How would i go about creating a system like that?