BOOKS BookID BookName YearOfPublication AuthorID Price Bk1 Databases 2007 A1 1000 Bk2 Programming 2020 A2 500 II. III. Author Author ID Name Gender email phone city A1 A2 ... II. From the tables given above, write the following in form of relational algebra 1. Selects rows from the table Books where Book Name is 'History' and 'price' is 1000 or those books published after 2015 2. show the name of Authors who live in city is ‘Islamabad'. 3. Show the names of the authors who either live in city 'Islamabad' or Gender is 'Male
SELECT *
from bookmanagement.books as b
where b.Name='History' and b.price=1000 and b.YearOfPublication>2015;
SELECT a.Name
FROM bookmanagement.author as a
where a.city='Islamabad';
SELECT a.Name
FROM bookmanagement.author as a
where a.city='Islamabad' or a.Gender='Male';
Comments
Leave a comment