QUESTIONS: (A) Snap of a database table looks as below: Extract these columns –
ID: 3746509 • Letter: Q
Question
QUESTIONS:
(A) Snap of a database table looks as below:
Extract these columns – first name, middle and last name and their email where email_promotion is set to 1 and email contains only email domain as “adventure-works.com” and only those that were modified in ‘Jan 2002’ and after.
(B)
Imagine you are a Librarian of your department at Lewis University. You are required to identify books that students and faculty borrowed the most in last 2 years. Based on your findings, you are required increase the number of available copies in the library.
How would you go about collecting the required data? What type of questions would you work on to achieve your goals?
BusinessEntit... PersonTy... FirstNa. MiddleNa. LastName EmailPromoti.. EmailAddress ModifiedDate EM EM EM EM EM EM EM EM EM EM Sánchez 0 ken0@adventure-works.com 2003-02-08 00:00:00.000 terri0@adventure-works.com 2002-02-24 00:00:00.000 roberto0@adventure-works.com 2001-12-05 00:00:00.000 rob0@adventure-works.com gail0@adventure-works.com jossef0@adventure-works.com 2002-02-17 00:00:00.000 dylan0@adventure-works.com 2003-03-05 00:00:00.000 diane1@adventure-works.com 2003-01-23 00:00:00.000 gigi0@adventure-works.com 2003-02-10 00:00:00.000 michael6@adventure-works.com 2003-05-28 00:00:00.000 Terri Roberto NULL 2 Lee Tamburello 0 Walters Erickson Goldberg Miller Margheim 0 Matthew Raheem 2 4 NULL 2001-12-29 00:00:00.000 2002-01-30 00:00:00.000 Gail JossefH Dylan A Diane Gigi Michael NULL 5 0 6 6 10 10Explanation / Answer
A)
SELECT FirstName,MiddleName,LastName,EmailAddress
WHERE EmailPromotion=1
AND EmailAddress like %adventure-works.com%
AND ModifyDate>=2002-01-01 00:00:00;
B)
librarian needs to fetch query related to that book from library data base
Questions:
Which all books issued most number of times in two years
what where the duration of the borrow(can tell about how important the book is)
Student borrowed or faculty?