Question
Which of the following statements is correct?
Answer the questions based on the information given below. Eleven persons K, A, B, C, D, E, F, G, H, I and J live in four storey building having four floors such that lowermost floor is numbered as 1 and floor immediately above the lowermost floor is numbered as 2 and so on. Each floor has 3 flats numbered as 1, 2 and 3 from west to east such that flat β 1 is in west of flat β 2 and flat β 2 is in west of flat β 3. One of the flats on a floor is vacant. The dimensions of each of the flats are same. Note: If there is one/two floor(s) between two flats then they may or may not have the same flat number of different floors. J lives in an even numbered flat on floor number 2. A and B live on same floor. A lives in an even numbered flat on lowermost floor. F and K live on same floor. All the flats on the floor on which E lives are occupied. H lives to the west of F. A lives on the floor on which two other persons live. There is one floor between F and E. Dβs flat is immediately above Bβs flat and the numbers ofΒ their flats is same. F lives immediately below the vacant flat and the flat number of vacant flat and F is same. C lives somewhere above I in same flat number, but not on flat 3.K lives in flat β 1.Solution
A lives in an even numbered flat on lowermost floor i.e. A lives on floor ground floor in flat 2. J lives in an even numbered flat on floor number 2. A and B live on same floor. D lives immediately above Name the numbers of their flats is same. So, Now, B either lives immediate west or east of A which means D either lives in flat 3 or flat 1. So, we have two possibilities. Case I: When B and D live on flat β 3: C lives somewhere above I in same flat number, but not on flat 3. Now, we cannot fix C and I in same flat number in case II, so, case II is invalid. The final arrangement is as follows:
Which of the following is a key characteristic that distinguishes a PL/SQL `FUNCTION` from a PL/SQL `PROCEDURE`?
Which SQL statement combines the results of two queries and removes duplicates?
Which SQL clause is used to filter records based on aggregate functions?
Which SQL clause is used to filter results after a GROUP BY operation?
Which of the following statements about SQL `INDEXES` is generally TRUE?
Which SQL clause is used for filtering rows?
Given a table employees(id, dept_id, salary), which query returns departments with average salary greater than overall average across the company?
What is the main function of a PL/SQL `TRIGGER`?
Which join returns rows from the left table even when there is no matching row in the right table, filling with NULLs for the right side?
Which SQL clause is used to group rows?