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 =6
)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-18 18:06:36')
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 p.update_date DESC
LIMIT 0, 25
64392 PUNK DRUNKERS 光る目シャツ - BLACK
56620 PUNK DRUNKERS [PDSxLAND by MILKBOY]ブラザーズデニムシャツ - LT.BLUE
56621 PUNK DRUNKERS しみシャツ - WHITE
56622 PUNK DRUNKERS しみシャツ - LT.BLUE
54784 PUNK DRUNKERS [PDSxTHUNDERBOX]ピクトグラムシャツ - BEIGE/BROWN
54799 PUNK DRUNKERS オタネルシャツ - GREEN
54800 PUNK DRUNKERS オタネルシャツ - ORANGE
14460 PUNK DRUNKERS プリントいっぱいシャツ WHITE
17878 PUNK DRUNKERS 指シャツ
21285 PUNK DRUNKERS 蛇拳デニムシャツ
21785 PUNK DRUNKERS カーネルシャツ BW/GRAY
21786 PUNK DRUNKERS カーネルシャツ BLUE/NAVY
22736 PUNK DRUNKERS 虎ディショナルシャツ WHITE
22737 PUNK DRUNKERS 虎ディショナルシャツ GRAY
22825 PUNK DRUNKERS ロング丈半袖シャツ BLACK
22826 PUNK DRUNKERS ブロックシャツ BLACK/GRAY
22827 PUNK DRUNKERS ブロックシャツ WHITE/NAVY
22828 PUNK DRUNKERS PDS陰陽半袖シャツ BLACK/WHITE
23379 PUNK DRUNKERS フットボール風7分シャツ WHITE/NAVY
23380 PUNK DRUNKERS フットボール風7分シャツ BLACK/WHITE
28954 PUNK DRUNKERS カメネルシャツ BLUE
28955 PUNK DRUNKERS カメネルシャツ ORANGE
28956 PUNK DRUNKERS カメネルシャツ RED
28957 PUNK DRUNKERS カメネルシャツ PURPLE
29068 PUNK DRUNKERS ドロドロングシャツ長袖 BLACKチェック