Skip to content
Advertisement

Is there any other way to extract the number of exam?

Hello everyone I have a problem that I need help with I’m trying to get number of exam for specified student

we have three tables :

so basically students with the same class means they have the same filiere and the same Nom_semestre

I tried this query :

but the result was not like I expected it shows two result of the same student with N_APPOGE='1610065' and multiple result for other student as well

It looks like DISTINCT in this case does not work what’s the solution here ?

Advertisement

Answer

You have a join between etudiant and module, but in the WHERE clause there is nothing which specifies how these two tables are related. As such, the database is performing a cross join (each row in the first table is joined to each row in the second table). Apparently you need to get the table inscrit involved:

Hopefully that will help.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement