Y2S1-Database_Design/SQL/queries/query 4.sql
2020-06-07 22:29:59 +01:00

11 lines
726 B
SQL

SELECT Title, EntryDescription, UploadDate, ProductionName, CategoryName, VideoEntry.VideoFileName, VideoPreview.VideoFileName, AudioEntry.AudioFileName, AudioPreview.AudioFileName, ImageFileName
FROM MediaEntry
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.UserID = 1