WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports\Stock

Controller::add_wp_query_group_by() public WC 1.0

Group by post ID to prevent duplicates.

{} It's a method of the class: Controller{}

No Hooks.

Return

String. Nothing.

Usage

$result = Controller::add_wp_query_group_by( $groupby, $wp_query );
$groupby(string) (required)
Group by clause used to organize posts.
$wp_query(object) (required)
WP_Query object.

Code of Controller::add_wp_query_group_by() WC 5.3.0

<?php
public static function add_wp_query_group_by( $groupby, $wp_query ) {
	global $wpdb;

	if ( empty( $groupby ) ) {
		$groupby = $wpdb->posts . '.ID';
	}
	return $groupby;
}