Why would this SQL query not work, when run in the Query Module tags:
{exp:query sql="SELECT SUM(prices.field_id_45) AS total FROM exp_weblog_data AS prices INNER JOIN exp_weblog_titles AS titles ON titles.entry_id = prices.entry_id AND titles.status = "open";"}
{total}
{/exp:query}