where to fix my sql query to export the image path for PrestaShop using "large\_default"

SELECT p.id\_product, p.active, pl.name AS 'Name',
 GROUP\_CONCAT(DISTINCT(cl.name) SEPARATOR ',') AS 'Categories (x,y,z...)',
 p.price AS 'Price tax excluded or Price tax included',
 p.id\_tax\_rules\_group AS 'Tax rules ID',
 p.wholesale\_price AS 'Wholesale price',
 p.on\_sale AS 'On sale (0/1)',
 IF(pr.reduction\_type = 'amount', pr.reduction, '') AS 'Discount amount',
 IF(pr.reduction\_type = 'percentage', pr.reduction, '') AS 'Discount percent',
 pr.from AS 'Discount from (yyyy-mm-dd)',
 pr.to AS 'Discount to (yyyy-mm-dd)',
 p.reference AS 'Reference #',
 p.supplier\_reference AS 'Supplier reference #',
 ps.name AS 'Supplier',
 pm.name AS 'Manufacturer',
 p.ean13 AS 'EAN13',
 p.upc AS 'UPC',
 p.ecotax AS 'Ecotax',
 p.width AS 'Width',
 p.height AS 'Height',
 p.depth AS 'Depth',
 p.weight AS 'Weight',
 sa.quantity as 'Quantity',
 p.minimal\_quantity AS 'Minimal quantity',
 'both' AS 'Visibility',
 p.additional\_shipping\_cost AS 'Additional shipping cost',
 p.unity AS 'Unity',
 p.unit\_price\_ratio AS 'Unit price',
 pl.description\_short AS 'Short description',
 pl.description AS 'Description',
 IF(t.name IS NOT NULL, GROUP\_CONCAT(DISTINCT(t.name) SEPARATOR ','), '') AS 'Tags (x,y,z...)',
 pl.meta\_title AS 'Meta title',
 pl.meta\_keywords AS 'Meta keywords',
 pl.meta\_description AS 'Meta description',
 pl.link\_rewrite AS 'URL rewritten',
 pl.available\_now AS 'Text when in stock',
 pl.available\_later AS 'Text when backorder allowed',
 p.available\_for\_order AS 'Available for order (0 = No, 1 = Yes)',
 '' AS 'Product available date',
 p.date\_add 'Product creation date',
 p.show\_price AS 'Show price (0 = No, 1 = Yes)',
CONCAT('https://',
 -- get the shop domain
 IFNULL(conf.value, 'undefined\_domain'),
 -- the path to the pictures folder
 '/img/p/',
 -- now take all the digits separetly as MySQL doesn't support loops in SELECT statements
 -- assuming we have smaller image id than 100'000 ;)
 IF(CHAR\_LENGTH(pi.id\_image) >= 5, 
 -- if we have 5 digits for the image id
 CONCAT(
 -- take the first digit
 SUBSTRING(pi.id\_image, -5, 1),
 -- add a slash
 '/'),
 ''),
 -- repeat for the next digits
 IF(CHAR\_LENGTH(pi.id\_image) >= 4, CONCAT(SUBSTRING(pi.id\_image, -4, 1), '/'), ''),
 IF(CHAR\_LENGTH(pi.id\_image) >= 3, CONCAT(SUBSTRING(pi.id\_image, -3, 1), '/'), ''),
 if(CHAR\_LENGTH(pi.id\_image) >= 2, CONCAT(SUBSTRING(pi.id\_image, -2, 1), '/'), ''),
 IF(CHAR\_LENGTH(pi.id\_image) >= 1, CONCAT(SUBSTRING(pi.id\_image, -1, 1), '/'), ''),
 -- add the image id
 pi.id\_image,
 -- put the image extension
 '.jpg') as image\_url,
CONCAT('https://',
 -- get the shop domain
 IFNULL(conf.value, 'undefined\_domain'),
 -- the path to the pictures folder
 '/img/p/',
 -- now take all the digits separetly as MySQL doesn't support loops in SELECT statements
 -- assuming we have smaller image id than 100'000 ;)
 IF(CHAR\_LENGTH(pi2.id\_image) >= 5, 
 -- if we have 5 digits for the image id
 CONCAT(
 -- take the first digit
 SUBSTRING(pi2.id\_image, -5, 1),
 -- add a slash
 '/'),
 ''),
 -- repeat for the next digits
 IF(CHAR\_LENGTH(pi2.id\_image) >= 4, CONCAT(SUBSTRING(pi2.id\_image, -4, 1), '/'), ''),
 IF(CHAR\_LENGTH(pi2.id\_image) >= 3, CONCAT(SUBSTRING(pi2.id\_image, -3, 1), '/'), ''),
 if(CHAR\_LENGTH(pi2.id\_image) >= 2, CONCAT(SUBSTRING(pi2.id\_image, -2, 1), '/'), ''),
 IF(CHAR\_LENGTH(pi2.id\_image) >= 1, CONCAT(SUBSTRING(pi2.id\_image, -1, 1), '/'), ''),
 -- add the image id
 pi2.id\_image,
 -- put the image extension
 '.jpg') as image\_url2,
 0 AS 'Delete existing images (0 = No, 1 = Yes)',
 GROUP\_CONCAT(DISTINCT(CONCAT((fl.name), ':', (fvl.value), ':0')) SEPARATOR ',') AS 'Feature (Name:Value:Position)',
 p.online\_only AS 'Available online only (0 = No, 1 = Yes)',
 p.condition AS 'Cond',
 0 AS 'Customizable (0 = No, 1 = Yes)',
 0 AS 'Uploadable files (0 = No, 1 = Yes)',
 0 AS 'Text fields (0 = No, 1 = Yes)',
 p.out\_of\_stock as 'Out of stock',
 '1' AS 'ID',
 null AS 'Action when out of stock',
 null AS 'Depends on stock',
 null AS 'Warehouse'
