Re: sql statement

From: Alan <alanshein_at_spambuster.erols.com>
Date: Wed, 27 Sep 2000 12:23:20 -0400
Message-ID: <8qt6to$346$1_at_bob.news.rcn.net>


[Quoted] Sounds like a class assignment, which I don't normally answer, but just in case...

SELECT count(&v_id)
FROM your_table
WHERE id = &v_id
AND entry > (trunc(sysdate) - 365)
;

"Steve ." <syarbrou_at_nospam.enteract.com> wrote in message news:qn34ts8nmhtuaq2tgh4o1dsqb4t93ss4pt_at_4ax.com...
> I'm trying to figure out an SQL statement to do the following.
>
> Enter a number: 12345
>
> use that number against a table with the following values:
>
> id, date
>
> The id is not unique. So when the number 12345 is entered I want to
> count the number of entries with 12345 for the id, that have dates in
> the date field, that from the current date, are less than a year old.
>
> Thanks.
>
> Steve
>
> Newsgroup replies preferred. Remove nospam when replying thru email.
Received on Wed Sep 27 2000 - 18:23:20 CEST

Original text of this message