SELECT SQL_CALC_FOUND_ROWS p.del_flg AS new_arrival_content, 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-28 00:36:14')
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 480, 120
53099 PUNK DRUNKERS [PDS×仮面ライダー]仮面ライダーゼロワンTEE INDIGO
53102 PUNK DRUNKERS [PDS×仮面ライダー]仮面ライダーゼロワンTEE WHITE
53988 PUNK DRUNKERS 2020BIG.TEE BLACK
53991 PUNK DRUNKERS ダブルベッドTEE BLACK
53992 PUNK DRUNKERS ダブルベッドTEE PURPLE
53996 PUNK DRUNKERS 聞こえないTEE'20 / REVIVAL - BLACK
54003 PUNK DRUNKERS ゲーマー少年TEE'20 / REVIVAL - D.PURPLE
54004 PUNK DRUNKERS ゲーマー少年TEE'20 / REVIVAL - SLATE
54005 PUNK DRUNKERS ステッカーTEE'20 / REVIVAL - WHITE
54006 PUNK DRUNKERS ステッカーTEE'20 / REVIVAL - M.GREEN
54064 PUNK DRUNKERS [PDSxくっきー!]ミスティTEE - BLACK
54065 PUNK DRUNKERS [PDSxくっきー!]ミスティTEE - KHAKI
54287 PUNK DRUNKERS[PDSx片桐仁]片桐あいつTEE - SUMI
54288 PUNK DRUNKERS[PDSx片桐仁]片桐あいつTEE - PURPLE
54291 PUNK DRUNKERS タイダイーズTEE - GREEN
54292 PUNK DRUNKERS タイダイーズTEE - PURPLE
54541 PUNK DRUNKERS [PDSxデラべっぴん]デラぱんくどTEE WHITE
54542 PUNK DRUNKERS [PDSxデラべっぴん]デラぱんくどTEE BLACK
54543 PUNK DRUNKERS REAL MONSTER.TEE BLACK
54544 PUNK DRUNKERS REAL MONSTER.TEE LIME
54545 PUNK DRUNKERS ポケットから女TEE BLACK
54546 PUNK DRUNKERS ポケットから女TEE LT.PINK
18308 PUNK DRUNKERS CITY. TEE WHITE