Skip to content
Advertisement

sqlite query python

i want to perform the below query

but i got this error!

please how can i solve the problem ?

Advertisement

Answer

The subquery can’t access the aliased column cnt of the outer query.
But even if it did have accesss, another error would be thrown because the subquery may return more than 1 rows.
I think that you can do what you want with window functions and GROUP_CONCAT():

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