I have the following SQL query:
select SUM(royalty_price*conversion_to_usd)from sales_raw where date='2012-06-01'
The closest I was able to come up with in django is:
sum(SalesRaw.objects.extra(
select={'result': 'royalty_price * conversion_to_usd'}
).values_list('result', flat=True))
Is there a more straightforward way to do this?