--Task 11

a guest Jul 14th, 2015 172 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --Task 11
  2. Find all items and information whether and what forbidden game types they have. Display item name, price, min level and forbidden game type. Display all items. Sort the results by game type in descending order, then by item name in ascending order.
  4. select
  5.         i.Name as Item,
  6.         i.Price,
  7.         i.MinLevel,
  8.         gt.Name as [Forbidden Game Type]
  9. from Items i
  10. left join GameTypeForbiddenItems gtfi
  11. on i.Id = gtfi.ItemId
  12. left join GameTypes gt
  13. on gtfi.GameTypeId = gt.Id
  14. order by [Forbidden Game Type] desc, i.Name asc
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand