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-30 18:18:00')
AND pc.classcategory_id1 IN( 14,61,35)
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
LIMIT 0, 25
18308 PUNK DRUNKERS CITY. TEE WHITE
7545 PUNK DRUNKERS タイガーポケットTEE WHITE/PINK
10999 PUNK DRUNKERS 車のライトTEE MINT
11944 PUNK DRUNKERS xおぼっちゃまくん ちゃまごTEE B.GREEN
11948 PUNK DRUNKERS 秘密の集団TEE GREEN
11950 PUNK DRUNKERS O.F.TEE05.2014 LAVENDER
12703 PUNK DRUNKERS 驚愕ヒーローTEE WHITE/BLACK
12955 PUNK DRUNKERS NEED TEE WHITE
13314 PUNK DRUNKERS MADBALLSめーいっぱいTEE EMERALD
13316 PUNK DRUNKERS MADBALLSコミックTEE GRAY
15607 PUNK DRUNKERS ぐるぐるあいつTEE CHOCOLATE
15608 PUNK DRUNKERS O.F.TEE06.2015 BLACK
15609 PUNK DRUNKERS O.F.TEE06.2015 CHOCOLATE
15610 PUNK DRUNKERS O.F.TEE06.2015 BURGUNDY
16800 PUNK DRUNKERS 【PDSx四星球】 妖怪TEE FOREST
17557 PUNK DRUNKERS さかなTEE BLACK
17562 PUNK DRUNKERS スーパーヒーローTEE WHITE
17563 PUNK DRUNKERS スーパーヒーローTEE LIME
17886 PUNK DRUNKERS BIG BONUS TEE GRAY
18032 四星球 『もはや…』tour Tシャツ
18302 PUNK DRUNKERS あいつベアーTEE カラフル
18303 PUNK DRUNKERS あいつベアーTEE GREEN
18304 PUNK DRUNKERS 【PDSxおそ松くん】イヤミとあいつTEE WHI
18306 PUNK DRUNKERS 【PDSxUpset heroes!】Upset heroes!TEE
18310 PUNK DRUNKERS なまけものTEE P.GREEN