April 29, 2010 at 9:30 am
Querry:
SELECT Count(process) As Process, (SELECT count(m_stat) where m_stat = 'Failure') As Status FROM database
WHERE date BETWEEN DATEADD(dd, - 30, GETDATE()) AND GETDATE()
Group by m_stat
Result :
Process
1
5
45
2
I am not sure how to multiply the results in SQL:
((1 + 5 + 45 + 2) - (1 + 5 = 2) / 45 x 100
Can anyone show me where I need to go to create this calculation in SQL.
Thank you
April 29, 2010 at 9:45 am
What would the formula look like? Not having sample values, but a more general description.
Like (SUM(all values)+(values with < condition >) * < other values with different condition >)/MAX(value)*100
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply