I have an requirement to fetch latest time difference record for each appname in one table and compare it with the average which is present in other table and returns only w