Creating script for join data in the same file