suhaib1thariq <[email protected]> writes:

> i have a code in sql ....i need to implement in derby it has two tables with
> group by ...but it is not working i derb help me solve this
>
>  SELECT MarkInfo.RegNumber as REGISTER_NUMBER, Name as NAME ,sum(Internal
> +Extern) AS TOTAL,avg(Internal + Extern)AS AVERAGE 
> from MarkInfo,StudentInfo 
> where StudentInfo.RegNumber = MarkInfo.RegNumber 
> group by MarkInfo.RegNumber

Hi,

I think you need to include the Name column in the GROUP BY clause, like
this:

  GROUP BY MarkInfo.RegNumber, Name

-- 
Knut Anders

Reply via email to