Created
June 6, 2020 18:49
-
-
Save alimozdemir/21ac551cfd2abd4d001641ec9a17a123 to your computer and use it in GitHub Desktop.
View Example
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
CREATE VIEW vw_Songs | |
AS | |
SELECT s.Id, s.Title, MIN(ISNULL(cs.[Status], 0) + 0) CountryStatus | |
FROM Song AS s | |
LEFT JOIN dbo.Country_Songs AS cs ON cs.SongId = s.Id | |
GROUP BY s.Id, s.Title |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment