Correlated Subquery

Ivan Smahin ivan_smahin at paradigmasoft.com
Tue Feb 24 10:43:07 CST 2009


Hello Fabian,

Tuesday, February 24, 2009, 3:09:06 PM, you wrote:

> Hi,


> yesterday I read something in the wiki that correlated subqueries
> are allowed now and I saw an example. But I cannot find it anymore. 


> I want to to use something like

> select
> addresses.id as
> AID,addresses.type,addresses.searchcode,addresses.customernumber,
> (select sum(amount) from accounting where addressid = AID)

> from addresses

> to replace my current join query:

> select
> sum(amount) as amount,min(addresses.id) as id,min(addresses.type)
> as type,min(searchcode) as searchcode,,min(customernumber) as customernumber
> from accounting
> left outer join addresses on accounting.addressid = addresses.id 

> group by accounting.addressid



> Should'nt this work with valentina 4?

Seems it should work. Checking now


-- 
Best regards,
Ivan Smahin 
Senior Software Engineer
Paradigma Software, Inc
Valentina - The Ultra-Fast Database
http://www.valentina-db.com



More information about the Valentina mailing list