select the value that match with to the most recent date
hello,

i just resolved an issue thanks to [@ppr](/u/ppr)

i have a data table with dates and prices (4rows)

first, i have to find wich one of the fourth is the most recent date and then collect the price from the column price.

thanks to [@ppr](/u/ppr) he found me a way to select the most recent date. but i have an …
[@najoua.abbaci](/u/najoua.abbaci)

mabye the flow can be adopted to following:

assign:

leftside: drresult (datatype: datarow)

right side:

dt\_datepv.asenumerable.orderby(function ( r ) datetime.parseexact(r(0).tostring.trim, “dd.mm.yyyy”, system.globalization.cultureinfo.currentuiculture.datetimeformat)).last()

so…
Hi, Really hard to work this out from your query but I suspect the answer would be a correlated sub query to find the latest appointment date.



https://www.geeksforgeeks.org/sql-correlated-subqueries/ hello [@saurabhgupta](/u/saurabhgupta) :wave:

i’m afraid that the last updated column isn’t supported by our api at this time. this is because it’s calculated client side. you can see a list of these column types here - <https://monday.com/developers/v2#column-values-section-auto-calculated-column>

although the api do… You could try using the in line view like this:


Select table1.col1, table1.col2, table1…., table2.col1, table2.col2, table2….  

 from  

(SELECT *  

FROM dbo.Shaft\_Scales  

WHERE dbo.Shaft\_Scales.ID = (SELECT max(ID) from dbo.Shaft\_Scales ID) as table1,  

(SELECT *  

FROM OtherTable  

WHERE dbo.OtherTable.ID = (SELECT max(ID) from dbo.OtherTable ID) as table2


—————- another approach from meandyou 


This works on [at least some] SQL processors


SELECT T1.* , T2.*  

FROM table1 T1, table2 T2  

WHERE …


Do we have to discuss why not to use “SELECT * ” in your SQL?<pre>


Try this


SELECT * FROM T1 as a, T2 as b WHERE a.ID = (SELECT max(ID) from T1)  

and b.ID = (SELECT max(ID) from T2);</pre> You need to iterate over the resource...

 
```
while ($row = mysql_fetch_object($tariff_query)) {
    echo $row->somefield;
    echo $row->someotherfield;
}

```
 So you now get all the records not just the first one.

 BTW, if you want to use an object, why not use PDO or mysqli? mysql is dead - or as good as. Should be able to do something like this:


UPDATE table\_name  

SET new\_column = (calculated value)  

WHERE new\_column is NULL 1) p(x) = 1/x2 + 1 if x ≤ 3 it is clear that x= 3 is included, so you have to use this function.2) loo k at table d, and compare the given information with the data written inside the table. sorry for misunderstanding the core issue with this one,@tom\_mgdi. i just tested a find row step using a simple formula (just a sum function) and the zap was able to search based on the value of the result of the formula (ie the result of the sum). this tells usthat the zap is failing specifically for query or import range formula. it’s likelynot finding the valuesbecause lookup formulas and import formulas will only show the imported value while they are being observed in google sheets, otherwisethey either appear as blank or as the raw function. if you have access to the other sheet that you are using the function to get results from, it may be worth adding an extra “lookup spreadsheet row” action to the zap, to get the information from that row in the other sheet, then combine the two rows later on. [image] nirgrahamuk:

observe({

fv <- req(input$filter\_var)

td <- req(tabledata())

updateselectizeinput(inputid = "filter\_vals",

choices = pull(td,fv))

})

observe({

fv <- as.character(req(input$filter\_var))

td <- req(table… thanks i was able to use something similar. i have just seen online that we’re not able to extract column values for calculated columns? is there any other way of extracting this data?

query = """ query { boards (ids: %s limit: 20, page: 1) { id name columns … hi paul,

i believe the financial reporting covers in quite a lot of detail exactly what you are looking for.

from what i can tell you aren’t using templates in your tables…

[[image]](https://forum.enterprisedna.co/uploads/db7134/original/2x/5/559a333f85c159c8d9bec9235ca5c45997d08858.png "image")

if you want to get a certain order and custom table then you really need to use the template approach covered in t…