diff options
Diffstat (limited to 'sql/dawn.sql')
| -rw-r--r-- | sql/dawn.sql | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/dawn.sql b/sql/dawn.sql index 4284cb06..ae2631f9 100644 --- a/sql/dawn.sql +++ b/sql/dawn.sql @@ -512,7 +512,7 @@ left join( group by dealid) as b on a.dealid = b.dealid and date = b.latest_model_date ) d on c.dealid = d.dealid -where c.trade_date <= p_date and c.expiration_date >= p_date; +where c.trade_date <= p_date and c.expiration_date > p_date ORDER BY dealid ASC; END; $$ LANGUAGE plpgsql; |
