select * from emp group by eno having sal > 5000
select EMPNO, EMPNAME, min(salary) AS SALARY from emp group by empno,empname having min(salary) > 5000
SELECT EmployeeNo, EmployeeName, MIN(Salary) AS Salary FROM EMPLOYEE GROUP BY EmployeeNo, EmployeeNameHAVING MIN(Salary) > 5000
Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.
Copyright ©2003-2010 CoolInterview.com, All Rights Reserved. Privacy Policy | Terms and Conditions Page URL: http://www.coolinterview.com/interview/14958/default.asp?cachecommand=bypass