Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. -- pokazuje te konferencje które są w trakcie albo dopiero będą
  2. go
  3. create view dbo.ScrollAvailableConferences as
  4. select distinct a.ConferenceName as 'Conference Name' from Conference a
  5. join ConferenceDay b
  6. on a.ConferenceID = b.ConferenceID
  7. where b.ConferenceDay > getdate()
  8.  
  9.  
  10.  
  11. -- pokazuje te warsztaty które są w trakcie albo dopiero się odbędą
  12. go
  13. create view dbo.ScrollAvailableWorkshops as
  14. select distinct a.Topic as 'Workshop Topic' from Workshop a
  15. where (select b.ConferenceDay from ConferenceDay b where b.ConferenceDayID = a.ConferenceDayID) > getDate()
  16.  
  17.  
  18.  
  19.  
  20. --pokazuje ile każda konferencja miała łącznie uczestników
  21. go
  22. create view dbo.NumberOfAttendesPerConference as
  23. select a.ConferenceID, sum(select b.NumberOFParticipants from ConferenceDayReservation b) from ConferenceDay a
  24.  
  25.  
  26. -- pokazuje najpopularniejsze warsztaty
  27. go
  28. create view MostPopularWorkshop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement