Salesforce

  www.salesforce.com
  www.salesforce.com

Interview Question

Performance Engineer Interview San Francisco, CA

sql query to find count of students having same last name

Answer

Interview Answer

2 Answers

0

select * from Students where lastName in (select s1.lastName from Students s1 group by s1.lastName having count(*)>1);

niks on Oct 6, 2013
0

select count(LastName) from employees group by LastName having count(*)>1

easiest on Mar 20, 2014

Add Answers or Comments

To comment on this, Sign In or Sign Up.