Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL Blues......Part 2 HELP!!!

Re: SQL Blues......Part 2 HELP!!!

From: Ada Zhao <azhao_at_exchange.ml.com>
Date: 2000/07/07
Message-ID: <8k5brf$41b$1@news.ml.com>#1/1

You will need to add date_caught in the group by as well. The SQL should read:
select pin, date_caught , max(actual_points) from catch_entries
groupy bypin,date_caught
 order by max(actual_points) desc

"Newbie (Joe)" <jranseth_at_hotmail.com> wrote in message news:RI195.1883$87.4856_at_news1.mts.net...
> It works fine when I only include the fields "pin" and max(actual_points)
> but whenever I add another field, it gives me a group by error.
>
> ie: "select pin, max(actual_points) from catch_entries groupy by pin order
> by max(actual_points) desc" works fine...
> BUT
> "select pin, max(actual_points), date_caught from catch_entries groupy by
> pin order by max(actual_points) desc"
> produces an error saying not a group by expression.....
>
> Any clues?
> --
> "jAnO!" <j.j.groot_at_kpn.com> wrote in message
> news:8k27ce$267$1_at_hdxl22.telecom.ptt.nl...
> >
> > mAd hAcker <madhackerboy_at_hotmail.com> wrote in message
> > news:4s095.1881$87.4703_at_news1.mts.net...
> > > Okay, I tried that.....but I keep getting an error -
> > > "ORA-00979: not a GROUP BY expression"
> > > Why isn't it a GROUP BY expression?
> >
> > I'm not sure but i think it has something to do with te fact that you're
> > also selecting columns that have specific data thats different for
 multiple
> > rows.
> > Maybe you should trie to select at first only player_name and max_point
> > make that one work and gradualy make your query larger..
> >
> > greetz
> >
> > Jan
> > (taking OCP exam 1 next week..)
> >
> >
> >
> >
> >
> >
>
>
Received on Fri Jul 07 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US