Re: aggregation in mysql
Hi, thank you for your reply.
an example might be the following (just to give a rough idea):
given a relation order(id_ord, amount) and transaction (trans_id, ord_id) you want:
select id_ord,sum(amount) from order,transaction where id_ord=ord_id group-by id_ord
you can easily perform a group on ord_id and count for each of them the number of transactions involved and then join the result with order to have the correct sum (you can write this by a simple rewritten sql query).
Is there any technical report available to test optimization policy of mysql?
Subject
Views
Written By
Posted
2892
February 27, 2010 11:05AM
1700
February 28, 2010 01:48PM
Re: aggregation in mysql
2171
February 28, 2010 02:21PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.