Re: [sqlalchemy] Help translating query to sqlalchemy

2018-11-20 Thread jonathan . sandoval
Thanks. I initially tried with joins with queries similar to the one you showed, but it returns many rows per post with each tag. I wanted to get one post with the tags aggregated but I couldn't come up with a query that works. I asked for help and they gave me that query I showed but couldn't

Re: [sqlalchemy] Help translating query to sqlalchemy

2018-11-20 Thread Mike Bayer
On Tue, Nov 20, 2018 at 12:18 PM wrote: > > Thanks for the answer. The SQL does not need to be like that, my SQL > knowledge is basic and that was the solution a colleague gave me. I want to > get the posts with the tags in one query, but I couldn't figure a solution. if you're learning SQL the

Re: [sqlalchemy] Help translating query to sqlalchemy

2018-11-20 Thread jonathan . sandoval
Thanks for the answer. The SQL does not need to be like that, my SQL knowledge is basic and that was the solution a colleague gave me. I want to get the posts with the tags in one query, but I couldn't figure a solution. I tested what you suggested but I see my knowledge of sqlalchemy is still

Re: [sqlalchemy] Help translating query to sqlalchemy

2018-11-19 Thread Mike Bayer
On Mon, Nov 19, 2018 at 11:02 PM wrote: > > Hi everyone, > > I started with sqlalchemy a couple of weeks ago and I still have plenty to > learn. I'm trying to translate this query to the expression language, but I > have not been able to get what I need (right now I'm using text): the ARRAY() c

[sqlalchemy] Help translating query to sqlalchemy

2018-11-19 Thread jonathan . sandoval
Hi everyone, I started with sqlalchemy a couple of weeks ago and I still have plenty to learn. I'm trying to translate this query to the expression language, but I have not been able to get what I need (right now I'm using text): SELECT p.id, p.title, ( SELECT ARRAY(SELECT t.title FROM tags_post