Re: [SQL] pull in most recent record in a view

2012-10-28 Thread David Johnston
On Oct 26, 2012, at 5:24, Gary Stainburn wrote: > This is my best effort so far is below. My concern is that it isn't very > efficient and will slow down as record numbers increase > > create view current_qualifications as > select q.*, (q.qu_qualified+q.qu_renewal)::date as qu_expires from >

Re: [SQL] pull in most recent record in a view

2012-10-28 Thread Gary Stainburn
This is my best effort so far is below. My concern is that it isn't very efficient and will slow down as record numbers increase create view current_qualifications as select q.*, (q.qu_qualified+q.qu_renewal)::date as qu_expires from qualifications q join (select st_id, sk_id, max(qu_qualified