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-19 09:18:44')
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
20575 【PUNK DRUNKERSxOJAGA DESIGN】iPhone6アイツホンケース モノトーン
20577 【PUNK DRUNKERSxOJAGA DESIGN】iPhone6 アイツホンケース カラー
59965 PUNK DRUNKERS [PDSxSTline]パンクドグローブ - BLACK
29075 PUNK DRUNKERS DIYエプロン BROWN
51770 PUNK DRUNKERS ロゴネックウォーマー BLUE
51771 PUNK DRUNKERS ロゴネックウォーマー RED
31700 PUNK DRUNKERS あいつちゃん耳あて BLACK/WHITE
31701 PUNK DRUNKERS あいつちゃん耳あて NAVY/WHITE
51374 PUNK DRUNKERS pd耳あて NAVY
51375 PUNK DRUNKERS pd耳あて RED
29935 PUNK DRUNKERS PDSxST line あいつグローブ
54727 PUNK DRUNKERS 風になりたいハンディファン
28511 PUNK DRUNKERS 【PDSxTREST】BlueToothスピーカー ステッカー
29074 PUNK DRUNKERS DIYエプロン BLACK
40527 PUNK DRUNKERS ツタバ水筒
21950 PUNK DRUNKERS HOTx2ネックウォーマー2015 GREENチェック
21951 PUNK DRUNKERS HOTx2ネックウォーマー2015 BLUEチェック
48606 PUNK DRUNKERS サングラス'19 SUMMER
31698 PUNK DRUNKERS あいつちゃん耳あて BLACK
31699 PUNK DRUNKERS あいつちゃん耳あて RED
29936 PUNK DRUNKERS リバーシブルネックウォーマー GRAY
29937 PUNK DRUNKERS リバーシブルネックウォーマー GREEN/BLUE
43208 PUNK DRUNKERS 【PDSxキン肉マンx430】ケンダマンけん玉 RED
43209 PUNK DRUNKERS 【PDSxキン肉マンx430】ケンダマンけん玉 SILVER
24708 PUNK DRUNKERS 【PDSxTREST】モバイルバッテリー 花の妖精