>Hi Fabio,
>
>The third select isn't equivalent to the first two because it has GROUP BY clause. It doesn't matter what you're grouping on. Here's MS SQL Server equivalent of the third query and it produces the same result as VFP
SELECT fa, COUNT(*) FROM (SELECT 1 AS FA, * FROM TT) dt1 GROUP BY fa
Hi Sergey, what you say is correct if an only if
"group by" is done into (1) x (TT) set.
but then a problem exists.
Next can to be done if and only if the implict "group by 0"
it is done into (TT) and only
after ! it is done (1)x(GROUP BY(TT))
SELECT 1 FA,COUNT(*) FB FROM TT
Then another issue it is open:
"group by" it changes the set where work based on the select expression,
and this creates an ambiguity in the expression of the relational calculation.
I task that it is this the reason for which the MSSQL not allow
to group a external columns to the set.
I remain not convinced.
I prefer a homogenous behavior.
Fabio