Home  >  Article  >  Database  >  数据- 撮合算法 用mysql实现

数据- 撮合算法 用mysql实现

WBOY
WBOYOriginal
2016-06-06 09:35:451252browse

mysql数据算法

一张买入表 一张卖出表。怎么去匹配买入表的两条或多条数据和卖出表的数据相等。或者是怎么去匹配卖出表的两条或多条数据和买入表的数据相等。
比如
卖出
c1 10
c2 20
c3 30
买入
r1 15
r2 15
这个时候 c3 = r1+r2

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn