Salesforce Interview Question: sql query to find count of st... | Glassdoor

Interview Question

Performance Engineer Interview San Francisco, CA

sql query to find count of students having same last name


Interview Answer

2 Answers


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

niks on Oct 6, 2013

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.