q2 = session.query(Supplier.s_acctbal, Supplier.s_name, Nation.n_name,
Part.p_partkey, Part.p_mfgr,
Supplier.s_address, Supplier.s_phone,
Supplier.s_comment).filter(Part.p_partkey == Partsupp.ps_partkey,
Supplier.s_suppkey== Partsupp.ps_suppkey, Part.p_size == 15,
Part.p_type.like('%BRASS'),
Supplier.s_nationkey == Nation.n_nationkey,
Nation.n_regionkey == Region.r_regionkey,
Region.r_name == 'Europe', Partsupp.ps_supplycost ==
(session.query(func.min(Partsupp.ps_supplycost)
).filter(Part.p_partkey == Partsupp.ps_partkey,
Supplier.s_suppkey == Partsupp.ps_suppkey,
Supplier.s_nationkey == Nation.n_nationkey,
Nation.n_regionkey == Region.r_regionkey, Region.r_name ==
'EUROPE')).correlate(Partsupp, Supplier, Nation,
Region)).order_by(Supplier.s_acctbal.desc(),
Nation.n_name, Supplier.s_name, Part.p_partkey).limit(100)
If thats what you meant, I tried it, but it gives me the same error :(
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.