No records were returned. Please try again.
|
|
Drag a column header and drop it here to group by that column |
|
Standard Loaded -
Security - Edit Roles set to
Security - Add Roles set to
Security - Delete Roles set to
Standard Alternate Loaded -
Executed SQL - -- Further Education
Select
Name
,DATENAME(DW, Event.StartDate) + ' ' + DATENAME(DAY,EVENT.StartDate) + ' ' + DATENAME(MONTH,EVENT.StartDate) AS EventStartDate
,StartTime
,CONVERT(VARCHAR(12),event.EndDate,103) AS EventEndDate
,EndTime
,Venue
,LTRIM(Address1 + ' ' + RTRIM(ISNULL(Address2+ ' ','') + RTRIM(ISNULL(Address3+ ' ','')))) + City AS VenueAddress
,EventDescription
,CASE
WHEN RegistrationLimit is not null and RegistrationLimit > 0 and RegistrationLimit <= attendeeNumbers.NoAttendees THEN 'SOLD OUT'
ELSE 'Register Now'
END AS [BookingURL]
FROM Event
INNER JOIN EventType ON EVENT.EventTypeId = EventType.EventTypeId
LEFT OUTER JOIN Address ON VenueAddressId = Address.AddressId
left outer join
(
select EventRegistrationType.EventId, COUNT(1) as NoAttendees from EventAttendee
inner join EventRegistration on EventAttendee.EventRegistrationId = EventRegistration.EventRegistrationId
inner join EventRegistrationType on EventRegistration.EventRegistrationTypeId = EventRegistrationType.EventRegistrationTypeId
where PrimaryEvent = 1
group by EventRegistrationType.EventId
) attendeeNumbers on Event.EventId = attendeeNumbers.EventId
WHERE Event.EventStatus = 'Open'
AND AvailableOnline = 1
AND StartDate > DATEADD(DAY, 0, DATEDIFF(DAY, 0, GETDATE()))
AND EventType.EventTypeName = 'Further Education'
order by StartDate asc
Select rows above and then selection an action from below to execute on your data:
Execute Selected Action