Bobby X
asked on
Need help with ratio calculation...
Hi,
In SQL Server, how do I calculate the ration of the following 2 numbers? In other words, I'd like to know what is the ration of Count2 to Count1. Please provide the SQL.
Count1 = 125294
Count2 = 241357
Thanks.
In SQL Server, how do I calculate the ration of the following 2 numbers? In other words, I'd like to know what is the ration of Count2 to Count1. Please provide the SQL.
Count1 = 125294
Count2 = 241357
Thanks.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
DECLARE @count1 INT
DECLARE @count2 INT
SET @count1 = 125294;
SET @count2 = 241357;
SELECT CONVERT(VARCHAR, CAST(@count2 * 1.0 / @count1 AS MONEY)) + ':1';