Enter a query, then click the execute button or press F9 to run
it.
SELECT trackid, tracks.name, albums.Title AS album, media_types.Name AS media, genres.Name AS genres FROM tracks INNER JOIN albums ON Albums.AlbumId = tracks.AlbumId INNER JOIN media_types ON media_types.MediaTypeId = tracks.MediaTypeId INNER JOIN genres ON genres.GenreId = tracks.GenreId;
CREATE VIEW v_tracks AS SELECT trackid, tracks.name, albums.Title AS album, media_types.Name AS media, genres.Name AS genres FROM tracks INNER JOIN albums ON Albums.AlbumId = tracks.AlbumId INNER JOIN media_types ON media_types.MediaTypeId = tracks.MediaTypeId INNER JOIN genres ON genres.GenreId = tracks.GenreId;
SELECT * FROM v_tracks;
DROP VIEW v_tracks;