I have the following two tables
I need to create a table that would summarize points for each date
How can I do this . I have updraded to Teradata 14 . And I am not quite familiar with all the new functions
If table1 is actually only a few rows you don't need any fancy query.
Assuming table1.caseid is a byteint this will result in a product join:
Select t2.datex, t2.caseid, sum(t1.points)
from table1 as t1 join table2 a t2
on position(trim(t1.caseid) in t2.caseid) > 0
group by 1,2
Of course if this was a properly normalized table you could simple use a t1.caseid = t2.caseid join instead.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.