I have to create a TOP N with the statement :
dimensions:
date (month)
site_country
product type
metric:
gross_revenue (only top 10 products type per country/month)
I have tried a big query program below between 2 tables :
SELECT
FORMAT_DATE("%Y-%m",t0.order_create_date) AS month,
t0.site_country AS country,
p0.product_type AS product,
SUM(t0.item_net_price) AS gross_revenue,
FROM
transactions t0
LEFT JOIN
products p0
ON
t0.item_id = p0.item_id
WHERE rank =<10
GROUP BY
month,
product,
gross_revenue,
ORDER BY
gross_revenue DESC