Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --5ta
- SELECT [Description], FORMAT(OpenDate, 'dd-MM-yyyy') FROM Reports
- WHERE EmployeeId IS NULL
- ORDER BY OpenDate, [Description]
- --6ta
- SELECT r.[Description], c.[Name] FROM Reports r
- JOIN Categories c ON c.Id = r.CategoryId
- ORDER BY r.[Description], c.[Name]
- -7ma
- SELECT TOP(5) c.[Name], COUNT(*) AS [ReportsNumber] FROM Reports r
- JOIN Categories c ON c.Id = r.CategoryId
- GROUP BY c.[Name]
- ORDER BY [ReportsNumber] DESC, c.[Name]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement