Interview Question for Quality Assurance Engineers


Country: India
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
4
of 4 vote

create table t1(id int, name varchar(20))
create table t2(id int,name varchar(20))
insert into t1 values(1,'abc')
insert into t2 values(1,'abc')
insert into t2 values(2,'abc')
insert into t1 values(3,'abc')

select t2.* from t2 left join t1 on t1.id = t2.id where t1.id is null

- Ayushi Ag June 08, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

{sel * from test_vinod t2
where t2.id not in
(sel tv.id from test_vinod tv
join test_vinod_1 tv1 on tv.id = tv1.id)}

- vinod June 18, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

-- Without using Join
select * 
from testDept
where DeptId NOT IN (select distinct DeptId from testEmp)

-- With Join
select td.DeptId, td.DeptName
from testDept td left join testEmp te
on td.DeptId = te.DeptId
where te.DeptId is null

- Niraj September 05, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

create table A
( id int,
  name text
 );


insert into A values(1,'aa');
insert into A values(2,'aaa');
insert into A values(3,'aaaa');

create table B
( id int,
  name text
 );


insert into B values(3,'bb');
insert into B values(4,'bbb');
insert into B values(5,'bbbb');

Query:

select B.* from B
left outer join A
on B.id = A.id where A.name is null ;

OUTPUT:
ID	NAME
4	bbb
5	bbbb

- Sunil August 22, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

How about

select distinct B.id,B.name
from B join A on B.id<>A.id

- no July 22, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Select distinct B.id
from B join A on B.id<>A.id

- Anonymous July 22, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

SELECT B.data
FROM A LEFT OUTER JOIN B
ON A.key = B.key
WHERE B.data ISNULL

- Eric March 28, 2016 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

select * from B where B.name not in(select A.name from A left outer join B where A.id=B.id)

- kranti Ingale November 14, 2016 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

SELECT t2.* FROM t2 MINUS SELECT t1.* FROM t1;

- AP August 22, 2018 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More