select distinct chain from chainerlink where fromid='13399134231' and frommid='50083'
select distinct chain from chainerlink where fromid='13399134231' and frommid='47361'