Follow Now on Insta

Frequently asked basic and complex SQL database queries

Here is the list of SQL (Oracle SQL database queries) interviews questions, I asked in recent interviews.

Q. How to Delete duplicate rows using a single statement and no table creation in sql database queries?

Q. Identify the second highest salary from EMP table having salary related data.
Q. Statement to determine the oracle version used.
Q. Query to accept a date and return the fist date of the quarter in which the date exists.
Q. Table A has 100 rows, Table B has Zero rows so number of rows returned from below query select a.* from a, b; Set of statements executed in the below sequence. select count(*) from a; Count(*) ------- 100 Then 1 row inserted in table a.
Frequently asked basic and complex SQL database queries
Sql databse
rollback; again 3 rows inserted in the table a; select count(*) from a; count(*) -------- 103 create table b using select * from a; rollback; so what would be the o/p of below select statement select count(*) from a; ?
Q. Statement to print numbers from 1 to 100 in sequence. Q. Create a table with no rows structure similar to existing table using an SQL statement. Q. Few queries related to analytical functions. lead, lag, rank, dense_rank Table Employees
NAME GENDER ---- ------ A MALE B FEMALE BB FEMALE CC FEMALE CD MALE DD MALE DE FEMALE Q. Write a query to give the o/p like below MALE FEMALE ---- ------ 3 4

Q. Give examples of when you last used analytic functions and why and also what are analytical functions in sql database queries ?

Q. Give examples of when you last used recursive queries and why in SQL database queries?
Q. How do you use SQL to check for data quality when you are using SQL database queries?
Q. How do you know that your SQL performs well ?
Q. How do you measure your SQL performance for SQL database queries?
Q. When your SQL does not perform well what do you think about and what do you do to improve performance?
Q. How do you feel about joins in SQL database queries ?
Q. How often do you use sub queries in SQL database queries ?
Q. When do you think your SQL has too many lines of code?
Q. What kinds of data models have you written SQL against ?
Q. How much does your SQL change across different data models ?
These were the questions asked by me during interviews. You can find out answers for all these before you go to SQL DATABASE QUERIES interview

Post a Comment