no...@null.net wrote:
> On Wed Oct 18, 2017 at 07:57:24PM +0200, Darko Volaric wrote:
>> select (SELECT ed from Tasks where task = 'QUOTE' and Pid = 1),
>> max(ed),target, sum(amt) from Tasks where Pid=1 group by target
>> HAVING amt > 0;
>
> When I first read that query I wondered if putting a query inside a
> select expression would execute it for each row.

Only correlated subqueries are executed for each row.  All other
subqueries are executed only once (when they are first needed).


Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to