Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
For an analysis I need to retrieve the max date of some datas. Let me explain:
The company is issuing differen quotes for the same order number. Therefore they asked me to retrieve some statistics starting from august 01, 2014. The problem is that some quotes for an order have been issued after that date and before that date. Until now, my script was retrieving only the quotes that were issued after 01/08/2014, but the quotes issued before are forgotten but very important for my statistics.
After loading the datas for the quotes and orders, I tried to load the quotes on another way, like this:
Load JD_NVARIANT,
max(concat(JD_DATE)) as JD_DATE_MAX
resident Table_suivi_devis
group by JD_NVDEVIS;
where JD_NVARIANT is the quote number, JD_DATE, the date of the quote and JD_NDEVIS, the order number. When relaoding, an error appear: Nested aggregation not allowed
How could I solve this problem? Thank you
OK, different approach to match your last post, first identify the orders whit a quote >=01/08/2014:
OrdersToLoad:
Load distinct JD_NVDEVIS as OrderToLoad
resident Table_suivi_devis where JD_DATE>='01/08/2014';
Quotes:
LOAD Fields
From SourceOfQuotes Where Exists('OrderToLoad', JD_NVDEVIS);
DROP Table OrdersToLoad;
So it will load all quotes related to and order with at least one quote whose date was >=01/08/2014
Hope this helps