All pastes #469038 Raw Edit

MAX

public sql v1 · immutable
·published 2007-05-03 14:35 UTC
rendered paste body
select MAX(dias.diaMax), notes as dd from (select h.hst_date as diaMax, h.hst_note as notes from history as h WHERE h.hst_byr_usr_code='ascom'UNIONselect e.eml_date as diaMax,e.eml_subject as notes from email as e ) as diasGROUP BY dias.diaMax