Subject | Re: SQL Help |
---|---|
Author | jackmills75 |
Post date | 2008-01-10T15:07:14Z |
--- In firebird-support@yahoogroups.com, Steve Wiser <steve@...>
wrote:
The query filters out single results = 'F' but allows groups of 2 or
more, i.e. wont sort for groups of six or more
Jack
wrote:
>try
> I don't know if this query works or is efficient at all, but maybe
> something like:Thanks Steve
>
> select distinct d1.Word_No
> from DownLoad d1
> join DownLoad d2 on d1.Used = d2.Used
> where ( abs( d1.Word_No - d2.Word_No ) = 1 ) AND
> ( d1.Used = 'F' )
> order by d1.Word_No
>
> -steve
>
The query filters out single results = 'F' but allows groups of 2 or
more, i.e. wont sort for groups of six or more
Jack