Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Login

Register Now

It will take less than 1 minute to register for lifetime. Bonus Tip - We don't send OTP to your email id Make Sure to use your own email id for free books and giveaways

Category : SQL

SQL related questions

Question
You are a part of a MNC and someone complains that their app is running slow because of what they think is a "database problem". How do you go about investigating the slowness and helping them to improve their queries? (Hint- You ...
in progress 2
55 years 1 Answer 1621 views Great Grand Master

Question
How to go about picking a good PARTITION key for a big table, and what are some of the "gotchas" of a badly chosen PARTITION key. It might seem to be simple, but you need to give a good explanation ...
1
55 years 0 Answers 1711 views Great Grand Master

Question
Name Gender X MALE XY FEMALE XYZ FEMALE Y MALE YZ FEMALE YZX MALE Z FEMALE The given table is a part of a larger table consisting data of people present in a meeting. This data needs to be sorted and the output should be like this, MALE FEMALE 3 4 Write the query accordingly.
in progress 0
55 years 1 Answer 1223 views Great Grand Master

Question
What is alternative for TOP clause in SQL? Anyone having knowledge of SQL is aware about TOP clause, but only a person with deep understanding can answer this question. (Hint-You might discuss various alternatives to get the same work done)
in progress 0
55 years 2 Answers 1122 views Great Grand Master

Question
Could you tell output or result of following SQL statements? (Hint- In some cases, there may be an error. So, try to locate them and answer accordingly) select 5 select ‘5’ select count (‘5’) select count (5) select count (*)
in progress 0
55 years 3 Answers 1187 views Great Grand Master

Question
empid empname managerid deptid Salary 1 Emp1 0 1 6000 2 Emp2 0 5 6000 3 Emp3 1 1 2000 13 Emp13 2 5 2000 11 Emp11 2 1 2000 9 Emp9 1 5 3000 8 Emp8 3 1 3500 7 Emp7 2 5 NULL 3 Emp3 1 1 2000 In the same table, some duplicate records might be present by mistake. Sort out a way to locate them and find a way to delete them.
in progress 2
55 years 4 Answers 1773 views Great Grand Master

Question
empid empname managerid deptid Salary 1 Emp1 0 1 6000 2 Emp2 0 5 6000 3 Emp3 1 1 2000 13 Emp13 2 5 2000 11 Emp11 2 1 2000 9 Emp9 1 5 3000 8 Emp8 3 1 3500 7 Emp7 2 5 NULL 3 Emp3 1 1 2000 Can you get the list of employees with the same salary? You just need to focus on a particular section of the table. (Hint- Try to be specific)
in progress 0
55 years 5 Answers 2025 views Great Grand Master

Question
empid empname managerid deptid Salary 1 Emp1 0 1 6000 2 Emp2 0 5 6000 3 Emp3 1 1 2000 13 Emp13 2 5 2000 11 Emp11 2 1 2000 9 Emp9 1 5 3000 8 Emp8 3 1 3500 7 Emp7 2 5 NULL 3 Emp3 1 1 2000 Can you get employee details whose department id is not valid or department id not present in the department table?
in progress 0
55 years 4 Answers 970 views Great Grand Master

Question
Refer to the following table and answer the questions related to it. empid empname managerid deptid Salary 1 Emp1 0 1 6000 2 Emp2 0 5 6000 3 Emp3 1 1 2000 13 Emp13 2 5 2000 11 Emp11 2 1 2000 9 Emp9 1 5 3000 8 Emp8 3 1 3500 7 Emp7 2 5 NULL 3 Emp3 1 1 2000   The Employee and manager id are in the same table. Is it possible to get the manager names for the corresponding employee? How will you proceed for the same?
in progress 1
55 years 3 Answers 1689 views Great Grand Master

Question
The following table consists of some data in the 7 rows 10/12 1a/90 23/11 2442 22/3c 11/43 dd/ss You can clearly see that the table is not uniform. In reality, this table should consist the data in the form of NN/NN. Verify that the first and last two characters ...
in progress 1
55 years 1 Answer 1337 views Great Grand Master