I have a table in Google spreadsheet like this:
Stock Date Price
DNB Nordic Technology 2016-07-12 968,7449
DNB Nordic Technology 2016-07-13 970,0482
DNB Nordic Technology 2016-07-14 970,0500
Elementa 2016-03-30 1167,0704
Elementa 2016-04-30 1175,8091
Elementa 2016-05-31 1184,1240
Elementa 2016-06-30 1196,5268
Evli Emerging Frontier B 2016-07-12 1164,6900
Evli Emerging Frontier B 2016-07-14 1171,3400
What I need is a table with only the most recent price for each stock for a specific date ex 2016-07-13
DNB Nordic Technology 2016-07-13 970,0500
Elementa 2016-06-30 1196,5268
Evli Emerging Frontier B 2016-07-12 1166,9200
I want to use a query so I can use the result/table and run a single query using ARRAYFORMULA(sum... (quantity * price)) to get total value for my portfolio.
pls help :)
This query will result in latest date but no prices :(
QUERY('stock'!$A:$C;"select A, max(B) where A<>'' group by A label A '', max(B) ''")