Subject Re: [firebird-support] Re: SQL Problem
Author Arno Brinkman

> I want to count all orders and customers and want the sum of all weights
> quantities.
> But weights and quantities should only be counted once per order.
> I thought this is a standard problem.
> I cannot use a view because joins and where clause is dynmacily created.

You're joining more tables then the two Customers and Orders tables?
Looking at you're query i understand you need only those two for these
results. Could you post the whole query?

> I would need a select on a select(temporary tables), but this seems not to
> be possible in Firebird.

What you want is derived tables, but that's indeed currently not supported.
(FB2.0 will have it).

Arno Brinkman

Firebird open source database (based on IB-OE) with many SQL-99 features :

Support list for Interbase and Firebird users :

Nederlandse firebird nieuwsgroep :