Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGlPT-0000VI-K9 for pgsql-general@arkaria.postgresql.org; Thu, 19 Aug 2021 17:00:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1mGlPS-0002pX-GZ for pgsql-general@arkaria.postgresql.org; Thu, 19 Aug 2021 17:00:54 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGlPS-0002pO-5S for pgsql-general@lists.postgresql.org; Thu, 19 Aug 2021 17:00:54 +0000 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1mGlPN-0003V9-Ll for pgsql-general@lists.postgresql.org; Thu, 19 Aug 2021 17:00:53 +0000 Received: by mail-pg1-x533.google.com with SMTP id r2so6474211pgl.10 for ; Thu, 19 Aug 2021 10:00:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VrhFfGdhX9+WOYCPAV0fRETxRk45s3VTPkP+WuKE1JY=; b=JTK5uzXz0hdCnlMDAUR2u01LSPLgZbbIGQP7fbBouO2aDf0aqQzOxQfotmwTmq5+lg uQwngw9QtD4q2IMOkovIhgihVEzg28c5VlAo8MpbK+qRxX0OeKQ8ducOfiyh5/gq0Ozt xDdVwWVN/M3lEWG5JJOxAuc8L4Twe9OJB272Vv9i27atM0JZ72kp325mS6ITQWMnU7oO HwezI7BZC/CVDMT4Tyl/BZUJVxqTQ6/zlFHjo4pU1BdMIwRPOagM6X3ATdHc7jgCoV/H VO8tsvBpIZUMnctGx8f8+Vx6afs6vqTf6/laYX8nptsJfwimOeTRSEESGxtKsrvuQTVy GPMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=VrhFfGdhX9+WOYCPAV0fRETxRk45s3VTPkP+WuKE1JY=; b=AYoEqn+Sw8R1rwxDRrvYscXneuYbJJuA1Q2paQH3dlpu/DRiUp+eRFGMuO9JnnlWhQ TsSnyf/B9vwqw0RKghO2BPIJn67zh00VM7aJUGd/exA65IDWfI2h/1wWEfSTQ+3QcRNm gG8Smi+ZM3+FaGfXLVGVw3eKXXMH70vGYr/yWoTkl2HZRT6Vu7OGVUn2591MoWPFJqNQ 2cUftQgVVUlXjIrE9EwdtLMGMP6dkAFccjL23cJqXXuDXCQtldlPQFFRSeZ8QTCA+2Qh x49NqyYqgLPnGjDg0RQBluSQx2OXqFssU7yvFclaHBySk4lBYdl21ZmnvC58nDhHu1Ru 3frw== X-Gm-Message-State: AOAM532nBAvMkwpjtmcm8CBpu0SXO3sgyLiGaHIcWOyFr3eRnTKe//zM WBZwT+RzIZZ3E6D6IwSdVAw= X-Google-Smtp-Source: ABdhPJz6CrU/fYtibZYC7TSEtbWkfQIzmX9Sxn3h8QHrsh9wfGCRjxbL6eBq6/Wg8eUoK+LM6uCGnQ== X-Received: by 2002:a63:1b60:: with SMTP id b32mr5328620pgm.422.1629392447236; Thu, 19 Aug 2021 10:00:47 -0700 (PDT) Received: from smtpclient.apple ([2601:681:5500:dde0:3d89:3115:eeed:bd07]) by smtp.gmail.com with ESMTPSA id ca7sm8846074pjb.11.2021.08.19.10.00.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Aug 2021 10:00:46 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Selecting table row with latest date From: Rob Sargent In-Reply-To: Date: Thu, 19 Aug 2021 11:00:45 -0600 Cc: pgsql-general Content-Transfer-Encoding: quoted-printable Message-Id: <301C48DC-63E1-45CA-AA2E-E3F7FD13019B@gmail.com> References: <1704154.1629384082@sss.pgh.pa.us> <446C1708-2523-4A9F-B5EC-221BFF2D851E@gmail.com> To: Rich Shepard X-Mailer: Apple Mail (2.3654.120.0.1.13) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk > On Aug 19, 2021, at 10:59 AM, Rich Shepard = wrote: >=20 > On Thu, 19 Aug 2021, Rob Sargent wrote: >=20 >> Yeah, but my quibble is the the table you described up-thread. Your >> contact table contains next_contact? I think that column should be >> normalized out. >=20 > Rob, >=20 > Why should I have a separate table with one column: next_contact? The > next_contact date is associated with a person and the date that person = was > contacted. >=20 > Rich sorry, wasn=E2=80=99t clear: person_nbr, next_contact On the premise that there can only be one next date. >=20 >=20 >=20 >=20