Re: Having "HAVING" problems with GROUP BY.

From: Conan <conan_at_>
Date: Tue, 5 Sep 2000 18:57:40 +0100
Message-ID: <
0uat5.21142$r4.11099_at_news.indigo.ie>


Hi Joseph,

    I read through your query and I'm not sure I know exactly what you're trying to-do, but here is my best attempt at answer

select * from (
select player_id , ROUND(SUM(actual_points)) points from (

   SELECT

      ce.entry_id,
      ce.date_caught as date_caught,
      ce.actual_points as actual_points,
      ce.player_id as player_id
   FROM
      fantasy_entries ce

   UNION all
   SELECT
     ce.entry_id,
     ce.date_caught as date_caught,
     ce.actual_points as actual_points,
     players.player_id as player_id
   FROM
      catch_entries ce,
      dogfish.players

   WHERE ce.pin = players.pin ) rs1
group by

   player_id
having

   SUM(actual_points) BETWEEN 0 AND 2800    and count(playerid) > 3
order by points desc)
where rownum < 5
/

AFAIK the order by in an inline view is only supported from version 8i onwards, if im on the right track but you need the syntax for an earlier version send me an E-mail

HTH Conan Received on Tue Sep 05 2000 - 19:57:40 CEST

Original text of this message