Fanatics without posts

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

--SELECT num AS Fanatics, denom AS Users, num/denom AS Percentage FROM
  SELECT 
    (select COUNT(*) from Badges where Name = 'Fanatic') AS num,
    (select COUNT(*) from Users where Reputation > 1) AS denom
  

/*SELECT AP, ttl, AP/ttl AS quotient FROM 
(SELECT 
  (SELECT count(DISTINCT s.lastfirst) 
          FROM students s
          JOIN cc ON s.id = cc.studentid
          JOIN courses c on cc.course_number = c.course_number
         WHERE cc.schoolid='109'
           AND c.course_name LIKE 'AP %' 
           AND substr(cc.termid,0,1) <> '-'
           AND cc.dateenrolled BETWEEN to_date('08/01/2010','MM/DD/YYYY') AND  
               to_date('08/01/2011','MM/DD/YYYY')) as AP, 
       (SELECT count(DISTINCT s.lastfirst) 
          FROM students s
          JOIN cc ON s.id = cc.studentid
          JOIN courses c on cc.course_number = c.course_number
         WHERE cc.schoolid = '109'
           AND substr(cc.termid,0,1) <> '-'
           AND cc.dateenrolled BETWEEN to_date('08/01/2010','MM/DD/YYYY') 
           AND to_date('08/01/2011','MM/DD/YYYY')) as ttl
 FROM DUAL) */

Enter Parameters

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