私はそこにデータベースを持っています私はいくつかの記録を持っています。ordNRでグループ化されたすべてのレコードを表示したいのですが、どうすればよいですか?
SELECT Group_concat(ordnr) ordNR,
koden,
Group_concat(wish) wish,
rnamn,
bild,
pris,
cname,
onsktext,
restidn
FROM (SELECT m.ordnr AS ordNR,
p.id AS restidn,
t.tabnum AS tabNum,
m.wishtext AS onsktext,
m.meaoid AS midn,
m.ordcode AS koden,
w.wish,
r.meaname AS rnamn,
r.meaimg AS bild,
r.meaprice AS pris,
k.catname AS cname
FROM cats k,
meals r,
tables t,
restaurant p,
wishes w,
meaorder m
JOIN orders c
ON c.ordnr
WHERE p.id = '3'
AND c.tabid = t.tabid
AND c.ordstatus = '0'
AND m.ordnr = c.ordnr
AND m.meaid = r.meaid
AND m.wishesid = w.id
AND r.catid = k.catid)T
GROUP BY koden,
rnamn,
bild,
pris,
cname
ORDER BY midn DESC