SQL Language (MOSC)

MOSC Banner

Incorrect frequency query

edited Feb 18, 2010 4:49AM in SQL Language (MOSC) 14 commentsAnswered
 I'm running a simple frequency query to determine the number of records that fall into each unique status value.  The record counts do not add up to the total number of records in the table.  The queries I am running and the results they produce are below.

SELECT
   COUNT(*) AS REC_CNT
FROM
   STAT.STATUS;

SELECT

   STATUS,
   COUNT(*) AS REC_CNT
FROM
   STAT.STATUS
GROUP BY
   STATUS

ORDER BY 1;

REC_CNT
9,894,505

STATUSREC_CNT
1419,971
21,215,599
3343
8,258,409
Total9,894,322

As you can see after adding the STATUS group by 183 records are missing.  Any ideas?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center