提取数据我有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
我没有得到想要的结果。哪里不对?
你编辑问题包括所需的结果吗? –