SELECT TOP 1 in wp_query for each groupby meta value

You could execute a query for each meta group to retreive the id of each category latest post and store the ids in an array.
Then cicle trough the array as if you were in the loop.

There might be a better way, but this is what i came up with at the moment of writing.

<?php
// Please note the following code is not tested and might contain sintax errors

// define result array and categories to search
$latest_post_from_each_category = [];
$categories = [
    [
        'key' => 'meta_key_1',
        'value' => 'meta_value_1'
    ],
    [
        'key' => 'meta_key_2',
        'value' => 'meta_value_2'
    ]
];

// Cicle trough categories to get each cat's latest post ID
foreach ($categories as $cat) {

    $args = [
        'post_type' => 'post',
        'post_status' => 'publish',
        'fields' => 'ids',              // The query will return an Array of IDS
        'posts_per_page' => '1',        // Only get one post for each cat
        'order_by' => 'date',
        'order' => 'DESC',
        'meta_query' => [
            [
                'key'     => $cat['key'],
                'value'   => $cat['value'],
            ],
        ],
    ];

    $query = new WP_Query( $args ); // This will return an array containing a single integer (or an empty array if no post has been found)
    $latest_post_from_each_category = array_merge($latest_post_from_each_category, $query); // Merge the orignal array with the new id found
};

var_dump($latest_post_from_each_category); // Array of ids you need

// just cicle trough the array and get the info ou need by the post id

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)