mysql中的Group By和Last Query

时间:2014-01-23 16:32:45

标签: mysql

"idx"   "date"  "time"  "HomeMatchingId"    "HomeName"  "AwayMatchingId"    "awayname"  "FTOU"  "FTOverOdds"    "FTUnderOdds"   "sportsbook"
"137859"    "20121220"  "16:00:05"  "811"   "Mersin Idmanyurdu" "365"   "Antalyaspor"   "2.5"   "-0.89" "0.79"  "IBCBet"
"137858"    "20121220"  "16:00:05"  "811"   "Mersin Idmanyurdu" "365"   "Antalyaspor"   "2-2.5" "0.84"  "-0.94" "IBCBet"
"137767"    "20121220"  "15:59:50"  "811"   "Mersin Idmanyurdu" "365"   "Antalyaspor"   "2.5"   "-0.89" "0.79"  "IBCBet"
"137766"    "20121220"  "15:59:50"  "811"   "Mersin Idmanyurdu" "365"   "Antalyaspor"   "2-2.5" "0.84"  "-0.94" "IBCBet"
"137607"    "20121220"  "15:59:02"  "811"   "Mersin Idmanyurdu" "365"   "Antalyaspor"   "2-2.5" "0.87"  "-0.97" "IBCBet"

根据以上数据,我正在尝试检索每个FTOU的最后一个打印件,按家庭和远程匹配ID(您只在这里看到一个游戏),以及FTOU和SPortsbook分组。它本质上是qry组的最大idx。

对于每个游戏,每个游戏都会给我每个差点(FTOU)的最后一个价格行。

在访问中我可以使用'last'qry,但在mysql中没有这样的运气。

0 个答案:

没有答案