WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\API\Reports\Taxes\Stats

Segmenter::get_segment_selections_order_level() protected WC 1.0

Returns column => query mapping to be used for order-related order-level segmenting query (e.g. tax_rate_id).

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

No Hooks.

Return

Array. Column => SELECT query mapping.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_segment_selections_order_level( $lookup_table );
$lookup_table(string) (required)
Name of SQL table containing the order-level segmenting info.

Code of Segmenter::get_segment_selections_order_level() WC 5.2.2

<?php
protected function get_segment_selections_order_level( $lookup_table ) {
	$columns_mapping = array(
		'tax_codes'    => "COUNT(DISTINCT $lookup_table.tax_rate_id) as tax_codes",
		'total_tax'    => "SUM($lookup_table.total_tax) AS total_tax",
		'order_tax'    => "SUM($lookup_table.order_tax) as order_tax",
		'shipping_tax' => "SUM($lookup_table.shipping_tax) as shipping_tax",
		'orders_count' => "COUNT(DISTINCT $lookup_table.order_id) as orders_count",
	);

	return $columns_mapping;
}