[Assignments] Simple Queries in SQL — Chapter 12 Assignments (Q/A)

|
Table of Contents

16. Write SQL commands for the following on the basis of given table:

NoTitleAuthorTypePubQtyPrice
1Data StructureLipschutzDSMcGraw4217
2Computer StudiesFrenchFNDGalgotia275
3Advanced PascalSchildtPROGMcGraw4350
4Dbase dummiesPalmerDBMSPustakM5130
5Mastering C ++GurewichPROGBPB3295
6Guide NetworkFreedNETZPress3200
7Mastering FoxproSeigalDBMSBPB2135
8DOS guideNortonOSPHI3175
9Basic for beginnersMortonPROGBPB340
10Mastering WindowCowartOSBPB1225
Table : Library
  1. Select all the PROG type published by BPB from Library.
  2. Display a list of all books with Price more then 130 and sorted by Qty.
  3. Display all the books sorted by Price in ascending order.
  1. SELECT * FROM Library
    WHERE Type="PROG" AND Pub="BPB" ;
  2. SELECT Title FROM Library
    WHERE Price > 130
    ORDER BY Qty ;
  3. SELECT Title FROM Library
    ORDER BY Price ;
"Spread the light within, illuminate the hearts around you. Sharing is not just an action, but a sacred journey of connecting souls."~ Anonymous

Leave a Reply

Your email address will not be published. Required fields are marked *