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 =96
)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-26 14:52:07')
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) DESC
LIMIT 0, 25
51754 PUNK DRUNKERS 地球つなぎ BEIGE
54826 PUNK DRUNKERS パンクドオーバーオール - BLACK
54827 PUNK DRUNKERS パンクドオーバーオール - BEIGE
60926 PUNK DRUNKERS あいつ目オーバーオール - BLACK
31696 PUNK DRUNKERS デニムスウェットパンツ NAVY
31697 PUNK DRUNKERS デニムスウェットパンツ LT BLUE
70218 MILKBOYxPUNK DRUNKERS(パンクドランカーズ) 宇宙人ボアフリースパンツ BLACK
56623 PUNK DRUNKERS CAMOカーゴパンツ - KHAKI
59892 PUNK DRUNKERS Fatミリタリーパンツ - BLACK
59894 PUNK DRUNKERS Fatミリタリーパンツ - KHAKI
54773 PUNK DRUNKERS [PDSxPAC-MAN]名人コーデュロイパンツ - BEIGE
36128 PUNK DRUNKERS BIKEパンツ - BLACK
68639 PUNK DRUNKERS(パンクドランカーズ)ボンテージ風チェックパンツ - RED CHECK
68640 PUNK DRUNKERS(パンクドランカーズ)ボンテージ風チェックパンツ - YELLOW CHECK
54816 PUNK DRUNKERS 飲んでるウィンドパンツ - BLACK
54822 PUNK DRUNKERS 手インターデニム - INDIGO
53106 PUNK DRUNKERS チェックx2ラインパンツ NAVY
53107 PUNK DRUNKERS チェックx2ラインパンツ BROWN
53989 PUNK DRUNKERS 弁慶スキニーパンツ L.BLUE
53990 PUNK DRUNKERS 弁慶スキニーパンツ GRAY
60901 PUNK DRUNKERS 寅デニムパンツ - INDIGO
60902 PUNK DRUNKERS 寅デニムパンツ - BLACK
62714 PUNK DRUNKERS PDルーズデニム - INDIGO
62715 PUNK DRUNKERS PDルーズデニム - LT.BLUE
21948 PUNK DRUNKERS 八つ裂きデニム BLUE