facebook

COUNT operator

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #249963 Reply

    The config of my table as below:

    | Id | Device|
    ————————————
    | SR200604001 | Server
    | SR200604002 | Server
    | RO200604001 | Router
    | RO00604002 | Router
    | PJ200604001 | Projector

    Using ‘COUNT’ operator, how to get total of rows that is ordered by every device? I take an example,
    Server | 2
    Router | 2
    Projector | 1

    Thanx!

    #249969 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev

    #249978 Reply

    Brian Fernandes
    Moderator
    select device, count(id) from tableName group by Device;

    I’m not 100% sure that would work, but give it a shot.

    Brian.

    #249989 Reply

    It works! Thank you very much!

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: COUNT operator

You must be logged in to post in the forum log in