Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2007
    Posts
    5

    Unanswered: Count of table column

    Hi,
    i have a table xx with column flg.

    it has values like

    flg
    ----
    T
    G
    T
    T
    G
    G
    G
    G

    I want to write a query that would retrieve
    count(flg) where flg='G'
    and count(flg) where flg='T'
    in a single line query.

  2. #2
    Join Date
    Dec 2007
    Posts
    253
    solved here

  3. #3
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Or ...
    If you're looking for the number of different values within a column

    select flg,count(*) from xx_tablename group by flg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •