0
給定兩個表,nf_users和nf_wr_year以及以下查詢,如何將內部聯接添加到nf_users表以便選擇其他列?在子查詢上添加INNER JOIN
SELECT
points,
played,
wins
FROM (
SELECT
p.*,
@i:[email protected] + 1 rank,
@match:=IF(p.points = 528, @i, @match)
FROM
nf_wr_year p,
(SELECT @i:=0, @match:=0) vars
ORDER BY p.points
) t
WHERE @match >= rank - 2
AND @match <= rank + 2
問題解決... – thar 2013-03-27 21:04:27