0 votes
6 views
ago in Computer Science by (8.5k points)

Rahul, who works as a database designer, has developed a database for a bookshop. This database includes a table BOOK whose column (attribute) names are mentioned below:

BCODE: Shows the unique code for each book.

TITLE: Indicates the book’s title.

AUTHOR: Specifies the author’s name.

PRICE: Lists the cost of the book.

I. Write SQL query to display book titles in lowercase. 

II. Write SQL query to display the highest price among the books. 

III. Write SQL query to display the number of characters in each book title. 

IV. Write SQL query to display the Book Code and Price sorted by Price in descending order.

1 Answer

0 votes
ago by (56.5k points)
 
Best answer
I. SELECT LOWER(TITLE) FROM BOOK;

II. SELECT MAX(PRICE) FROM BOOK;

III. SELECT LENGTH(TITLE) FROM BOOK;

IV. SELECT BCODE, PRICE FROM BOOK ORDER BY PRICE DESC;
...