Help for this page

Select Code to Download


  1. or download this
    from table a join table b on -- the primary key
    where a.idNumber = b.idNumber
    
  2. or download this
    select abs(a.price - b.price) as difference
    
  3. or download this
    where a.date = (select max(Date) from table t1
          where t1.idNumber = a.idNumber)
    and
         b.Date = (select max(Date) from table t2
         where t2.idNumber = b.idNumber)
    
  4. or download this
    select
          a.idNumber              -- Presuming you want
    ...
             where t1.idNumber = a.idNumber)
        and b.Date = (select max(Date) from table t2
             where t2.idNumber = b.idNumber)