|Subject||Re: [firebird-support] SQL Question|
>At 06:54 07/22/03, you wrote:At 08:04 AM 22/07/2003 -0700, Scott Taylor wrote:
> >Hi all,
> >when I execute the following SQL, I get duplicates records. Anyone know why?
> >There are 2 nozzles and 2 grades of fuel.
> >SELECT T.Grade, G.Descrip,
> >N.LSold as VolSold, N.MSold as MoneySold
> >FROM Tanks T JOIN Nozzles N
> >T.Number = N.Tank
> >Grades G
> >T.Grade = G.Grade_Num
> >Order by T.Grade, G.Descrip
>Because you have two separate joins to TANKS: T.Number and T.GradeNo, that wouldn't cause duplicate rows. These are all inner joins, so it
should give as many rows as there are rows in Tanks.