I have a tile linked to a query
let's say I have two records for LineRef "W" that has a status "a"
Id IdCommon Status CreatedDateTime LineStatus LineRef
I want my query to return the last record created for that line, if it's with Status Done. So since the last record is with Status new , my tile count shouldn't return anything.
if the 2nd record wasn't there then my query should return a count of 1.
how to create a tile with an AOT query that achieves this?
This is the query that i did, and currently the tile is returning 1 record. But it shouldn't return anything because that last record created for that line is with status New
select Table1.IDCommon,Table1.Status,Table2.Id, Table3.CreatedDateTime
From Table1
join Table2 on Table2.LineRef= Table1. LineRef
join Table3 on Table3.Id = Table2.Id
where Table1.IDCommon= 'X'
and Table1.LineStatus = a
and Table1.Status = Done