SELECT 
    p.name,
    tsl.unit_price_before_discount as price_point,
    COUNT(DISTINCT t.id) as number_of_transactions,
    SUM(tsl.quantity) as total_quantity_sold,
    SUM(tsl.unit_price_before_discount * tsl.quantity) as total_revenue
FROM products p
JOIN transaction_sell_lines tsl ON p.id = tsl.product_id
JOIN transactions t ON tsl.transaction_id = t.id
WHERE t.type = "sell" 
AND t.status = "final"
AND t.transaction_date >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH)
GROUP BY p.id, p.name, tsl.unit_price_before_discount
ORDER BY p.name, price_point;