Q. Write SQL commands for the following on the basis of given table MOV :
(a) Display a list of all movies with Price over 20 and sorted by Price.
(b) Display all the movies sorted by QTY in decreasing order.
(c) Display a report listing a movie number, current value and replacement value for each movie in the above table. Calculate the replacement value for all movies as QTY * Price * 1.15.
Answer =
(a)
Select title from MOV
Where price > 20
Order by price ;
(b)
Select title from MOV
Order by QTY desc ;
(c)
Select no, price, qty* price * 1.15 as replacement_value from MOV ;
(c)....from mov will be there..
ReplyDeleteI have written it.
Deleteare u the owner of path academy?
ReplyDeleteNo..
DeleteIn (c) from where did no, price written �� ��
ReplyDeleteI can't understand what you want say please tell me again.
Deletevery hlpfull...i use this every cs class
ReplyDeleteWelcome 😊😊😊
Deletethank you sir
ReplyDeleteWelcome 😊😊
ReplyDeleteExcellent job I really appreciate your work ...love this website
ReplyDeleteThank you so much.
Delete(C) FROM is wrongly written as FORM.. please correct the error.
ReplyDeleteOk, I have correct it.
DeleteThanks you ....just doing my assignment 😉
ReplyDeleteWelcome 😊😊
DeleteSir 3rd wale mai na hamne replacement value ke beech mai _ lagyaa uska mtlb space? Agr uski jgh space likhenge ti ky hoga sir ?
ReplyDeleteIf you want to write space the you have to write "replacement value".
Deletein first question why are we not using SELECT title instead of * ...as they are asking only the list of movies and not the whole information ?
ReplyDeleteSorry. I have corrected it.
DeleteVery helpful website loved it
ReplyDeleteThank you : )
Deletetitle should have capital T i.e Title.Because we have to use the same field name
ReplyDeleteGood work
ReplyDeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )