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 dtb_products AS p
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-27 02:41:36')
AND p.product_id IN (SELECT product_id FROM dtb_product_categories WHERE category_id = 333)
AND pc.del_flg = 0
GROUP BY p.product_id
ORDER BY p.update_date DESC
LIMIT 0, 25
39919 SANTA CRUZ Screaming Hand L/S Regular T-Shirt Black
39920 SANTA CRUZ Screaming Hand L/S Regular T-Shirt White
39926 SANTA CRUZ Classic Dot Regular L/S T-Shirt Black
39927 SANTA CRUZ Classic Dot L/S Regular T-Shirt White
47642 SANTA CRUZ CLASSIC DOT REGULAR S/S T-SHIRT WHITE
49476 SANTA CRUZ SCREAMING HAND S/S REGULAR T-SHIRT BLACK
49477 SANTA CRUZ SCREAMING HAND S/S REGULAR T-SHIRT WHITE
49484 SANTA CRUZ CRUZ SOCKS CREW BLACK
54729 SANTA CRUZ LETTER HAND S/S TEE BK/WH
54728 SANTA CRUZ SCREAMING HAND S/S TEE GOLD
9047 SANTA CRUZ CLASSIC DOT CREW NECK LS BLACK
9116 SANTA CRUZ CLASSIC DOT LONG SHOREMAN BEANIE BK/OR
9118 SANTA CRUZ MERCIFUL DOT SS T SHIRT WHITE
9119 SANTA CRUZ MERCIFUL DOT SS T SHIRT BLACK
9123 SANTA CRUZ SKATE BRAIN S/S T SHIRT BLUE
9339 SANTA CRUZ CLASSIC DOT FLEXFIT FITTED STRETCH BLK
9340 SANTA CRUZ CLASSIC DOT FLEXFIT FITTED STRETCH B/G
9342 SANTA CRUZ OTHER DOT TRUCKER MESH WHITE/BLACK
9343 SANTA CRUZ OPUS TRUCKER MESH HAT WHT/BLK
9346 SANTA CRUZ SC Block 2 Flex Fit Hat BLK
22541 SANTA CRUZ SIEBEN HAND S/S T SHIRT WHITE
22542 SANTA CRUZ SIEBEN HAND S/S T SHIRT BLACK
22543 SANTA CRUZ DRESSEN HAND S/S T SHIRT BLACK
22545 SANTA CRUZ SIEBEN HAND S/S T SHIRT WHITE
36753 SANTA CRUZ KEN TAYLOR HAND WHITE