I wrote sql statement that i want to get some data from the database but i have alot of duplication in records i don't know why
here is my statement:
select distinct p.name as product,sum((p.our_price * i.unit_amount)) as total,p.our_price,i.unit_amount from account_analytic_line i,product_template p where i.date>='2015-01-01' and i.date<='2016-12-30' and i.product_id=p.id and i.from_exp=FALSE and i.account_id=49 and i.from_exp=false group by p.name,p.our_price,i.unit_amount order by p.name
the data of the products came good but there is some duplicates,Here is the data: 
i want to remove the duplicates and get the total and the unit and the price in 3 just 3 rows
