InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
An ISP has a link of 100Mbps which is shared by its subscribers. Considering the fact that all of its subscribers are active 50% of the time and the probabilities of being active are independent, the ISP has promised 25 Mbps to its 6 subscribers. What is the probability that any subscriber gets degraded service (less than promised speed).(A) 1/32(B) 5/16(C) 1/2(D) 7/64 |
| Answer» | |
| 2. |
Consider a 3 game tournament between two teams. Assume that every game results in either a win or loss. The team that wins two or more games wins the series. The probability for wining the first game for both teams is 1/2. The probability for a team to win a game after a win is 2/3. The probability of wining a game after a loss is 1/3. Note that the effect of only previous game is considered. What is the probability for a team to win the series after loosing first game.(A) 1/9(B) 1/6(C) 2/9(D) 1/3 |
|
Answer» Answer: (C) Explanation: A team has 3 chances(games) to win tournament. = 2/9 |
|
| 3. |
Consider the following Employee tableID salary DeptName1 10000 EC2 40000 EC3 30000 CS4 40000 ME5 50000 ME6 60000 ME 7 70000 CS How many rows are there in the result of following query?SELECT E.IDFROM Employee EWHERE EXISTS (SELECT E2.salary FROM Employee E2 WHERE E2.DeptName = 'CS' AND E.salary > E2.salary)(A) 0(B) 4(C) 5(D) 6 |
|
Answer» Answer: (C) Explanation: Background:
Here in the above question, there is a correlated subquery because the subquery references the enclosing query (relation Employee renamed as E) Now the correlated query works as follows: SELECT E.ID It takes one tuple from the Employee Relation and displays its ID if the WHERE EXISTS returns true i.e. the subquery returns one or more records. This happens in the case when the tuple from the Employee Relation E has the value of the salary attribute greater than any one of the values of the salary attribute filtered out above. ID salary DeptName Finally it displays their ID’s and the output would be: Hence option (C) 5 rows. |
|