salve a tutti. sto cercando di fare una query che permetta di elencare tutti i venditori che hanno venduto più di 100 beni in una transazione nell’ultimo anno.
SELECT v.RagioneSociale, t.QuantitaBene
FROM Venditore v, Transazione t
WHERE t.DataAcquisto >= DATE_SUB (CURDATE, INTERVAL 365 DAY)
AND t.RagioneSociale >100
eppure mi sembra che sintatticamente è corretta! invece mi da qst'errore
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND t.RagioneSociale >100) LIMIT 0, 30' at line 3
uso phpmyadmin
perchè secondo voi? ho provato anche a modificare le parentesi ma niente

Rispondi quotando