FROM ps\_product p

LEFT JOIN ps\_product\_lang pl ON(p.id\_product = pl.id\_product)
LEFT JOIN ps\_category\_product cp ON(p.id\_product = cp.id\_product)
LEFT JOIN ps\_category\_lang cl ON(cp.id\_category = cl.id\_category)

LEFT JOIN ps\_specific\_price pr ON(p.id\_product = pr.id\_product)
LEFT JOIN ps\_product\_tag pt ON(p.id\_product = pt.id\_product)
LEFT JOIN ps\_tag t ON(pt.id\_tag = t.id\_tag)
LEFT JOIN ps\_image pi ON(p.id\_product = pi.id\_product and pi.cover = 1)
LEFT JOIN ps\_image pi2 ON(p.id\_product = pi2.id\_product and pi2.position = 2)
LEFT JOIN ps\_manufacturer pm ON(p.id\_manufacturer = pm.id\_manufacturer)
LEFT JOIN ps\_supplier ps ON(p.id\_supplier = ps.id\_supplier)
LEFT JOIN ps\_configuration conf ON conf.name = 'PS\_SHOP\_DOMAIN'
LEFT JOIN ps\_feature\_product fp ON p.id\_product = fp.id\_product
LEFT JOIN ps\_feature\_lang fl ON fp.id\_feature = fl.id\_feature
LEFT JOIN ps\_feature\_value\_lang fvl ON fp.id\_feature\_value = fvl.id\_feature\_value
LEFT JOIN ps\_feature f ON fp.id\_feature = f.id\_feature
LEFT JOIN ps\_feature\_value fv ON fp.id\_feature\_value = fv.id\_feature\_value
LEFT JOIN ps\_stock\_available sa ON (p.id\_product = sa.id\_product)
WHERE pl.id\_lang = 1
AND cl.id\_lang = 1
GROUP BY p.id\_product;
"large\_default"를 사용하여 PrestaShop의 이미지 경로를 내보내도록 SQL 쿼리를 수정하는 위치SELECT p.id\_product, p.active, pl.name AS 'Name', GROUP\_CONCAT(DISTINCT(cl.name) SEPARATOR ',') AS '카테고리 (x,y,z...)', p.price AS '부가세 제외 가격 또는 부가세 포함 가격', p.id\_tax\_rules\_group AS '세금 규칙 ID', p.wholesale\_price AS '도매 가격', p.on\_sale AS '세일 중(0/1)', IF(pr.reduction\_type = '금액', pr.reduction, '') AS '할인 금액', IF(pr.reduction\_type = 'percentage', pr.reduction, '') AS '할인율', pr.from AS '할인일 (yyyy-mm-dd)', pr.to AS '할인 기간 (yyyy-mm-dd)', p.reference AS '참조 번호', p.supplier\_reference AS '공급업체 참조 #', ps.name AS '공급업체', pm.name AS '제조업체', p.ean13 AS 'EAN13', p.upc AS 'UPC', p.ecotax AS 'Ecotax', p.width AS '너비', p.height AS '높이', p.depth AS '깊이', p.weight AS '무게', sa.quantity AS '수량', p.minimal\_quantity AS '최소 수량', 'both' AS '가시성', p.additional\_shipping\_cost AS '추가 배송비', p.unity AS '유니티', p.unit\_price\_ratio AS '단가', pl.description\_short AS '간단한 설명', pl.description AS '설명', IF(t.name IS NOT NULL, GROUP\_CONCAT(DISTINCT(t.name) SEPARATOR ','), '') AS '태그 (x,y,z...)', pl.meta\_title AS '메타 제목', pl.meta\_keywords AS '메타 키워드', pl.meta\_description AS '메타 설명', pl.link\_rewrite AS 'URL 재작성', pl.available\_now AS '재고가 있을 때 텍스트', pl.available\_later AS '이월 주문 허용시 텍스트', p.available\_for\_order AS '주문 가능 (0 = 아니오, 1 = 예)', '' AS '제품 주문 가능 날짜', p.date\_add '제품 생성 날짜', p.show\_price AS '가격 표시 (0 = 아니요, 1 = 예)',CONCAT('https://', -- 상점 도메인 가져오기 IFNULL(conf.value, 'undefined\_domain'), -- 사진 폴더 경로 '/img/p/', -- 이제 MySQL은 SELECT 문에서 루프를 지원하지 않으므로 모든 숫자를 개별적으로 가져옵니다. -- 이미지 ID가 100'000보다 작다고 가정합니다.) IF(CHAR\_LENGTH(pi.id\_image) >= 5,  -- 이미지 ID에 5자리 숫자가 있는 경우 CONCAT( -- 첫 번째 숫자를 가져옵니다. SUBSTRING(pi.id\_image, -5, 1), -- 슬래시 추가 '/'), ''), -- 다음 자릿수에 대해 반복 IF(CHAR\_LENGTH(pi.id\_image) >= 4, CONCAT(SUBSTRING(pi.id\_image, -4, 1), '/'), ''), IF(CHAR\_LENGTH(pi.id\_이미지) >= 3, CONCAT(SUBSTRING(pi.id\_이미지, -3, 1), '/'), ''), if(CHAR\_LENGTH(pi.id\_이미지) >= 2, CONCAT(SUBSTRING(pi.id\_이미지, -2, 1), '/'), ''), ''), IF(CHAR\_LENGTH(pi.id\_이미지) >= 1, CONCAT(SUBSTRING(pi.id\_이미지, -1, 1), '/'), ''), -- 이미지 아이디 추가 pi.id\_image, -- 이미지 확장자 넣기 '.jpg')를 이미지\_url로 설정합니다,CONCAT('https://', -- 상점 도메인 가져오기 IFNULL(conf.value, 'undefined\_domain'), -- 사진 폴더 경로 '/img/p/', -- 이제 MySQL은 SELECT 문에서 루프를 지원하지 않으므로 모든 숫자를 개별적으로 가져옵니다. -- 이미지 ID가 100'000보다 작다고 가정합니다.) IF(CHAR\_LENGTH(pi2.id\_image) >= 5,  -- 이미지 ID에 5자리 숫자가 있는 경우 CONCAT( -- 첫 번째 숫자를 가져옵니다. SUBSTRING(pi2.id\_image, -5, 1), -- 슬래시 추가 '/'), ''), -- 다음 자릿수에 대해 반복 IF(CHAR\_LENGTH(pi2.id\_image) >= 4, CONCAT(SUBSTRING(pi2.id\_image, -4, 1), '/'), ''), IF(CHAR\_LENGTH(pi2.id\_image) >= 3, CONCAT(SUBSTRING(pi2.id\_image, -3, 1), '/'), ''), if(CHAR\_LENGTH(pi2.id\_image) >= 2, CONCAT(SUBSTRING(pi2.id\_image, -2, 1), '/'), ''), IF(CHAR\_LENGTH(pi2.id\_이미지) >= 1, CONCAT(SUBSTRING(pi2.id\_이미지, -1, 1), '/'), ''), -- 이미지 ID 추가 pi2.id\_image, -- 이미지 확장자 넣기 '.jpg')를 image\_url2로, 0 AS '기존 이미지 삭제(0 = 아니요, 1 = 예)', GROUP\_CONCAT(DISTINCT(CONCAT((fl.name), ':', (fvl.value), ':0')) SEPARATOR ',') AS '기능(이름:값:위치)', p.online\_only AS '온라인에서만 사용 가능(0 = 아니요, 1 = 예)', p.condition AS 'Cond', 0 AS '사용자 지정 가능(0 = 아니요, 1 = 예)', 0 AS '업로드 가능한 파일 (0 = 아니요, 1 = 예)', 0 AS '텍스트 필드 (0 = 아니요, 1 = 예)', p.out\_of\_stock을 '품절'로, '1' AS 'ID', null AS '품절시 조치', null AS '재고에 따라 다름', null AS '창고'FROM ps\_product pLEFT JOIN ps\_product\_lang pl ON(p.id\_product = pl.id\_product)LEFT JOIN ps\_category\_product cp ON(p.id\_product = cp.id\_product)LEFT JOIN ps\_category\_lang cl ON(cp.id\_category = cl.id\_category)LEFT JOIN ps\_specific\_price pr ON(p.id\_product = pr.id\_product)LEFT JOIN ps\_product\_tag pt ON(p.id\_product = pt.id\_product)LEFT JOIN ps\_tag t ON(pt.id\_tag = t.id\_tag)LEFT JOIN ps\_image pi ON(p.id\_product = pi.id\_product 및 pi.cover = 1)LEFT JOIN ps\_image pi2 ON(p.id\_product = pi2.id\_product 및 pi2.position = 2)LEFT JOIN ps\_manufacturer pm ON(p.id\_manufacturer = pm.id\_manufacturer)LEFT JOIN ps\_공급업체 ps ON(p.id\_공급업체 = ps.id\_공급업체)LEFT JOIN ps\_configuration conf ON conf.name = 'PS\_SHOP\_DOMAIN'LEFT JOIN ps\_feature\_product fp ON p.id\_product = fp.id\_productLEFT JOIN ps\_feature\_lang fl ON fp.id\_feature = 