Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: SQLServerCentral apologizes and you can win a book

    SELECT U.UserId, U.FirstName, EU.EventId, E.EventName, 'Yes' as RSVP, EU.Attended,

    COUNT(EU.UserId) OVER (PARTITION BY U.UserId ) AS UserTotalRSVPs,

    SUM(EU.Attended) OVER (PARTITION BY U.UserId ) AS UserTotalAttended

    FROM EventUser EU

    INNER JOIN Users U ON...

Viewing post 1 (of 1 total)