SQL:
SELECT F.ID as CAMPAIGNID, PR.STOCKPRICE
FROM STOCKPRICE PR
LEFT JOIN STOCKPRICEFROMBETWEENDATE F
ON
PR.STOCKID = F.STOCKID AND
F.ISDELETED = "Hayır" AND
F.FINISHDATE > "2024-10-10" AND
F.ID = (
SELECT MAX(s.ID)
FROM STOCKPRICEFROMBETWEENDATE s
WHERE s.STOCKID=F.STOCKID)
WHERE
-- PR.MONEYUNIT = "TL" AND
PR.STOCKID = AND
PR.ISDELETED = "Hayır" AND
PRICEKIND = "Satış" AND
(CASE WHEN F.PRICENAME IS NULL THEN PR.PRICENAME = "ÖZEL" ELSE PR.PRICENAME = F.PRICENAME END)
LIMIT 1
SQL Error: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AND
PR.ISDELETED = "Hayır" AND
PRICEKIND ...' at line 15
0,00 TL
0,00 TL KDV Hariç
Kodu :