No sé si es posible obtener los datos que desea, solo use sql.
Por lo general, haré este trabajo usando php
<?php
$json = array();
foreach ($array as $idx => $data) {
//Id is not exists in json,create new data
if( !array_key_exists($data['Id'], $json) ){//Id is unique in db,use Id for index ,you can find it easily
$json[$data['Id']]=array(
'Id' =>$data['Id'],
'Name'=>$data['Name'],
'Value'=>array(
$data['Date']=>$data['Value']
)
);
continue;
}
//Id is exists in json, append value
$json[$data['Id']]['Value'][$data['Date']] =$data['Value'];
}
$json = json_encode($json);
Ojalá pudiera ayudarte