+ 2
SQL execute
I can t execute this request SELECT NOMOUVR FROM OUVRAGE, TARIFER, (SELECT MAX(PRIXVENTE) FROM TARIFER) AS R1 WHERE OUVRAGE.NUMOUVR=TARIFER.NUMOUVR AND TARIFER.PRIXVENTE=(SELECT MAX(PRIXVENTE) FROM TARIFER).PRIXVENTE they show me that i have an error in line 4 plz heeeeelp
5 Respostas
+ 3
The formatting in the posted text makes it hard to determine which line is line 4. I guess it is this line:
AND TARIFER.PRIXVENTE=(SELECT MAX(PRIXVENTE) FROM TARIFER).PRIXVENTE
Here I see a misplaced field name: "TARIFER).PRIXVENTE" should be "TARIFER)".
+ 3
We don't know your database, but I think there are more syntax error there. That's what you mean?
SELECT o.numouvr, max(t.prixvente)
FROM ouvrage o, tarifer t
WHERE o.numouvr = t.numouvr
AND o.prixvente = (SELECT max(t.prixvente) FROM tarifer)
+ 1
Akansha Srivastava this uses a valid form of query that is called Subbquery. You can learn more about it from this reference:
https://dev.mysql.com/doc/refman/8.0/en/subqueries.html
See also Derived Tables:
https://dev.mysql.com/doc/refman/8.0/en/derived-tables.html
- 1
select can't be used b/w a statement
- 1
whole statement is wrong