← Questions
Library database SQL: unreturned copies, top books and referral gaps
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A library schema has tables for books, copies, members, checkouts, reservations and authors. Write the queries:
- How many copies are in good condition and not yet returned? Among them, what share were renewed more than twice?
- Among books with more than ten copies, return the three with the longest total time on loan (return date minus checkout date, summed over their lifetime).
- Members can refer other members. Find the member with the largest difference in reserved books between them and the member who referred them, and that difference.
A data engineering screen: about 25 minutes of SQL like this, then Python, with only a few minutes per question.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
