Re: Abfrage nach einer Reihe von Jahren

bernhard <[email protected]>
Newsgroups gmane.comp.db.postgresql.german
Message-ID <[email protected]>
Hallo Gunnar,

>
> SELECT
>   mzb.land,
>   count ( distinct (mzb.samplsite_id))
> FROM
>   public.mzb
> WHERE
>   EXTRACT (year from mzb.date) = 1999 AND
>   EXTRACT (year from mzb.date) = 2000 AND
>   EXTRACT (year from mzb.date) = 2001 AND
>   EXTRACT (year from mzb.date) = 2002
> GROUP BY mzb.land;
>

OR statt AND?

oder IN (1999, 2000, 2001, 2002)
oder BETWEEN 1999 AND 2002


Gruß
Bernhard


-- 
Sent via pgsql-de-allgemein mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-de-allgemein
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.