I have the below query:
select distinct eventid, sum(tally) as numberofevents
where eventid in
) and lastoccurrence >= '1012-12-19' and lastoccurrence < '2012-12-20'
group by eventid, tally
which returns data as in the below example:
I want my query to calculate a grand total for the number of events and display this in another column in the results, and i also wish to calculate a percentage for each eventid, showing its contribution towards the total.
Can anyone help/know how this would be done?
Many thanks :)