Get Values on the right position, using parent id
Hey there again !
First of all, i want to thank everybody who helped me out with my sorting problem! Now i have a new challange and i'm failing pretty hard.
I've to do some sentiment analysis for my bachelor thesis. I builded up a huge database with lots of informations. I'm using Facepager to get data from facebook. With your help i managed to get the data in the perfect postion to analyse them. But now i need the "likes" for each post/comment/recomment in the same row as the post/comment/recomment.
I attached one of my testfiles, so you can see what i mean!
As you can see, most of the likes are just 1 row down (you can figuer that out with ID-parentID), that wouldn't be a problem to put them up. But for example, for the first row with ID=2 (that's the main post) the Summary.total_count is on the very end of the exampleset (Row 504). There you can also see, that it got the right parentId.
The Set is always spiltted up on 4 LVL types, but they are different inbetween. I'll try to explain.
LVL1 is always a post, LVL2 can be a Comment or Likecount for LVL1, LVL 3 can be a Comment or a Likecount for LVL2 and LVL 4 is always the Likecount for LVL3 Comments. Likecounts are always OBJECTTYPE=offcut whilst comments or posts are always OBJECTTYPE=data.
Like i said, my database is huge and i can't sort them per hand and i'm failing to figure out how to build a proper process to fight this problem. I hope somebody can help me out here, i would really appriciate that.
Kind Regards
Mike
Answers
Hi,
i think what you want to do is a join from top down.
Take all 4th level,
join on parent_id = id with 3rd level
Take all 3rd+4th level
join on parend_id = id with 2nd level
and
Take all of this and join it on the first level data.
The result is a line where you have for each 4th level post all the information from the upper level.
Does it make sense? Otherwise i would need to find some time during the week to create it.
Cheers,
Martin
Dortmund, Germany
Hey Martin,
thanks for your fast respond and help! I used the Lag series in the end but had to build a big subprocess which is inspired of one i found in the net. I've added the XML!
Thanks again!! You helped me out alot!
Kind regards
Mike