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

Interview Question

Performance Engineer Interview San Francisco, CA (US)

sql query to find count of students having same last name


Interview Answer

4 Answers


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

niks on 6 Oct 2013

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

easiest on 20 Mar 2014

Select lastname, count(*) as lastnamecount from students group by lastname having count(*)>1

Anonymous on 23 Sep 2018

Should I expect python questions as well?

Wondering have you tried Rooftop Slushie for prep?

Anonymous on 10 Jun 2019

Add Answers or Comments

To comment on this, Sign In or Sign Up.