This topic contains 0 replies, has 0 voices, and was last updated by  EduGorilla 2 years, 6 months ago.

  • Author
    Posts
  • #1428097 Reply
     EduGorilla 
    Keymaster
    Select Question Language :


    Consider the relation
    Students(Rollno, Name, Marks)
    Where rollno is the primary key.
    Now we would like to rank the students according to the decreasing marks. The student with the highest marks gets rank 1. Ties are not broke but ranks are skipped.
    Now consider 2 queries.
    Query1: SELECT A .Name, count (B .Name)
    From Students A, Students B
    Where A.Marks <= B.Marks group by A .Name
    Query2: SELECT A .Name, 1+count (B .Name)
    From Students A, Students B
    Where A.Marks < B .Marks group by A .Name

    Options :-

    1. Query 1 and Query 2 are correct implementation of the given specification
    2. Query 1 and Query 2 are not correct implementation of the given specification
    3. Query 1 is the correct implementation of the specification but not Query 2
    4. Query 2 is the correct implementation of the specification but not Query 1
    Post your Training /Course Enquiry
    Are You looking institutes / coaching center for
    • IIT-JEE, NEET, CAT
    • Bank PO, SSC, Railways
    • Study Abroad
    Select your Training / Study category
Reply To: Consider the relation Students(Rollno, Name, Marks) Where rollno is the primary key. Now we would l….
Your information:




Verify Yourself




Log in with your credentials

or    

Forgot your details?

Create Account