Quantcast
Channel: MarsHut
Viewing all articles
Browse latest Browse all 6551

Need help writing subquery with SQLAlchemy

$
0
0
Hello,

I am using SQLAlchemy 0.9.4 and I'm having trouble passing this query +
subquery to SQLAlchemy:

SELECT id_tipo_espectaculo,nombre,descripcion FROM tipo_espectaculo
WHERE (SELECT COUNT (*) FROM subtipo_espectaculo
WHERE subtipo_espectaculo.id_tipo_espectaculo =
tipo_espectaculo.id_tipo_espectaculo) > 0

I've seen a few examples in Stack Overflow, but they have a completely
different logic from what I'm doing, so I'm kind of lost.

Viewing all articles
Browse latest Browse all 6551

Trending Articles