Re: dumb question
От | David G. Johnston |
---|---|
Тема | Re: dumb question |
Дата | |
Msg-id | CAKFQuwZeDWL1xp8oab1rXHKoXpbMOaYbfheRKsOZ=LdjcjRdgw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: dumb question (Steve Crawford <scrawford@pinpointresearch.com>) |
Ответы |
Re: dumb question
Re: dumb question Re: dumb question |
Список | pgsql-general |
The OP will need to explain further as we are all guessing. As I mentioned in my earlier (accidental top - curses GMail) post, table structures and the query or queries that don't work would be useful. So would a description of the problem that is being solved since there could be better approaches.On Thu, Jun 2, 2016 at 10:40 AM, Felipe Santos <felipepts@gmail.com> wrote:I think sts=0 means ref_id is nullSo, what I think he wants to achieve is:select max(id) from yourtable where sts=0 and id not in (select ref_id from yourtable);Isn't it?
Maybe we mis-interpreted but as written this is the solution. My out-loud thinking was a more verbose version of this.
David J.
В списке pgsql-general по дате отправления: