MY query is
SELECT distinct affiliate_date,affiliate_orders_id,affiliate_value,affiliate_payment,affiliate_percent,typeofsale FROM affiliate_sales
now I want to get the sum of these records
so the sum of (affiliate_sales) only for the distinct records
how can I do this?