

This is my first plunge into nested statements and I think I am already over my head. I keep getting: 'Every derived table must have its own alias ' Help - SELECT isassignedto.id, employee.lastname, alldocuments.name FROM employee INNER JOIN isassignedto ON isassignedto.employeeid employee.id INNER JOIN ( SELECT FROM ( SELECT FROM (SELECT lead.id AS id, lead. So where do I put the alias or is my nested syntax completely wrong and I am getting the wrong error message? Is the above location acceptable for an ORDER BY to sort the final results by account?Īny help is appreciated. Every derived table must have its own alias Posted by: Daniel Falci Date: 07:10AM I have the following query : select count (op) from ( select webeventoatendimento.idweboperacao as op, webeventoatendimento. GROUP BY AcctWithout the nested select and final GROUP BY, the inner select/union works but it returns the same accounts twice when they exist in both the current and old tables and I only want one sum for each account.

GROUP BY OldLines.Acct ) ) 'tried alias t1 inside and outside each ')'
