Sample Data

Tools

Sample Data

I have a table that has 3 field in its PI (FLDA, FLDB and FLDC) FLDC is a date. There is over three years of dates in the table. I would like to see a sample of 10 rows from each of the dates in the table. (I'm actually pulling the data to build a test bed). Is this possible via one of the Teradata Utilities, or via some other ingenious magic?

Thanks,
Bob
1 REPLY
Enthusiast

Re: Sample Data

Try the below query:

SEL

flda

,fldb

,fldc

,RANK(flda,fldb,fldc)

FROM database.table

qualify (flda,fldb,fldc) < 11

group by fldc

Thanks,
Shiyamala