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 =393
)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 15:11:30')
AND p.product_id IN (SELECT product_id FROM dtb_product_categories WHERE category_id = 447)
AND pc.del_flg = 0
GROUP BY p.product_id
ORDER BY p.update_date DESC
LIMIT 0, 25
61271 Zephyren 2022 NEW YEAR BAG
59872 NEMOPHILA×ZEPHYREN×GEKIROCK CLOTHING コラボ・パーカー
59434 Zephyren(ゼファレン) PARKA - MY FIRST STORY 10th Anniversary - GRAY
59435 Zephyren(ゼファレン) PARKA - MY FIRST STORY 10th Anniversary - KHAKI
59433 Zephyren(ゼファレン) PARKA - MY FIRST STORY 10th Anniversary - BLACK
59543 Zephyren(ゼファレン) PAISLEY PARKA BLACK
59546 Zephyren(ゼファレン) PAISLEY PARKA RED
57102 Zephyren 2021 NEW YEAR BAG
55107 Zephyren(ゼファレン)ZIP PARKA - POWER OF WILL - BLACK
55106 Zephyren(ゼファレン)ZIP PARKA - POWER OF WILL - WHITE
55098 Zephyren(ゼファレン)ZIP PARKA - As above,So below - WHITE
55099 Zephyren(ゼファレン)ZIP PARKA - As above,So below - BLACK
15231 ZEPHYREN (ゼファレン) ZIP PARKA -SKULL HEAD- BLK
15232 ZEPHYREN (ゼファレン) ZIP PARKA -Skull head- BLK×BGN
15233 ZEPHYREN (ゼファレン) ZIP PARKA -Skull head- GRY
15235 ZEPHYREN (ゼファレン) PARKA -Script- BLK
15238 ZEPHYREN (ゼファレン) PARKA -Script- NVY
15645 ZEPHYREN (ゼファレン) ZIP PARKA -Determination- BLK
15646 ZEPHYREN (ゼファレン) ZIP PARKA -Determination- BLK×BGN
15649 ZEPHYREN (ゼファレン) PARKA -Determination- BLK
15651 ZEPHYREN (ゼファレン) PARKA -Determination- GRY
15971 ZEPHYREN (ゼファレン) PARKA -NEVER DESPAIR- BLK
16840 ZEPHYREN (ゼファレン) ZIP PARKA -THE SUN- BLACK
16841 ZEPHYREN (ゼファレン) ZIP PARKA -THE SUN- BLK/BGN
16842 ZEPHYREN (ゼファレン) ZIP PARKA -THE SUN- GRAY