0 - 8 of 8 tags for max

I have an issue while trying to get only the record containing max(c.event_dtm) from the following query:
SEL     a.startclock_day,

Running the following query:

SELECT MAX(timeValue), MIN(timevalue) FROM OurDB.DimTime

 Returns the result of:

Hi everyone.  I'm trying to load SQL server tables to Teradata14 using OleDB via TD's OleLoad tool.  I'm having trouble with attributes defined as VARCHAR(MAX) in SQL server - it seems that this is a LOB data type.  Here is the script that OleLoad is generating:

please check the following dataset
customerid  purchasedate 
1                      5/9/2013
1                      5/20/2013   
1                       5/29/2013
2                       6/8/2013
I need to calculate resultset like

I have to select rows from the table where col1=max(col1).
Here if the max(col1) is null, i dont get results because NULL cannot be compared as far as i know.
Temporarily i have used COALESCE(COL1,CURRENT_DATE)= COALESCE(MAX(COL1),CURRENT_DATE) to fetch records.
Will this temp solution affect in terms of performance ?

I'm still new to TeraData, so most of my issues and inquiries are probably simple.  I've done a few searches, and can't seem to find much...

If I have 5 columns, itm_cd1 thru itm_cd5, is there an easy way to select the highest value of the 5?


I have a salary_table and I want to fetch the maximum of Net_Amt from that.
I want to know how does teradata get this maximum value.So I get the explain plan which is as follows:

sel max(Net_Amt) from dbname.salary_table;
1) First, we lock a distinct dbname."pseudo table" for read on a
RowHash to prevent global deadlock for dbname.salary_table.
2) Next, we lock dbname.salary_table for read.
3) We do an all-AMPs SUM step to aggregate from


I have a few Decimal, Character and Integer columns in my table. How may I write a query in Teradata to get the maximum permissible characters/digits in each of those columns? Please help this newbie.

Thanks and regards