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

11 lines
739 B
MySQL
Raw Normal View History

2020-06-07 21:29:59 +00:00
SELECT Title, EntryDescription, UploadDate, ProductionName, CategoryName, ThumbnailFileName, Likes, Dislikes, Content, ParentComment, VideoFileName, AudioFileName, ImageFileName
FROM MediaEntry
LEFT JOIN Production ON Production.ProductionID = MediaEntry.ProductionID
LEFT JOIN Category ON Category.CategoryID = MediaEntry.CategoryID
LEFT JOIN ContentPage ON ContentPage.EntryID = MediaEntry.EntryID
LEFT JOIN Comment ON Comment.PageID = ContentPage.PageID
LEFT JOIN Thumbnail ON Thumbnail.EntryID = MediaEntry.EntryID
LEFT JOIN VideoEntry ON VideoEntry.EntryID = MediaEntry.EntryID
LEFT JOIN AudioEntry ON AudioEntry.EntryID = MediaEntry.EntryID
LEFT JOIN ImageEntry ON ImageEntry.EntryID = MediaEntry.EntryID
WHERE MediaEntry.EntryID = 1