I am not sure about the Question Title. 

Let's explain my question. 

I have two tables 1. Cows and 2. Children

```
CREATE TABLE Cows (
cow_id int,
Name varchar(255));

CREATE TABLE Children (
child_id int,
cow_id int,
weight double,
time time,
fr_score double);

```

I combined them with left join 

```
select 
    cow.cow_id
    , cow.Name
    , child.child_id
    , Child.DOB
FROM(
    select cow_id
        , Name
    From cows
) as cow
left join (
    select child_id
        , cow_id
        , weight
        , time
        , fr_score
    From Children
) as child
on child.cow_id = cows.cow_id
order by cow.cow_id, child.child_id

```

The result I get is this But....

```
cow_id   child_id    weight       time      fr_score
------   --------    ------     --------    --------
 601       6011        78       05:00:15       2.5
 601       6012        58       05:00:15       2.6
 601       6013        88       07:12:50       0.0
 601       6014        77       09:10:50       4.5
 602       6021        98       13:12:53       1.6
 602       6022        85       15:00:12       1.8
 602       6023        68       17:22:35       2.9
 603       6031        73       20:22:12       3.8
 603       6032        72       21:04:52       2.6
 604       6041        78       23:43:45       4.1

```

But what I want is to get this result (with average of weight of children from a specific cow and this will be for each and every cow and it's children). "xx/xxx" indicates average value 

```
cow_id   child_id    weight       time      fr_score
------   --------    ------     --------    --------
 601       6011        78       05:00:15       2.5
 601       6012        58       05:00:15       2.6
 601       6013        88       07:12:50       0.0
 601       6014        77       09:10:50       4.5
           avg-        XX                      XXX
 602       6021        98       13:12:53       1.6
 602       6022        85       15:00:12       1.8
 602       6023        68       17:22:35       2.9
           avg-        XX                      XXX
 603       6031        73       20:22:12       3.8
 603       6032        72       21:04:52       2.6
           avg-        XX                      XXX
 604       6041        78       23:43:45       4.1

```