Last active
August 7, 2017 19:57
-
-
Save Danyboy/9f10b42e5d242577bb693ae0a9c34097 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT BookId, Title, AvtorId, FirstName, MiddleName, LastName | |
| FROM libbook | |
| JOIN | |
| ( | |
| SELECT book_id FROM History | |
| WHERE UNIX_TIMESTAMP(timestamp) > 1502115643.435 | |
| ORDER BY timestamp DESC | |
| LIMIT 200 | |
| ) AS h ON BookId = h.book_id | |
| JOIN | |
| ( | |
| SELECT AvtorId, BookId FROM libavtor | |
| GROUP BY BookId | |
| ) AS Avtor USING(BookId) | |
| JOIN libavtorname USING(AvtorId) | |
| ; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment