Quantcast
Channel: Answers for "To write an sql query"
Browsing latest articles
Browse All 4 View Live

Answer by Gopi Muluka

Create Schema and data CREATE TABLE Movie ( mID INT, title SYSNAME, year INT, director SYSNAME) --English: There is a movie with ID number mID, a title, a release year, and a director. CREATE TABLE...

View Article


Answer by Fatherjack

Using the build script from @Gopi Muluka, (but changing all tables to be temporary objects for the example) I wouldnt choose to use a CTE and simply do it with a self join: SELECT [r].[stars] AS [First...

View Article

Browsing latest articles
Browse All 4 View Live