Q. Write a query on the customers table whose output will exclude all customers with a rating <= 100, unless they are located in Shimla.


Answer =

Select * from customers
Where rating > 100 or city = “Shimla” ;

9 Comments

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

  1. the question is saying to exclude but the code that you've typed will do the opposite and include them.

    ReplyDelete
    Replies
    1. it is correct as it says unless it is from shimla

      Delete
    2. Exclude krna h ap to include kr rahe ho

      Delete
  2. so what will be the real answer then??

    ReplyDelete
  3. the question is asking to display all records where rating >100 and every record from shimla so the query would be:
    select * from customers
    where rating >100 or city = "shimla";

    ReplyDelete

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post