Re: [firebird-support] Re: Off-Topic: Firebird future

2019-10-14 Thread Hamish Moffatt ham...@risingsoftware.com [firebird-support]
On 14/10/19 5:17 am, pablo sanchez pab...@adinet.com.uy [firebird-support] wrote: I prefer to connect over vpn/ssh to remote sites and run Flamerobin from my pc. I have all customer connections together, which is very convenient for me . It's convenient, but Firebird (2.5 at least) is *very*

[firebird-support] Re: Why this SQL is correct?

2019-10-14 Thread ma_go...@yahoo.com [firebird-support]
OK, I understand now. Thank you.

Re: [firebird-support] Re: Why this SQL is correct?

2019-10-14 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
14.10.2019 13:10, ma_go...@yahoo.com [firebird-support] wrote: > So HAVING condition is evaluated for EACH ROW instead of just on the group? No. But value of parameter for aggregate function (in your example MAX) is evaluated for each row. -- WBR, SD.

[firebird-support] Re: Why this SQL is correct?

2019-10-14 Thread ma_go...@yahoo.com [firebird-support]
So HAVING condition is evaluated for EACH ROW instead of just on the group? I think then the current approach is wrong in the engine. http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt "2) The is applied to each group of

Re: [firebird-support] Why this SQL is correct?

2019-10-14 Thread Dimitry Sibiryakov s...@ibphoenix.com [firebird-support]
14.10.2019 11:47, ma_go...@yahoo.com [firebird-support] wrote: > In the subselect p.proj_id should not be accepted - group does not contains > it, and has no > aggregate on it. What value the engine choose when it runs, and why? Current one. The subquery is executed for each record of master

[firebird-support] Why this SQL is correct?

2019-10-14 Thread ma_go...@yahoo.com [firebird-support]
Hi! SELECT e.emp_no FROM employee e JOIN employee_project p ON p.emp_no = e.emp_no GROUP BY e.emp_no HAVING MAX((SELECT SUM(e2.salary) FROM employee e2 JOIN employee_project p2 ON p2.emp_no = e2.emp_no WHERE