× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



It's probably the group by 1 that's confusing it.
And, hopefully this is a pasting error (because I don't understand 'and
and')
WHERE
AMT1 > 49.99 and
and 1 <> 'BYPASS'

Does this work?
With T1 as (
SELECT case substr(digits(DATEFIELD), 5, 2) || substr(digits(DATEFIELD),
1,
2)
when '7901' then '01/07 - Jan 07'
when '7902' then '02/07 - Feb 07'
when '7903' then '03/07 - Mar 07'
when '7904' then '04/07 - Apr 07'
when '7905' then '05/07 - May 07'
when '7906' then '06/07 - Jun 07' else 'BYPASS' end as ForMonthYear,
AMT1
FROM FILE1
WHERE AMT1 > 49.99)
Select ForMonthYear, count(*), sum(amt1)
from t1
where ForMonthYear<>'BYPASS'
Group by ForMonthYear


Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.