SELECT SQL_CALC_FOUND_ROWS p.product_id, p.main_image, p.main_list_comment, p.comment2, p.update_date, p.sub_title6, MAX(price02), MAX(price03), MAX(stock), pc.point_rate, p.sales_datetime, p.sales_end_datetime, IF(p.tweet=p.tweet, 1, 0) AS tweet, p.name, p.movie_s, GROUP_CONCAT(cc.name separator ' ') AS classlist, GROUP_CONCAT(pc.stock separator ' ') AS stocklist
FROM (
SELECT product_id, category_id
FROM dtb_product_categories
WHERE category_id =62
)AS pcat
LEFT JOIN dtb_products AS p ON p.product_id = pcat.product_id
LEFT JOIN dtb_products_class AS pc ON p.product_id = pc.product_id
LEFT JOIN dtb_classcategory AS cc ON pc.classcategory_id1 = cc.classcategory_id
WHERE p.product_id IS NOT NULL
AND p.del_flg !=1
AND p.status =1
AND (p.sales_end_datetime IS NULL OR p.sales_end_datetime >= '2024-04-24 10:39:08')
AND p.product_id IN (SELECT product_id FROM dtb_product_categories WHERE category_id = 371)
AND pc.del_flg = 0
GROUP BY p.product_id
ORDER BY MAX(price02)
LIMIT 0, 25
17896 PUNK DRUNKERS まるパ ワッペン
24630 PUNK DRUNKERS ハイやねんクージー BLACK
24631 PUNK DRUNKERS ハイやねんクージー GREEN
34382 PUNK DRUNKERS 湯のみっぽいクージー GREEN
13662 PUNK DRUNKERS ピアス まるパ PINK
28801 PUNK DRUNKERS 【PDSxTREST】ICパスケース ウルトラスケボー
31702 PUNK DRUNKERS あいつピンズ
47575 PUNK DRUNKERS あいつミサンガ BLACK/GREEN
40774 PUNK DRUNKERS 靴紐2018 WHITE
40775 PUNK DRUNKERS 靴紐2018 BLACK
45206 PUNK DRUNKERS 靴ひも / 反区 WHITE
45735 PUNK DRUNKERS 靴ひも / 反区 BLACK
22311 PUNK DRUNKERS あいつのお皿
24632 PUNK DRUNKERS ハイやねんグラス
21637 PUNK DRUNKERS 【PDSxHELLO KITTY】あいつキティマグカップ
23631 PUNK DRUNKERS カラビナマグカップ BLACK
23632 PUNK DRUNKERS カラビナマグカップ YELLOW
23633 PUNK DRUNKERS カラビナマグカップ RED
24287 PUNK DRUNKERS ホソリストバンド2016
32535 PUNK DRUNKERS 山男カラビナマグ RED
32536 PUNK DRUNKERS 山男カラビナマグ BLACK
32537 PUNK DRUNKERS 山男カラビナマグ YELLOW
39443 PUNK DRUNKERS ツタバマグ
22310 PUNK DRUNKERS 集合のお皿
22309 PUNK DRUNKERS 布カレンダー