shree
shree

Reputation: 2757

How to count records for the particular repeated records?

I have a table name is Pattern

S.No      type      Id_Section
    1          A        IPS
    2          A        IPS
    3          A        IPS
    4          A        IPS
    1          B        IPS
    2          B        IPS
    3          B        IPS
    1          C        IPS
    2          C        IPS
    1          D        IPS
    2          D        IPS

I want a query to count records except where type = "c" records ...I tried with and examples..But i am getting whole records count..Please any one help me..

Upvotes: 0

Views: 54

Answers (2)

StevieG
StevieG

Reputation: 8709

SELECT count(*) 
FROM pattern
WHERE type <> 'C'

Upvotes: 1

Jan Vorcak
Jan Vorcak

Reputation: 19989

SELECT COUNT(*) FROM Pattern WHERE type != 'C'

Did I understand you right?

Upvotes: 0

Related Questions