SELECT
DATE(datetime) AS date,
article,
price
FROM
client_prices_history
WHERE
(article, datetime) IN (
SELECT
article,
MAX(datetime) AS max_datetime
FROM
client_prices_history
GROUP BY
article, DATE(datetime)
);
public function getPrice(): int
{
return $this->price;
}
protected function configureListFields(ListMapper $list): void
{
$list
->add('price', null,[
'sort_field_mapping' => [
'fieldName' => 'price+0',
],
])
;
}