protected function dataSource()
{
// return AutoMaker::rawSQL("
// SELECT
// to_char(OGA02,'YYYY-MM-DD') as OGA02T,
// OGA50
// FROM OGA_FILE
// ");
// return AutoMaker::table("OGA_FILE")->where("ROWNUM","<",20)->run();
// return AutoMaker::table("OGA_FILE")
// ->select("to_char(OGA02,'YYYY-MM-DD') as OGA02T", "oga50")
// ->where("ROWNUM","<=",20)->run();
// return AutoMaker::table("oga_file")->rawSQL("
// SELECT to_char(OGA02, 'YYYY-MM-DD') as OGA02T,OGA50
// FROM oga_file
// ");
return AutoMaker::table("oga_file")
->select("to_char(OGA02,'YYYY-MM-DD') as OGA02T", "oga50")
->where("ROWNUM","<=",20);
// AutoMakerM::rawSQL("SELECT paymentDate, amount FROM payments");
}
protected function fields()
{
return [
//
// $this->group(Date::create("OGA02T")->label("DATE")->baseFormat("d-M-y")),
// $this->sum(Currency::create("OGA50")->USD()->symbol()),
$this->group(Date::create("OGA02T")),
$this->sum(Currency::create("OGA50")->USD()->symbol()),
];
}
still can't work