Help with SELECT query

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Marco

    Help with SELECT query

    My SELECT query returns a data set, one column of which contains a set
    of values corresponding to the same date. I.e. for each date in column
    "Date", I have a set of numbers in column "Numbers". However, I am
    only interested in getting the largest value in column "Numbers"
    corresponding to each value in column "Date". How do I do that?
    Thanks,

    Marco
  • Jarl Hermansson

    #2
    Re: Help with SELECT query

    mdi00@hotmail.c om (Marco) wrote in news:e5f1d809.0 411190312.c9f8b 07
    @posting.google .com:
    [color=blue]
    > My SELECT query returns a data set, one column of which contains a set
    > of values corresponding to the same date. I.e. for each date in column
    > "Date", I have a set of numbers in column "Numbers". However, I am
    > only interested in getting the largest value in column "Numbers"
    > corresponding to each value in column "Date". How do I do that?
    > Thanks,
    >
    > Marco
    >[/color]

    SELECT "Date", MAX("Numbers")A S "Largest number"
    FROM sometable
    GROUP BY "Date"

    Comment

    • Bob Badour

      #3
      Re: Help with SELECT query

      Marco wrote:
      [color=blue]
      > My SELECT query returns a data set, one column of which contains a set
      > of values corresponding to the same date. I.e. for each date in column
      > "Date", I have a set of numbers in column "Numbers". However, I am
      > only interested in getting the largest value in column "Numbers"
      > corresponding to each value in column "Date". How do I do that?
      > Thanks,
      >
      > Marco[/color]

      Look up MAX and GROUP BY.

      Comment

      Working...