with data as (Select count(*) as total, (Select Count(*) ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

SELECT Reputation from Users where Reputation;

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

-- Enter Query Title
-- Enter Query Description
-- SELECT Reputation from Users where Reputation;
with data as (Select count(*) as total,
(Select Count(*) from Users where SUBSTRING(CAST(Reputation AS VARCHAR), 1, 1) = '1') as one,
(Select Count(*) from Users where SUBSTRING(CAST(Reputation AS VARCHAR), 1, 1) = '2') as two,
(Select Count(*) from Users where SUBSTRING(CAST(Reputation AS VARCHAR), 1, 1) = '3') as three
from Users ) select one/total from data;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results