Y2S1-Database_Design/SQL/queries/query 5.sql

12 lines
884 B
MySQL
Raw Normal View History

2020-06-07 21:29:59 +00:00
SELECT Title, EntryDescription, UploadDate, ProductionName, CategoryName, VideoEntry.VideoFileName, VideoPreview.VideoFileName AS VideoPreviewName, AudioEntry.AudioFileName, AudioPreview.AudioFileName AS AudioPreviewName, ImageFileName, UserName
FROM MediaEntry
LEFT JOIN Users ON Users.UserID = MediaEntry.UserID
LEFT JOIN Production ON Production.ProductionID = MediaEntry.ProductionID
LEFT JOIN Category ON Category.CategoryID = MediaEntry.CategoryID
LEFT JOIN VideoEntry ON VideoEntry.EntryID = MediaEntry.EntryID
--Include previews
LEFT JOIN VideoPreview ON VideoPreview.VideoID = VideoEntry.VideoID
LEFT JOIN AudioEntry ON AudioEntry.EntryID = MediaEntry.EntryID
LEFT JOIN AudioPreview ON AudioPreview.AudioID = AudioEntry.AudioID
LEFT JOIN ImageEntry ON ImageEntry.EntryID = MediaEntry.EntryID
WHERE MediaEntry.UploadDate BETWEEN '2018-09-10 02:33:13' AND '2018-09-10 12:52:00'