GoConqr has a new look! Let us know what you think.

Quiz

ГОС по БД #2

хомяк убийца 77 questions 1,039 views

Take the quiz

Questions in this quiz (77)

  1. 1Retrieve the lowest experience from tutor. Tables: OFFICE {id (PK), locations, name}, TUTOR {id (PK), name, officeid (FK references office (id)), experience}, STUDENTS {id (PK), name, scholarship, registereddate, tutorid (FK references tutor (id))
    1. Aselect min (experience) from tutor;
    2. Bselect max (experience) from tutor;
    3. Cselect max (t.experience) from tutor t group by t.name;
    4. Dselect min (t.experience) from tutor t group by t.name;
  2. 2Retrieve book name, number of books, price and publisher, for those books which have more than 20 copies. Tables : BOOK {bookid, title, publisher_name, price}. BOOKCOPIES {bookid, libraryid,noOfCopies [references Book (bookid)]}
    1. Aselect count (b.bookid),b.title, b.price, b.publisher_name from book b join book_copies bc on b.bookid=bc.bookid where bc.no_of_copies>20 group by b.title, b.price, b.publisher_name;
    2. Bselect count (b.bookid),b.title, b.price, b.publisher_name from book b join book_copies bc on b.bookid=bc.bookid where bc.no_of_copies>20;
    3. Cselect count (b.bookid),b.title, b.price, b.publisher_name from book b join book bc on b.bookid=bc.bookid where bc.no_of_copies>20 group by b.title, b.price, b.publisher_name;
    4. Dselect b.bookid,b.title, b.price, b.publisher_name from book b join book_copies bc on b.bookid=bc.bookid where bc.no_of_copies>20 group by b.title, b.price, b.publisher_name;
  3. 3Retrieve card number, book name, borrower name, who have borrowed in 12 July, bookid (references Book (bookid)), libraryid (references Library (libraryid)), cardno 2013. Tables: BOOK {bookid, title, publisher_name, price}. BOOKLOANS {bookloans, cardno(references Borrower (cardno)),bookid (references Book (bookid)) dateout, duedate}. BORROWER {cardno, c_name, b_address, phoneno}
    1. Aselect bl.cardno, b.title, br.c_name from book b join bookloans bl on bl.bookid=b.bookid join borrower br on br.cardno=bl.cardno where bl.dateout='12-07-2013'
    2. Bselect bl.cardno, b.title, br.c_name from book b join bookloans bl on bl.bookid=b.bookid join borrower br on br.cardno=bl.cardno where bl.duedate='12-07-2013'
    3. Cselect bl.cardno, b.title, br.c_name from book b join bookloans bl on bl.bookid=b.bookid where bl.dateout='12-07-2013'
    4. Dselect bl.cardno, b.title, br.c_name from book b join borrower br on br.cardno=bl.cardno where bl.dateout='12-07-2013'
  4. 4Retrieve max price for Fariza's publication. BOOK {bookid, title, publisher_name, price}.BOOK_AUTHORS {author_name, bookid (references Book (bookid))}
    1. Aselect max (b.price)from book b join book_authors ba on b.bookid=ba.bookid where ba.author_name = 'Fariza';
    2. Bselect max (b.price)from book b join book_authors ba on b.bookid=ba.bookid where ba.author_name = Fariza;
    3. Cselect max (b.price)from book b join book_authors ba b.bookid=ba.bookid where ba.author_name = 'Fariza';
    4. Dselect max (b.price)from book b join book_authors ba on b.bookid=ba.bookid; #subToPewDiePie
  5. 5Retrieve book name, total number of book copies. BOOK {bookid, title, publisher_name, price}. BOOKCOPIES {bookid, libraryid,noOfCopies [references Book (bookid)]}
    1. Aselect b.title, sum (no_of_copies) from book b join book_copies bc on b.bookid=bc.bookid group by b.title;
    2. Bselect b.title, sum (no_of_copies) from book b join book_copies bc b.bookid=bc.bookid group by b.title;
    3. Cselect b.title, count(no_of_copies) from book b join book_copies bc on b.bookid=bc.bookid group by b.title;
    4. Dselect b.title, count(no_of_copies) from book b join book_copies bc b.bookid=bc.bookid group by b.title;
  6. 6Retrieve book title and total number of book copies, which has id 1. BOOK {bookid, title, publisher_name, price}. BOOKCOPIES {bookid, libraryid,noOfCopies [references Book (bookid)]}
    1. Aselect b.title, sum (no_of_copies) from book b join book_copies bc on b.bookid=bc.bookid where b.bookid=1 group by b.title;
    2. Bselect b.title, sum (no_of_copies) from book b join book_copies bc on b.bookid=bc.bookid where b.bookid=1;
    3. Cselect b.title, count (no_of_copies) from book b join book_copies bc on b.bookid=bc.bookid where b.bookid=1 group by b.title;
    4. Dselect b.title, count (no_of_copies) from book b join book_copies bc on b.bookid=bc.bookid where b.bookid=1;
  7. 7Retrieve borrower name and number of books that each borrower has. BOOKLOANS {bookloans, bookid (references Book (bookid)), libraryid (references Library (libraryid)), cardno (references Borrower (cardno)), dateout, duedate}. BORROWER {cardno, c_name, b_address, phoneno}
    1. Aselect br.c_name, count(bl.bookid) from borrower br join bookloans bl on br.cardno = bl.cardno group by br.c_name;
    2. Bselect br.c_name, count(bl.bookid) from borrower br join bookloans bl on br.cardno = bl.cardno;
    3. Cselect br.c_name, sum(bl.bookid) from borrower br join bookloans bl on br.cardno = bl.cardno group by br.c_name;
    4. Dselect br.c_name, sum(bl.bookid) from borrower br join bookloans bl on br.cardno = bl.cardno;
  8. 8Retrieve books name and prices. Increase price twice more for books, which have more than 20 copies;BOOK {bookid, title, publisher_name, price}. BOOKCOPIES {bookid, libraryid,noOfCopies [references Book (bookid)]}
    1. Aselect b.title, b.price, b.price *2 as increasedprice from book b join book_copies bc on bc.bookid=b.bookid where bc.no_of_copies > 20;
    2. Bselect b.title, b.price book b join book_copies bc on bc.bookid=b.bookid where bc.no_of_copies > 20;
    3. Cimpossible to solve
    4. Dselect b.title, b.price, b.price *2 as increasedprice from book b join book_copies bc on bc.bookid=b.bookid;
  9. 9Retrieve library name, book name, number of copies, which have more than 25 copies. BOOK {bookid, title, publisher_name, price}. BOOKCOPIES {bookid, libraryid,noOfCopies [references Book (bookid)]}. LIBRARY (libraryid)), cardno (references Borrower (cardno)), dateout, duedate}.
    1. Aselect l.libraryname, b.title, bc.no_of_copies from book b join book_copies bc on b.bookid=bc.bookid join library l on l.libraryid = bc.libraryid where bc.no_of_copies>25;
    2. Bselect l.libraryname, b.title, bc.no_of_copies from book b join book_copies bc on b.bookid=bc.bookid where bc.no_of_copies>25;
    3. Cselect l.libraryname, b.title, bc.no_of_copies from book join library l on l.libraryid = bc.libraryid where bc.no_of_copies>25;
    4. Dselect l.libraryname, b.title, bc.no_of_copies from book b join book_copies bc on b.bookid=bc.bookid join library l l.libraryid = bc.libraryid where bc.no_of_copies>25;
  10. 10Retrieve the number of departments in the department table. Tables: DEPARTMENT {id, name}. EMPLOYEE {id, name, salary, dep_id (references Department (id))}
    1. Aselect count(id) from department
    2. Bselect sum (id) from department;
    3. Cselect coun(id) from department
    4. Dselect id from department

Information

Description
God Philosophy Quiz on ГОС по БД #2, created by хомяк убийца on 23/03/2019.
Language
English
Views
1,039
Rating
No ratings yet
Rate this quiz
Rate this quiz

Feedback

What is it about?

What do you think of the new look?

How do you like it?