Application development and sharing our knowledge to developer to developer for helping knowledge to build a effective solution for web architect.
Friday, October 25, 2013
How to: Use HAVING and WHERE Clauses in the Same Query in mysql,sql
select emp.name, sum(emp_sal.salary) as totalsalary from employee as emp left join employee_salary as emp_sal on emp.id=emp_sal.emp_idcountry='USA' GROUP by emp_sal.empid GROUP by emp_sal.empid HAVING totalsalary>1000
Subscribe to:
Posts (Atom)