Correction of PLD implementation, Daily Values.
This commit is contained in:
parent
3ae85054a5
commit
8eea27060a
@ -159,8 +159,7 @@ class PldRepository extends AbstractRepository implements PldContractInterface
|
||||
'pld.submercado as submarket',
|
||||
DB::raw("AVG(pld.valor) as value"),
|
||||
DB::raw("pld.mes_ref as year_month"),
|
||||
DB::raw("TO_CHAR(TO_DATE(pld.mes_ref, 'YYMM'::text)::timestamp with time zone, 'MM/YYYY'::text) as year_month_formatted"),
|
||||
DB::raw("TO_CHAR(TO_DATE(pld.mes_ref, 'YYMM'), 'MM/YYYY') AS mes_ref"),
|
||||
DB::raw("TO_CHAR(TO_DATE(pld.mes_ref, 'YYMM'::text)::timestamp with time zone, 'MM/YYYY'::text) as year_month_formatted")
|
||||
];
|
||||
|
||||
$fields2 = ['day_formatted',
|
||||
@ -182,10 +181,8 @@ class PldRepository extends AbstractRepository implements PldContractInterface
|
||||
)
|
||||
->orderByRaw("('1899-12-30'::date + ('1 day'::interval day * (pld.dia_num)::double precision))");
|
||||
|
||||
|
||||
return $this->execute($fields2, $params)
|
||||
->from($query, 'plds')
|
||||
->orderBy('day_calc', 'asc')
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user