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 =1
)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 23:51:04')
AND pc.stock > 0
AND p.product_id IN (SELECT product_id FROM dtb_product_categories WHERE category_id = 664)
AND pc.del_flg = 0
GROUP BY p.product_id
ORDER BY MAX(price02)
LIMIT 0, 25
64257 RIPNDIP (リップンディップ) Lord Nermal Pocket Tee (Natural)
64267 RIPNDIP (リップンディップ) Lord Nermal Pocket Tee (Gray)
64262 RIPNDIP (リップンディップ) Nerm Cruiser Tee (Black Mineral Wash)
64264 RIPNDIP (リップンディップ) Abduction Tee (Black Mineral Wash)
64266 RIPNDIP (リップンディップ) Lord Nermal Pocket tee (Black Mineral Wash)
64306 RIPNDIP (リップンディップ) Lord Nermal Pocket Tee (Black)
64327 RIPNDIP (リップンディップ) Lord Nermal Pocket Tee (White)
66860 RIPNDIP (リップンディップ) Already Won Tee Charcoal
66861 RIPNDIP (リップンディップ) Caterpillar Garden Tee Black
65436 RIPNDIP (リップンディップ) High On Life Tee (Black Mineral Wash)
65438 RIPNDIP (リップンディップ) Power Tee (Black Mineral Wash)
65439 RIPNDIP (リップンディップ) The Unknown Tee (Purple Mineral Wash)
67842 RIPNDIP (リップンディップ) NERMA LISA POCKET TEE (LIGHT SLATE)
67881 RIPNDIP (リップンディップ) In the Clouds Tee Natural
67882 RIPNDIP (リップンディップ) Charanerm Tee Charcoal
67883 RIPNDIP (リップンディップ) You Love Me Tee Almond
67884 RIPNDIP (リップンディップ) Astroworld Tee Cornflower Blue
67886 RIPNDIP (リップンディップ) Great Wave Tee (Sage)
68478 RIPNDIP (リップンディップ) Peace Love RIPNDIP Tee BLACK
68479 RIPNDIP (リップンディップ) Nerminator 2.0 Tee BLACK
68529 RIPNDIP (リップンディップ) Lord Savior Nerm Tee BLACK
68538 RIPNDIP (リップンディップ) Lei’d Tee NATURAL
69592 RIPNDIP (リップンディップ) SUSHI NERM TEE (GREY)
70875 RIPNDIP(リップンディップ) LORD NERMAL POCKET TEE (BLACK LIGHTNING WASH)
70876 RIPNDIP(リップンディップ) TRAVIS TEE (NATURAL)