Menghitung rasio nilai terhadap total dalam partition.
DOUBLEDiperbarui: 6 Jan 2026RATIO_TO_REPORT(expr) OVER ([PARTITION BY ...])Expression numerik
1 SELECT 2 product_name, 3 sales, 4 RATIO_TO_REPORT(sales) OVER () as pct_of_total, 5 RATIO_TO_REPORT(sales) OVER (PARTITION BY category) as pct_of_category 6 FROM products;
Persentase sales dari total dan per kategori.
Sudah paham RATIO_TO_REPORT? Latih langsung di browser
Latihan interaktif, langsung di browser.