Skip to content
This repository was archived by the owner on Mar 16, 2026. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions DB/pyapp/retrieveFromTable.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,9 @@
with conexion:
with conexion.cursor() as cursor:
sentencia = '''
SELECT W1.city, W1.temp_lo AS low, W1.temp_hi AS high,
W2.city, W2.temp_lo AS low, W2.temp_hi AS high
FROM weather W1, weather W2
WHERE W1.temp_lo < W2.temp_lo
AND W1.temp_hi > W2.temp_hi;
SELECT *
FROM weather w, cities c
WHERE w.city = c.name;
'''
cursor.execute(sentencia)
registros = cursor.fetchall()
Expand Down