select invoice.billing_country as country, count(distinct invoice.invoice_id) as total_invoice, count(distinct client.customer_id) as total_customer from invoice as invoice join client as client on client.customer_id = invoice.customer_id where 1=1 and extract(year from cast(invoice_date as date)) = ( select extract(year from cast(invoice_date as date)) as year from invoice where 1=1 and extract(month from cast(invoice_date as date)) in (6,7,8) group by extract(year from cast(invoice_date as date)) order by sum(total) desc limit 1 ) group by 1 order by 2 desc, 1