提取數據我有2個表從2個表
table1
eventcode mobile points name
-------------
CAMTRIP 82074626 10 SS
TARANAKI 91262063 30 JL
CAMTRIP 91262063 10 JL
和表2
passcode serial remark
----------
TARANAKI 1 NZ
CAMTRIP 2 Cameroon
我想輸出作爲
Cameroon
NAME Points
----------
SS 10
JL 10
NZ
----------
JL 30
我想
SELECT (b.name) name,
(b.points) point,
(b.eventcode) ecode,
(c.remark) rem
FROM table1 b,
table2 c
WHERE c.passcode = b.eventcode
GROUP BY b.eventcode
我沒有得到想要的結果。哪裏不對?
你編輯問題包括所需的結果嗎? –