Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following query
with temp as(select distinct [datecol],[Code Article],[Code Structure],[Code Site]
from [Vente] t2
where promo = 0
and ([Code Article] is not null) and ([Code Structure] is not null) and ([Prix de Revient] is not null ))
select * from(
select distinct [datecol],[Code Article],[Code Structure],[Code Site],
row_number() over(Partition by [Code Article],[Code Structure],[Code Site] order by [datecol]desc ) as rn
from temp
) d where rn <= 28
How to do the same idea within QVD ?
Hi,
May be you can Load All the data using Select * , then you can limit the data using Load statement.
Like
LOAD Distinct [datecol],
[Code Article],
[Code Structure],
[Code Site] Where rn<=28 Order by [datecol] desc;
SELECT * From YourTableName;