mysql count query

Posted by S.PRATHIBA on Stack Overflow See other posts from Stack Overflow or by S.PRATHIBA
Published on 2010-03-20T02:16:23Z Indexed on 2010/03/20 2:21 UTC
Read the original article Hit count: 319

Filed under:

Hi all,

i have the following table:

mysql> select * from consumer1;

Service_ID | Service_Type | consumer_feedback

     31      Printer           -1 
     34      Printer            0 
     31      Printer            0 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 
     34      Printer            1 

I need a query such that I need THE COUNT(Service_ID)=2 AS Service_ID is 31 and 34.Please help me and give me some suggestions.

© Stack Overflow or respective owner

Related posts about mysql