Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Tue, 28 Oct 2008 @ 22:25:50 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: SAMPLE Command to obtain 5 per location
 
From:   Michael Larkins

Hi Phil:

How randomized do you need the sample?

If it does have to be extremely random, you could do the following:

     qualify count(*) over (partition by location
                             rows unbounded preceding) <6

Hope this helps,

Michael Larkins
Certified Teradata Master
Certified Teradata SQL Instructor



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023