RODB:過去三ヶ月の衣装最終値トップ100 

SELECT detail.item_name AS 'アイテム名',
detail.unit_cost AS '最終値',
detail.datetime AS '取引日時'
FROM item_detail_tbl detail
INNER JOIN (SELECT item_name, MAX(datetime) AS max_datetime FROM item_detail_tbl WHERE item_name LIKE '[衣装]%' AND datetime >= (NOW() - INTERVAL 3 MONTH) GROUP BY item_name) latest
ON (detail.item_name = latest.item_name AND detail.datetime = latest.max_datetime)
ORDER BY 2 DESC,1
LIMIT 100

Follow

RODB:過去三ヶ月の衣装最終値トップ100 

@magipota
すまねぇ、アメリカ語はさっぱりなんだ

· · Web · 1 · 0 · 0
Sign in to participate in the conversation
RO丼 - RO Mastodon

ラグナロクオンラインユーザ向けのMastodonインスタンス。