This document contains the details of an assignment to create tables, insert data, perform queries and updates on tables related to books, authors, categories and employees in a database. It includes 18 tasks such as creating tables, inserting data, adding/removing columns, finding maximum/minimum/average values, grouping and sorting data, applying conditions and discounts. The goal is to demonstrate proficiency in SQL commands for data definition, manipulation and queries.
This document contains the details of an assignment to create tables, insert data, perform queries and updates on tables related to books, authors, categories and employees in a database. It includes 18 tasks such as creating tables, inserting data, adding/removing columns, finding maximum/minimum/average values, grouping and sorting data, applying conditions and discounts. The goal is to demonstrate proficiency in SQL commands for data definition, manipulation and queries.
This document contains the details of an assignment to create tables, insert data, perform queries and updates on tables related to books, authors, categories and employees in a database. It includes 18 tasks such as creating tables, inserting data, adding/removing columns, finding maximum/minimum/average values, grouping and sorting data, applying conditions and discounts. The goal is to demonstrate proficiency in SQL commands for data definition, manipulation and queries.
This document contains the details of an assignment to create tables, insert data, perform queries and updates on tables related to books, authors, categories and employees in a database. It includes 18 tasks such as creating tables, inserting data, adding/removing columns, finding maximum/minimum/average values, grouping and sorting data, applying conditions and discounts. The goal is to demonstrate proficiency in SQL commands for data definition, manipulation and queries.
desc employee 2. Insert 5 rows of data into each table Ans: 3. 4. 5. 6. 7. 8. 9.
Add three new columns to employee table (phone, email, dob)
Rename address column of employee to emp_address Delete isbn column from book table Find maximum and minimum sale price from all the books Find the average price of all the books of category no 4 Find all the books name and price inserted 7 days back from today Show all the books name in the following format This book_name has been inserted by inserted_by on insert_date 10.Show all the tables structures 11.Show total number of books in each category with category id and book count 12.Group all books name by category and sort them by book_name 13.Show a new column name discounted price with book name, original price and 50% discount 14.Show all the books that are in category from 1 to 3 15.Show all the books which prices are ranged from 100 to 500 taka 16.Find all the author names whose name starts with H and ends with D 17.Find all the books which price is greater than 100 taka and they are in category 2 or all the books from category 3 18.Show the discounted price in the following manner with case and decode a. For category 1 book discount is 20% b. For category 2 book discount is 30% c. For category 3 book discount is 40% d. For all other books discount is 10%