<div dir="ltr">What is the difference between these two. I know that max() is an aggregate function<br /><br />select
model,count(distinctcars)<br />from rc_cars<br />where greatest(baught,returned) < current_date - integer '1'<br />
groupby model;<br /><br />Do i need to have a max () around a greatest() to make sure i get the most recent of the
two.<br/><br />select model,count(distinct cars)<br /> from rc_cars<br /> where max(greatest(baught,returned)) <
current_date- integer '1'<br /> group by model;<br /><br /><br /></div>