Commit 9e7373dd authored by Marine Marsal's avatar Marine Marsal
Browse files

Update StatistiquesDataMapper.py correction pret

parent 8ef7ac26
......@@ -139,7 +139,7 @@ class StatistiquesDataMapper(DataMapper):
conn = self.connect()
try:
cursor : psycopg2.extensions.cursor = conn.cursor()
sql1 = "SELECT AVG(duree) FROM Pret ORDER BY AVG(duree) DESC"
sql1 = "SELECT AVG(p.duree) FROM Pret p ORDER BY AVG(p.duree) DESC"
cursor.execute(sql1)
duree = cursor.fetchone()
return duree[0]
......@@ -165,7 +165,7 @@ class StatistiquesDataMapper(DataMapper):
conn = self.connect()
try:
cursor : psycopg2.extensions.cursor = conn.cursor()
sql1 = "SELECT MAX(duree) FROM Pret ORDER BY MAX(duree) DESC"
sql1 = "SELECT MAX(p.duree) FROM Pret p ORDER BY MAX(p.duree) DESC"
cursor.execute(sql1)
durees = cursor.fetchall()
return durees
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment