Monday, 10 March 2014

How to select first N Records in Teradata?


Answers:

To select N records in Teradata you can use RANK function. Query syntax would be as follows
SELECT BOOK_NAME, BOOK_COUNT, RANK(BOOK_COUNT) A FROM LIBRARY QUALIFY A <= 10;

No comments:

Post a Comment