Complex Queries in SQL ( Oracle )


These questions are the most frequently asked in interviews.


1.To fetch ALTERNATE records from a table. (EVEN NUMBERED)

select * from emp where rowid in (select decode(mod(rownum,2),0,rowid, null) from emp);

2.To select ALTERNATE records from a table. (ODD NUMBERED)

select * from emp where rowid in (select decode(mod(rownum,2),0,null ,rowid) from emp);

3.Find the 3rd MAX salary in the emp table.

select distinct sal from emp e1 where 3 = (select count(distinct sal) from emp e2 where e1.sal <= e2.sal);

4.Find the 3rd MIN salary in the emp table.

select distinct sal from emp e1 where 3 = (select count(distinct sal) from emp e2where e1.sal >= e2.sal);

5.Select FIRST n records from a table.

select * from emp where rownum <= &n;

6.Select LAST n records from a table

Software Testing Methodologies



Software Testing Methodologies and Techniques You Should Know



This post lists and explains the most popular software testing methodologies and techniques that are important to know for all software testing.

AGILE SOFTWARE DEVELOPMENT


Agile development methods tend to promote teamwork and collaboration. The agile development process isn’t sequential (code, test, debug, release), like traditional development processes; nor is it iterative; it combines concepts of both.

Twelve principles underlie the Agile Manifesto, including:

Followers