Again I am stuck up in an SQL Query..
Please guide for the same..
  Allocation Table
       |     ID     |        SerialNumber     |        AssignTo     |        Status     |   
     |     1     |        ASERTU     |        Shekhar     |        Assigned     |   
     |     2     |        ASERTU     |        Kiran     |        Assigned     |   
     |     3     |        CXZUYT     |        Mohan     |        Available     |   
 
    Certification Details 
       |     ID     |        SerialNumber     |        CertifiedBy     |   
     |     1     |        ASERTU     |        Shekhar     |   
     |     2     |        CXZUYT     |        Mohan     |   
 
    Logic–
  System will pick the “SerialNumber” and “CertifiedBy” column from “Certification Details”
  Eg – “ASERTU” and “Shekhar”
  Get MAX ID from “Allocation Table” where “Serial Number” = “ASERTU”. The ID is = 2.
  Get “AssignTo” name where ID = 2 from “Allocation Table”. The name is = Kiran
  Check if “Certified By”(from “Certification Details”) and “Assign To”(From “Allocation Table”) are same or different.
  If same, then gridview backcolour = red; else yellow.
  Please guide.. How to do this activity in backend; hence reduce font-end code-lines.