Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write an SQL query that returns the studentid and name of students who have over

ID: 3597123 • Letter: W

Question

Write an SQL query that returns the studentid and name of students who have overdue books (assume a book is due after 30 days), use construct CURRENT_DATE to access the current date in your query. Do not return any duplicate tuples.

17:45 cs.iit.edu Pad 78% D book bookid title Introduction of Algorithms Database System Concepts price total copies 84.66 74.99 Stochastic Calculus for Finance 1.02 Stochastic Calculus for Finance II 55.22 course title Algorithms DB Organizatio Advanced DB Organization Math Finance I Math Finance II courseid instructoridtextbookid enroll studentid courseid student faculty studentid namegpa Tom 3.3 John 3.8 Mary 3.0 Kris3.6 Alex 3.5 facultyid naime salarV James70000 Sarah 60000 Jay80000 Rachel 70000 Paul 85000 book checkout bookid studentid ate 2017-08-29 2017-09-02 2017-09-07 Hints:

Explanation / Answer

select distinct s.studentid, s.name from student s, book_checkout bc where s.studentid = bc.studentid and CURRENT_DATE - 30 > bc.takenDate

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote